Drag[en]gine Game Engine  1.0
deHeightTerrain Class Reference

Height Terrain. More...

#include <deHeightTerrain.h>

Inheritance diagram for deHeightTerrain:
deResource deObject

Public Member Functions

Management
float GetSectorDimension () const
 
int GetHeightImageSize () const
 
decCollisionFilterGetCollisionFilter ()
 Retrieves the collision filter. More...
 
const decCollisionFilterGetCollisionFilter () const
 
void NotifyCollisionFilterChanged ()
 Notifies the peers that the collision filter changed. More...
 
void NotifyHeightChanged (const decPoint &fromSector, const decPoint &fromCoordinates, const decPoint &toSector, const decPoint &toCoordinates)
 
Sectors
int GetSectorCount () const
 
deHeightTerrainSectorGetSectorAt (int index) const
 
deHeightTerrainSectorGetSectorWith (const decPoint &coordinates) const
 
int IndexOfSector (deHeightTerrainSector *sector) const
 
void AddSector (deHeightTerrainSector *sector)
 
void RemoveSector (deHeightTerrainSector *sector)
 
void RemoveAllSectors ()
 
void NotifySectorChanged (int sector)
 
Decals
int GetDecalCount () const
 
deDecalGetDecalAt (int index) const
 
int IndexOfDecal (deDecal *decal) const
 
void AddDecal (deDecal *decal)
 
void RemoveDecal (deDecal *decal)
 
void RemoveAllDecals ()
 
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 index)
 Notify peers navigation space layer changed. More...
 
void NotifyNavSpaceTypeChanged (int index)
 Notify peers navigation space type changed. More...
 
void NotifyNavSpaceSnappingChanged (int index)
 Notify peers navigation space snapping changed. More...
 
void NotifyNavSpaceLayoutChanged (int index)
 Notify peers navigation space layout changed. More...
 
System Peers
deBaseGraphicHeightTerrainGetGraphicHeightTerrain () const
 
void SetGraphicHeightTerrain (deBaseGraphicHeightTerrain *peer)
 
deBasePhysicsHeightTerrainGetPhysicsHeightTerrain () const
 
void SetPhysicsHeightTerrain (deBasePhysicsHeightTerrain *peer)
 
deBaseAIHeightTerrainGetPeerAI () const
 AI system peer or NULL. More...
 
void SetPeerAI (deBaseAIHeightTerrain *peer)
 Set AI system peer or NULL. More...
 
Collision Detection
void FindDecalsAt (const decDVector &point, deDecalList *list)
 
void FindDecalsTouching (decShape *shape, deDecalList *list)
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 deHeightTerrain (deHeightTerrainManager *manager, float sectorSize, int heightImageSize)
 
virtual ~deHeightTerrain ()
 Clean up height terrain. More...
 

Additional Inherited Members

- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Height Terrain.

Defines a height terrain.

Author
Pl├╝ss Roland
Version
1.0
Date
2009

Constructor & Destructor Documentation

◆ deHeightTerrain()

deHeightTerrain::deHeightTerrain ( deHeightTerrainManager manager,
float  sectorSize,
int  heightImageSize 
)

Creates a new height terrain.

◆ ~deHeightTerrain()

virtual deHeightTerrain::~deHeightTerrain ( )
protectedvirtual

Clean up height terrain.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ AddDecal()

void deHeightTerrain::AddDecal ( deDecal decal)

Adds a decal to the world.

Referenced by GetDecalCount().

◆ AddNavSpace()

void deHeightTerrain::AddNavSpace ( deHeightTerrainNavSpace navspace)

Add navigation space.

Referenced by GetDecalCount().

◆ AddSector()

void deHeightTerrain::AddSector ( deHeightTerrainSector sector)

Adds a sector to the world.

Referenced by GetSectorCount().

◆ FindDecalsAt()

void deHeightTerrain::FindDecalsAt ( const decDVector point,
deDecalList list 
)

Stores all decals in contact with the given surface point into the provided list. The point is best taken from an earlier collision test and is in world coordinates.

Parameters
pointPoint on the surface to test.
listList of decals to fill in. Not emptied before filling.

Referenced by GetPeerAI().

◆ FindDecalsTouching()

void deHeightTerrain::FindDecalsTouching ( decShape shape,
deDecalList list 
)

Stores all decals in contact with the given shape into the provided list.

Parameters
shapeShape to test.
listList of decals to fill in. Not emptied before filling.

Referenced by GetPeerAI().

◆ GetCollisionFilter() [1/2]

decCollisionFilter& deHeightTerrain::GetCollisionFilter ( )
inline

Retrieves the collision filter.

Call NotifyCollisionFilterChanged if you change the collision filter.

◆ GetCollisionFilter() [2/2]

const decCollisionFilter& deHeightTerrain::GetCollisionFilter ( ) const
inline

◆ GetDecalAt()

deDecal* deHeightTerrain::GetDecalAt ( int  index) const

Retrieves the decal at the given index.

Referenced by GetDecalCount().

◆ GetDecalCount()

◆ GetGraphicHeightTerrain()

deBaseGraphicHeightTerrain* deHeightTerrain::GetGraphicHeightTerrain ( ) const
inline

Retrieves the graphic system peer object.

References SetGraphicHeightTerrain().

◆ GetHeightImageSize()

int deHeightTerrain::GetHeightImageSize ( ) const
inline

Retrieves the size of the height images.

◆ GetNavSpaceAt()

