#include <HeightMap.h>
Public Member Functions | |
| HeightMap () | |
| virtual | ~HeightMap () |
| void | create (int width, int height) |
| void | reset () |
| int | getMapWidth () |
| int | getMapHeight () |
| fixed | getHeight (int w, int h) |
| fixed | getInterpHeight (fixed w, fixed h) |
| FixedVector & | getNormal (int w, int h) |
| void | getInterpNormal (fixed w, fixed h, FixedVector &normal) |
| bool | getIntersect (Line &direction, Vector &intersect) |
| void | setHeight (int w, int h, fixed height) |
| GraphicalHeightMap * | getGraphicalMap () |
| void | setGraphicalMap (GraphicalHeightMap *map) |
Protected Member Functions | |
| bool | getVector (FixedVector &vec, int x, int y) |
| void | getVectorPos (int pos, int &x, int &y, int dist=1) |
Protected Attributes | |
| int | width_ |
| int | height_ |
| HeightData * | heightData_ |
| GraphicalHeightMap * | graphicalMap_ |
Classes | |
| struct | HeightData |
Definition at line 31 of file HeightMap.h.
| HeightMap::HeightMap | ( | ) |
Definition at line 29 of file HeightMap.cpp.
| HeightMap::~HeightMap | ( | ) | [virtual] |
| void HeightMap::create | ( | int | width, | |
| int | height | |||
| ) |
Definition at line 39 of file HeightMap.cpp.
References GraphicalHeightMap::create(), graphicalMap_, height_, heightData_, reset(), and width_.
Referenced by GroundMaps::generateHMap(), and RoofMaps::generateRMap().
| void HeightMap::reset | ( | ) |
Definition at line 52 of file HeightMap.cpp.
References height_, heightData_, HeightMap::HeightData::normal, HeightMap::HeightData::position, and width_.
Referenced by create(), HeightMapModifier::generateTerrain(), and HeightMapLoader::loadTerrain().
| int HeightMap::getMapWidth | ( | ) | [inline] |
Definition at line 41 of file HeightMap.h.
References width_.
Referenced by HeightMapModifier::addCirclePeak(), ImageModifier::addHeightToBitmap(), ImageModifier::addLightMapToBitmap(), ImageModifier::addWaterToBitmap(), DeformLandscape::applyInfos(), DeformTextures::deformLandscape(), DeformLandscape::deformLandscapeInternal(), SkyRoof::drawSegment(), HeightMapModifier::edgeEnhance(), ImageModifier::findIntersection(), DeformLandscape::flattenAreaInternal(), RoofMaps::generateRMap(), HeightMapModifier::generateTerrain(), HeightMapLoader::generateTerrain(), LandSurround::generateVerts(), RoofMaps::getInterpRoofHeight(), getIntersect(), GroundMaps::getLandscapeWidth(), RoofMaps::getRoofHeight(), HeightMapModifier::levelSurround(), HeightMapLoader::loadTerrain(), SkyRoof::makeList(), HeightMapModifier::noise(), ComsSyncCheckMessage::readMessage(), ImageModifier::removeWaterFromBitmap(), HeightMapModifier::scale(), HeightMapModifier::smooth(), TargetGroupsGroupEntry::TargetGroupsGroupEntry(), HeightMapModifier::waterErrosion(), and ComsSyncCheckMessage::writeMessage().
| int HeightMap::getMapHeight | ( | ) | [inline] |
Definition at line 42 of file HeightMap.h.
References height_.
Referenced by HeightMapModifier::addCirclePeak(), ImageModifier::addHeightToBitmap(), ImageModifier::addLightMapToBitmap(), ImageModifier::addWaterToBitmap(), DeformLandscape::applyInfos(), DeformTextures::deformLandscape(), DeformLandscape::deformLandscapeInternal(), SkyRoof::drawSegment(), HeightMapModifier::edgeEnhance(), ImageModifier::findIntersection(), DeformLandscape::flattenAreaInternal(), RoofMaps::generateRMap(), HeightMapModifier::generateTerrain(), HeightMapLoader::generateTerrain(), LandSurround::generateVerts(), RoofMaps::getInterpRoofHeight(), getIntersect(), GroundMaps::getLandscapeHeight(), RoofMaps::getRoofHeight(), HeightMapModifier::levelSurround(), HeightMapLoader::loadTerrain(), SkyRoof::makeList(), HeightMapModifier::noise(), ComsSyncCheckMessage::readMessage(), ImageModifier::removeWaterFromBitmap(), HeightMapModifier::scale(), HeightMapModifier::smooth(), TargetGroupsGroupEntry::TargetGroupsGroupEntry(), HeightMapModifier::waterErrosion(), and ComsSyncCheckMessage::writeMessage().
| fixed HeightMap::getHeight | ( | int | w, | |
| int | h | |||
| ) | [inline] |
Definition at line 45 of file HeightMap.h.
References height_, heightData_, and width_.
Referenced by HeightMapModifier::addCirclePeak(), ImageModifier::addHeightToBitmap(), DeformLandscape::deformLandscapeInternal(), GLWWindView::drawScene(), HeightMapModifier::edgeEnhance(), ImageModifier::findIntersection(), RoofMaps::generateRMap(), GroundMaps::getHeight(), getInterpHeight(), getIntersect(), RoofMaps::getRoofHeight(), TankAICurrentMove::makeGroupShot(), SkyRoof::makeList(), HeightMapModifier::noise(), ComsSyncCheckMessage::readMessage(), HeightMapModifier::scale(), HeightMapModifier::smooth(), HeightMapModifier::waterErrosion(), and ComsSyncCheckMessage::writeMessage().
Definition at line 123 of file HeightMap.cpp.
References fixed::asInt(), fixed::floor(), and getHeight().
Referenced by ImageModifier::addHeightToBitmap(), ImageModifier::addLightMapToBitmap(), ImageModifier::addWaterToBitmap(), GroundMaps::getInterpHeight(), RoofMaps::getInterpRoofHeight(), and ImageModifier::removeWaterFromBitmap().
| FixedVector & HeightMap::getNormal | ( | int | w, | |
| int | h | |||
| ) |
Definition at line 149 of file HeightMap.cpp.
References A, FixedVector::asVector(), B, getVector(), getVectorPos(), graphicalMap_, height_, heightData_, HeightMap::HeightData::normal, FixedVector::Normalize(), nvec, HeightMap::HeightData::position, GraphicalHeightMap::setNormal(), FixedVector::StoreInvert(), FixedVector::StoreNormalize(), width_, and FixedVector::zero().
Referenced by DeformLandscape::applyInfos(), DeformLandscape::deformLandscapeInternal(), DeformLandscape::flattenAreaInternal(), RoofMaps::generateRMap(), HeightMapLoader::generateTerrain(), getInterpNormal(), GroundMaps::getNormal(), SkyRoof::makeList(), ComsSyncCheckMessage::readMessage(), and ComsSyncCheckMessage::writeMessage().
| void HeightMap::getInterpNormal | ( | fixed | w, | |
| fixed | h, | |||
| FixedVector & | normal | |||
| ) |
Definition at line 210 of file HeightMap.cpp.
References fixed::asInt(), fixed::floor(), and getNormal().
Referenced by ImageModifier::addHeightToBitmap(), ImageModifier::addLightMapToBitmap(), and GroundMaps::getInterpNormal().
Definition at line 98 of file HeightMap.cpp.
References Line::getDirection(), Line::getEnd(), getHeight(), getMapHeight(), and getMapWidth().
Referenced by GroundMaps::getIntersect().
| void HeightMap::setHeight | ( | int | w, | |
| int | h, | |||
| fixed | height | |||
| ) |
Definition at line 250 of file HeightMap.cpp.
References fixed::asFloat(), DIALOG_ASSERT, getVectorPos(), graphicalMap_, height_, heightData_, HeightMap::HeightData::position, GraphicalHeightMap::setHeight(), and width_.
Referenced by HeightMapModifier::addCirclePeak(), DeformLandscape::deformLandscapeInternal(), HeightMapModifier::edgeEnhance(), DeformLandscape::flattenAreaInternal(), RoofMaps::generateRMap(), HeightMapModifier::levelSurround(), HeightMapLoader::loadTerrain(), HeightMapModifier::noise(), HeightMapModifier::scale(), HeightMapModifier::smooth(), and HeightMapModifier::waterErrosion().
| GraphicalHeightMap* HeightMap::getGraphicalMap | ( | ) | [inline] |
| void HeightMap::setGraphicalMap | ( | GraphicalHeightMap * | map | ) | [inline] |
Definition at line 61 of file HeightMap.h.
References graphicalMap_.
Referenced by ScorchedClient::ScorchedClient().
| bool HeightMap::getVector | ( | FixedVector & | vec, | |
| int | x, | |||
| int | y | |||
| ) | [protected] |
Definition at line 72 of file HeightMap.cpp.
References height_, heightData_, and width_.
Referenced by getNormal().
| void HeightMap::getVectorPos | ( | int | pos, | |
| int & | x, | |||
| int & | y, | |||
| int | dist = 1 | |||
| ) | [protected] |
int HeightMap::width_ [protected] |
Definition at line 70 of file HeightMap.h.
Referenced by create(), getHeight(), getMapWidth(), getNormal(), getVector(), reset(), and setHeight().
int HeightMap::height_ [protected] |
Definition at line 70 of file HeightMap.h.
Referenced by create(), getHeight(), getMapHeight(), getNormal(), getVector(), reset(), and setHeight().
HeightData* HeightMap::heightData_ [protected] |
Definition at line 71 of file HeightMap.h.
Referenced by create(), getHeight(), getNormal(), getVector(), reset(), setHeight(), and ~HeightMap().
GraphicalHeightMap* HeightMap::graphicalMap_ [protected] |
Definition at line 72 of file HeightMap.h.
Referenced by create(), getGraphicalMap(), getNormal(), setGraphicalMap(), and setHeight().
1.5.3