Drag[en]gine Game Engine
1.21
|
Height Terrain Sector. More...
#include <deHeightTerrainSector.h>
Public Member Functions | |
Constructors and Destructors | |
deHeightTerrainSector (const decPoint §or) | |
Create sector. More... | |
~deHeightTerrainSector () | |
Clean up sector. More... | |
Management | |
const decPoint & | GetSector () const |
Sector coordinates. More... | |
deHeightTerrain * | GetParentHeightTerrain () const |
Parent height terrain. More... | |
void | SetParentHeightTerrain (deHeightTerrain *heightTerrain) |
Set parent height terrain. More... | |
int | GetIndex () const |
Sector index. More... | |
void | SetIndex (int index) |
Set sector index. More... | |
deImage * | GetHeightImage () const |
Height image or NULL if not set. More... | |
void | SetHeightImage (deImage *heightImage) |
Set height image or NULL if not set. More... | |
void | CalculateHeightExtends (float &minHeight, float &maxHeight) |
Calculate height extends. More... | |
Face Visibility | |
bool | GetFaceVisibleAt (int x, int y) const |
Face at coordinate is visible. More... | |
void | SetFaceVisibleAt (int x, int y, bool visible) |
Set if face at coordinate is visible. More... | |
void | SetAllFacesVisible (bool visible) |
Set visibility of all faces. More... | |
Textures | |
int | GetTextureCount () const |
Number of textures. More... | |
deHeightTerrainTexture * | GetTextureAt (int index) const |
Texture at index. More... | |
int | IndexOfTexture (deHeightTerrainTexture *texture) const |
Index of texture or -1 if absent. More... | |
bool | HasTexture (deHeightTerrainTexture *texture) const |
Texture is present. More... | |
void | AddTexture (deHeightTerrainTexture *texture) |
Add texture. More... | |
void | RemoveTexture (deHeightTerrainTexture *texture) |
Remove texture. More... | |
void | RemoveAllTextures () |
Remove all textures. More... | |
Decals Management | |
int | GetDecalCount () const |
Number of decals. More... | |
deDecal * | GetRootDecal () const |
Root decal or NULL if there are none. More... | |
void | AddDecal (deDecal *decal) |
Add decal. More... | |
void | RemoveDecal (deDecal *decal) |
Remove decal. More... | |
void | RemoveAllDecals () |
Remove all decals. More... | |
Navigation spaces | |
int | GetNavSpaceCount () const |
Number of navigation spaces. More... | |
deHeightTerrainNavSpace * | GetNavSpaceAt (int index) const |
Navigation space at index. More... | |
int | IndexOfNavSpace (deHeightTerrainNavSpace *navspace) const |
Index of navigation space or -1 if absent. More... | |
bool | HasNavSpace (deHeightTerrainNavSpace *navspace) const |
Navigation space is present. More... | |
void | AddNavSpace (deHeightTerrainNavSpace *navspace) |
Add navigation space. More... | |
void | RemoveNavSpace (deHeightTerrainNavSpace *navspace) |
Remove navigation space. More... | |
void | RemoveAllNavSpaces () |
Remove all navigation spaces. More... | |
void | NotifyNavSpaceLayerChanged (int navspace) |
Notify peers navigation space layer changed. More... | |
void | NotifyNavSpaceTypeChanged (int navspace) |
Notify peers navigation space type changed. More... | |
void | NotifyNavSpaceSnappingChanged (int navspace) |
Notify peers navigation space snapping changed. More... | |
void | NotifyNavSpaceLayoutChanged (int navspace) |
Notify peers navigation space layout changed. More... | |
Height Terrain Sector.
Defines a sector of a height terrain. The height of grid points in each sector are defined using a height image and an offset and scaling. In addition a prop field can be maintained. 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. If the height image is missing all grid points take on the height of the offset parameter.
deHeightTerrainSector::deHeightTerrainSector | ( | const decPoint & | sector | ) |
Create sector.
deHeightTerrainSector::~deHeightTerrainSector | ( | ) |
Clean up sector.
void deHeightTerrainSector::AddDecal | ( | deDecal * | decal | ) |
Add decal.
deeInvalidParam | decal is NULL. |
deeInvalidParam | decal has a parent world. |
void deHeightTerrainSector::AddNavSpace | ( | deHeightTerrainNavSpace * | navspace | ) |
Add navigation space.
void deHeightTerrainSector::AddTexture | ( | deHeightTerrainTexture * | texture | ) |
Add texture.
void deHeightTerrainSector::CalculateHeightExtends | ( | float & | minHeight, |
float & | maxHeight | ||
) |
Calculate height extends.
The extends contain the base height and scaling has been taken into account.
|
inline |
Number of decals.
bool deHeightTerrainSector::GetFaceVisibleAt | ( | int | x, |
int | y | ||
) | const |
Face at coordinate is visible.
|
inline |
Height image or NULL if not set.
|
inline |
Sector index.
deHeightTerrainNavSpace* deHeightTerrainSector::GetNavSpaceAt | ( | int | index | ) | const |
Navigation space at index.
int deHeightTerrainSector::GetNavSpaceCount | ( | ) | const |
Number of navigation spaces.
|
inline |
Parent height terrain.
|
inline |
Root decal or NULL if there are none.
|
inline |
Sector coordinates.
deHeightTerrainTexture* deHeightTerrainSector::GetTextureAt | ( | int | index | ) | const |
Texture at index.
int deHeightTerrainSector::GetTextureCount | ( | ) | const |
Number of textures.
bool deHeightTerrainSector::HasNavSpace | ( | deHeightTerrainNavSpace * | navspace | ) | const |
Navigation space is present.
bool deHeightTerrainSector::HasTexture | ( | deHeightTerrainTexture * | texture | ) | const |
Texture is present.
int deHeightTerrainSector::IndexOfNavSpace | ( | deHeightTerrainNavSpace * | navspace | ) | const |
Index of navigation space or -1 if absent.
int deHeightTerrainSector::IndexOfTexture | ( | deHeightTerrainTexture * | texture | ) | const |
Index of texture or -1 if absent.
void deHeightTerrainSector::NotifyNavSpaceLayerChanged | ( | int | navspace | ) |
Notify peers navigation space layer changed.
void deHeightTerrainSector::NotifyNavSpaceLayoutChanged | ( | int | navspace | ) |
Notify peers navigation space layout changed.
void deHeightTerrainSector::NotifyNavSpaceSnappingChanged | ( | int | navspace | ) |
Notify peers navigation space snapping changed.
void deHeightTerrainSector::NotifyNavSpaceTypeChanged | ( | int | navspace | ) |
Notify peers navigation space type changed.
void deHeightTerrainSector::RemoveAllDecals | ( | ) |
Remove all decals.
void deHeightTerrainSector::RemoveAllNavSpaces | ( | ) |
Remove all navigation spaces.
void deHeightTerrainSector::RemoveAllTextures | ( | ) |
Remove all textures.
void deHeightTerrainSector::RemoveDecal | ( | deDecal * | decal | ) |
Remove decal.
deeInvalidParam | decal is NULL. |
deeInvalidParam | Parent world of decal is not this world. |
void deHeightTerrainSector::RemoveNavSpace | ( | deHeightTerrainNavSpace * | navspace | ) |
Remove navigation space.
void deHeightTerrainSector::RemoveTexture | ( | deHeightTerrainTexture * | texture | ) |
Remove texture.
void deHeightTerrainSector::SetAllFacesVisible | ( | bool | visible | ) |
Set visibility of all faces.
void deHeightTerrainSector::SetFaceVisibleAt | ( | int | x, |
int | y, | ||
bool | visible | ||
) |
Set if face at coordinate is visible.
void deHeightTerrainSector::SetHeightImage | ( | deImage * | heightImage | ) |
Set height image or NULL if not set.
void deHeightTerrainSector::SetIndex | ( | int | index | ) |
Set sector index.
void deHeightTerrainSector::SetParentHeightTerrain | ( | deHeightTerrain * | heightTerrain | ) |
Set parent height terrain.