deHeightTerrainNavSpace* deHeightTerrain::GetNavSpaceAt ( int  index) const

Navigation space at index.

Referenced by GetDecalCount().

◆ GetNavSpaceCount()

int deHeightTerrain::GetNavSpaceCount ( ) const

Number of navigation spaces.

Referenced by GetDecalCount().

◆ GetPeerAI()

deBaseAIHeightTerrain* deHeightTerrain::GetPeerAI ( ) const
inline

AI system peer or NULL.

References FindDecalsAt(), FindDecalsTouching(), and SetPeerAI().

◆ GetPhysicsHeightTerrain()

deBasePhysicsHeightTerrain* deHeightTerrain::GetPhysicsHeightTerrain ( ) const
inline

Retrieves the physics system peer object.

References SetPhysicsHeightTerrain().

◆ GetSectorAt()

deHeightTerrainSector* deHeightTerrain::GetSectorAt ( int  index) const

Retrieves the sector at the given index.

Referenced by GetSectorCount().

◆ GetSectorCount()

int deHeightTerrain::GetSectorCount ( ) const
inline

◆ GetSectorDimension()

float deHeightTerrain::GetSectorDimension ( ) const
inline

Retrieves the dimension of each sector in meters.

◆ GetSectorWith()

deHeightTerrainSector* deHeightTerrain::GetSectorWith ( const decPoint coordinates) const

Retrieves the sector with the given coordinates or NULL if not existing.

Referenced by GetSectorCount().

◆ HasNavSpace()

bool deHeightTerrain::HasNavSpace ( deHeightTerrainNavSpace navspace) const

Navigation space is present.

Referenced by GetDecalCount().

◆ IndexOfDecal()

int deHeightTerrain::IndexOfDecal ( deDecal decal) const

Retrieves the index of the given decal of -1 if not found.

Referenced by GetDecalCount().

◆ IndexOfNavSpace()

int deHeightTerrain::IndexOfNavSpace ( deHeightTerrainNavSpace navspace) const

Index of navigation space or -1 if absent.

Referenced by GetDecalCount().

◆ IndexOfSector()

int deHeightTerrain::IndexOfSector ( deHeightTerrainSector sector) const

Retrieves the index of the given sector of -1 if not found.

Referenced by GetSectorCount().

◆ NotifyCollisionFilterChanged()

void deHeightTerrain::NotifyCollisionFilterChanged ( )

Notifies the peers that the collision filter changed.

Referenced by GetCollisionFilter().

◆ NotifyHeightChanged()

void deHeightTerrain::NotifyHeightChanged ( const decPoint fromSector,
const decPoint fromCoordinates,
const decPoint toSector,
const decPoint toCoordinates 
)

Notifies the peers that a sector heights changed.

Referenced by GetCollisionFilter().

◆ NotifyNavSpaceLayerChanged()

void deHeightTerrain::NotifyNavSpaceLayerChanged ( int  index)

Notify peers navigation space layer changed.

Referenced by GetDecalCount().

◆ NotifyNavSpaceLayoutChanged()

void deHeightTerrain::NotifyNavSpaceLayoutChanged ( int  index)

Notify peers navigation space layout changed.

Referenced by GetDecalCount().

◆ NotifyNavSpaceSnappingChanged()

void deHeightTerrain::NotifyNavSpaceSnappingChanged ( int  index)

Notify peers navigation space snapping changed.

Referenced by GetDecalCount().

◆ NotifyNavSpaceTypeChanged()

void deHeightTerrain::NotifyNavSpaceTypeChanged ( int  index)

Notify peers navigation space type changed.

Referenced by GetDecalCount().

◆ NotifySectorChanged()

void deHeightTerrain::NotifySectorChanged ( int  sector)

Notifies the peers that a sector changed.

Referenced by GetSectorCount().

◆ RemoveAllDecals()

void deHeightTerrain::RemoveAllDecals ( )

Removes all decals from the world.

Referenced by GetDecalCount().

◆ RemoveAllNavSpaces()

void deHeightTerrain::RemoveAllNavSpaces ( )

Remove all navigation spaces.

Referenced by GetDecalCount().

◆ RemoveAllSectors()

void deHeightTerrain::RemoveAllSectors ( )

Removes all sectors from the world.

Referenced by GetSectorCount().

◆ RemoveDecal()

void deHeightTerrain::RemoveDecal ( deDecal decal)

Removes the given decal from the world.

Referenced by GetDecalCount().

◆ RemoveNavSpace()

void deHeightTerrain::RemoveNavSpace ( deHeightTerrainNavSpace navspace)

Remove navigation space.

Referenced by GetDecalCount().

◆ RemoveSector()

void deHeightTerrain::RemoveSector ( deHeightTerrainSector sector)

Removes the given sector from the world.

Referenced by GetSectorCount().

◆ SetGraphicHeightTerrain()

void deHeightTerrain::SetGraphicHeightTerrain ( deBaseGraphicHeightTerrain peer)

Sets the graphic system peer object.

Referenced by GetGraphicHeightTerrain().

◆ SetPeerAI()

void deHeightTerrain::SetPeerAI ( deBaseAIHeightTerrain peer)

Set AI system peer or NULL.

Referenced by GetPeerAI().

◆ SetPhysicsHeightTerrain()

void deHeightTerrain::SetPhysicsHeightTerrain ( deBasePhysicsHeightTerrain peer)

Sets the physics system peer object.

Referenced by GetPhysicsHeightTerrain().


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