Terrain Height Map. More...
#include <deTerrainHeightMap.h>
Public Member Functions | |
Constructors and Destructors | |
| deTerrainHeightMap () | |
| Creates a new terrain mesh grid object. | |
| ~deTerrainHeightMap () | |
| Cleans up the terrain grid object. | |
Management | |
| const decPoint & | GetPointCount () const |
| Retrieves the number of points. | |
| void | SetPointCount (const decPoint &pointCount) |
| Sets the number of points. | |
| const decVector2 & | GetSize () const |
| Retrieves the size of the grid. | |
| void | SetSize (const decVector2 &size) |
| Sets the size of the grid. | |
| float | GetScaling () const |
| Retrieves the scaling. | |
| void | SetScaling (float scaling) |
| Sets the scaling. | |
| const char * | GetPathHeightImage () const |
| Retrieves the path of the image used to store the height map or NULL if not used. | |
| void | SetPathHeightImage (const char *path) |
| Sets the path of the image used to store the height map or NULL if not used. | |
| deImage * | GetHeightImage () const |
| Retrieves the height image or NULL if not set. | |
| void | SetHeightImage (deImage *heightImage) |
| Sets the height image or NULL if not set. | |
| void | CalculateExtends (decVector &minExtend, decVector &maxExtend) |
| Calculates the extends. | |
Face Visibility | |
| const char * | GetPathVisibilityImage () const |
| Retrieves the path of the image used to store the visibility map or NULL if not used. | |
| void | SetPathVisibilityImage (const char *path) |
| Sets the path of the image used to store the visibility map or NULL if not used. | |
| bool | GetFaceVisibleAt (int x, int y) |
| Determines if the face with the given upper left coordinate is visible. | |
| void | SetFaceVisibleAt (int x, int y, bool visible) |
| Sets if the face at the given upper left coordinate is visible. | |
| void | SetAllFacesVisible (bool visible) |
| Sets the visibility for all faces. | |
Terrain Height Map.
Defines a grid like terrain mesh using a height map. The height of grid vertices is defined by the corresponding pixel in a height image. As height image only 1-component images can be used. Any bit depth is possible allowing for fine grained resolution if required. The optional scaling and offset parameter alter the height retrieved from the height map before being applied to grid points. Individual grid faces can be hidden using a list of rectangular areas. All grid faces inside the union of these rectangular areas are not drawn and do not influence physics or audio propagation. If the height map is missing all grid points take on the height of the offset parameter.
| deTerrainHeightMap::deTerrainHeightMap | ( | ) |
Creates a new terrain mesh grid object.
| deTerrainHeightMap::~deTerrainHeightMap | ( | ) |
Cleans up the terrain grid object.
Calculates the extends.
| bool deTerrainHeightMap::GetFaceVisibleAt | ( | int | x, |
| int | y | ||
| ) |
Determines if the face with the given upper left coordinate is visible.
| deImage* deTerrainHeightMap::GetHeightImage | ( | ) | const [inline] |
Retrieves the height image or NULL if not set.
| const char* deTerrainHeightMap::GetPathHeightImage | ( | ) | const [inline] |
Retrieves the path of the image used to store the height map or NULL if not used.
| const char* deTerrainHeightMap::GetPathVisibilityImage | ( | ) | const [inline] |
Retrieves the path of the image used to store the visibility map or NULL if not used.
| const decPoint& deTerrainHeightMap::GetPointCount | ( | ) | const [inline] |
Retrieves the number of points.
| float deTerrainHeightMap::GetScaling | ( | ) | const [inline] |
Retrieves the scaling.
| const decVector2& deTerrainHeightMap::GetSize | ( | ) | const [inline] |
Retrieves the size of the grid.
| void deTerrainHeightMap::SetAllFacesVisible | ( | bool | visible ) |
Sets the visibility for all faces.
| void deTerrainHeightMap::SetFaceVisibleAt | ( | int | x, |
| int | y, | ||
| bool | visible | ||
| ) |
Sets if the face at the given upper left coordinate is visible.
| void deTerrainHeightMap::SetHeightImage | ( | deImage * | heightImage ) |
Sets the height image or NULL if not set.
| void deTerrainHeightMap::SetPathHeightImage | ( | const char * | path ) |
Sets the path of the image used to store the height map or NULL if not used.
| void deTerrainHeightMap::SetPathVisibilityImage | ( | const char * | path ) |
Sets the path of the image used to store the visibility map or NULL if not used.
| void deTerrainHeightMap::SetPointCount | ( | const decPoint & | pointCount ) |
Sets the number of points.
| void deTerrainHeightMap::SetScaling | ( | float | scaling ) |
Sets the scaling.
| void deTerrainHeightMap::SetSize | ( | const decVector2 & | size ) |
Sets the size of the grid.
1.7.2