Drag[en]gine Game Engine  1.21
deHeightTerrainSector Class Reference

Height Terrain Sector. More...

#include <deHeightTerrainSector.h>

Public Member Functions

Constructors and Destructors
 deHeightTerrainSector (const decPoint &sector)
 Create sector. More...
 
 ~deHeightTerrainSector ()
 Clean up sector. More...
 
Management
const decPointGetSector () const
 Sector coordinates. More...
 
deHeightTerrainGetParentHeightTerrain () 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...
 
deImageGetHeightImage () 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...
 
deHeightTerrainTextureGetTextureAt (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...
 
deDecalGetRootDecal () 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...
 
deHeightTerrainNavSpaceGetNavSpaceAt (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ deHeightTerrainSector()

deHeightTerrainSector::deHeightTerrainSector ( const decPoint sector)

Create sector.

◆ ~deHeightTerrainSector()

deHeightTerrainSector::~deHeightTerrainSector ( )

Clean up sector.

Member Function Documentation

◆ AddDecal()

void deHeightTerrainSector::AddDecal ( deDecal decal)

Add decal.

Exceptions
deeInvalidParamdecal is NULL.
deeInvalidParamdecal has a parent world.

◆ AddNavSpace()

void deHeightTerrainSector::AddNavSpace ( deHeightTerrainNavSpace navspace)

Add navigation space.

◆ AddTexture()

void deHeightTerrainSector::AddTexture ( deHeightTerrainTexture texture)

Add texture.

◆ CalculateHeightExtends()

void deHeightTerrainSector::CalculateHeightExtends ( float &  minHeight,
float &  maxHeight 
)

Calculate height extends.

The extends contain the base height and scaling has been taken into account.

◆ GetDecalCount()

int deHeightTerrainSector::GetDecalCount ( ) const
inline

Number of decals.

◆ GetFaceVisibleAt()

bool deHeightTerrainSector::GetFaceVisibleAt ( int  x,
int  y 
) const

Face at coordinate is visible.

◆ GetHeightImage()

deImage* deHeightTerrainSector::GetHeightImage ( ) const
inline

Height image or NULL if not set.

◆ GetIndex()

int deHeightTerrainSector::GetIndex ( ) const
inline

Sector index.

◆ GetNavSpaceAt()

deHeightTerrainNavSpace* deHeightTerrainSector::GetNavSpaceAt ( int  index) const

Navigation space at index.

◆ GetNavSpaceCount()

int deHeightTerrainSector::GetNavSpaceCount ( ) const

Number of navigation spaces.

◆ GetParentHeightTerrain()

deHeightTerrain* deHeightTerrainSector::GetParentHeightTerrain ( ) const
inline

Parent height terrain.

◆ GetRootDecal()

deDecal* deHeightTerrainSector::GetRootDecal ( ) const
inline

Root decal or NULL if there are none.

◆ GetSector()

const decPoint& deHeightTerrainSector::GetSector ( ) const
inline

Sector coordinates.

◆ GetTextureAt()

deHeightTerrainTexture* deHeightTerrainSector::GetTextureAt ( int  index) const

Texture at index.

◆ GetTextureCount()

int deHeightTerrainSector::GetTextureCount ( ) const

Number of textures.

◆ HasNavSpace()

bool deHeightTerrainSector::HasNavSpace ( deHeightTerrainNavSpace navspace) const

Navigation space is present.

◆ HasTexture()

bool deHeightTerrainSector::HasTexture ( deHeightTerrainTexture texture) const

Texture is present.

◆ IndexOfNavSpace()

int deHeightTerrainSector::IndexOfNavSpace ( deHeightTerrainNavSpace navspace) const

Index of navigation space or -1 if absent.

◆ IndexOfTexture()

int deHeightTerrainSector::IndexOfTexture ( deHeightTerrainTexture texture) const

Index of texture or -1 if absent.

◆ NotifyNavSpaceLayerChanged()

void deHeightTerrainSector::NotifyNavSpaceLayerChanged ( int  navspace)

Notify peers navigation space layer changed.

◆ NotifyNavSpaceLayoutChanged()

void deHeightTerrainSector::NotifyNavSpaceLayoutChanged ( int  navspace)

Notify peers navigation space layout changed.

◆ NotifyNavSpaceSnappingChanged()

void deHeightTerrainSector::NotifyNavSpaceSnappingChanged ( int  navspace)

Notify peers navigation space snapping changed.

◆ NotifyNavSpaceTypeChanged()

void deHeightTerrainSector::NotifyNavSpaceTypeChanged ( int  navspace)

Notify peers navigation space type changed.

◆ RemoveAllDecals()

void deHeightTerrainSector::RemoveAllDecals ( )

Remove all decals.

◆ RemoveAllNavSpaces()

void deHeightTerrainSector::RemoveAllNavSpaces ( )

Remove all navigation spaces.

◆ RemoveAllTextures()

void deHeightTerrainSector::RemoveAllTextures ( )

Remove all textures.

◆ RemoveDecal()

void deHeightTerrainSector::RemoveDecal ( deDecal decal)

Remove decal.

Exceptions
deeInvalidParamdecal is NULL.
deeInvalidParamParent world of decal is not this world.

◆ RemoveNavSpace()

void deHeightTerrainSector::RemoveNavSpace ( deHeightTerrainNavSpace navspace)

Remove navigation space.

◆ RemoveTexture()

void deHeightTerrainSector::RemoveTexture ( deHeightTerrainTexture texture)

Remove texture.

◆ SetAllFacesVisible()

void deHeightTerrainSector::SetAllFacesVisible ( bool  visible)

Set visibility of all faces.

◆ SetFaceVisibleAt()

void deHeightTerrainSector::SetFaceVisibleAt ( int  x,
int  y,
bool  visible 
)

Set if face at coordinate is visible.

◆ SetHeightImage()

void deHeightTerrainSector::SetHeightImage ( deImage heightImage)

Set height image or NULL if not set.

◆ SetIndex()

void deHeightTerrainSector::SetIndex ( int  index)

Set sector index.

◆ SetParentHeightTerrain()

void deHeightTerrainSector::SetParentHeightTerrain ( deHeightTerrain heightTerrain)

Set parent height terrain.


The documentation for this class was generated from the following file: