Drag[en]gine Game Engine  1.21
deHeightTerrain Class Reference

Height Terrain. More...

#include <deHeightTerrain.h>

Inheritance diagram for deHeightTerrain:
deResource deObject

Public Types

typedef deTObjectReference< deHeightTerrainRef
 Type holding strong reference. More...
 
- Public Types inherited from deResource
typedef deTObjectReference< deResourceRef
 Type holding strong reference. More...
 
- Public Types inherited from deObject
typedef deTObjectReference< deObjectRef
 Type holding strong reference. More...
 

Public Member Functions

Management
float GetSectorSize () const
 Size in meters of sectors along the X and Z axis.. More...
 
int GetSectorResolution () const
 Resolution of sectors (width and height of height images). More...
 
float GetBaseHeight () const
 Base height in meters. More...
 
void SetBaseHeight (float height)
 Set base height in meters. More...
 
float GetHeightScaling () const
 Height scaling. More...
 
void SetHeightScaling (float scaling)
 Set height scaling. More...
 
const decCollisionFilterGetCollisionFilter () const
 Collision filter. More...
 
void SetCollisionFilter (const decCollisionFilter &collisionFilter)
 Set collision filter. More...
 
void NotifyHeightChanged (const decPoint &fromSector, const decPoint &fromCoordinates, const decPoint &toSector, const decPoint &toCoordinates)
 Notifies the peers that a sector heights changed. More...
 
Sectors
int GetSectorCount () const
 Number of sectors. More...
 
deHeightTerrainSectorGetSectorAt (int index) const
 Sector at the given index. More...
 
deHeightTerrainSectorGetSectorWith (const decPoint &coordinates) const
 Sector with the given coordinates or NULL if not existing. More...
 
void AddSector (deHeightTerrainSector *sector)
 Adds a sector to the world. More...
 
void RemoveSector (deHeightTerrainSector *sector)
 Removes the given sector from the world. More...
 
void RemoveAllSectors ()
 Removes all sectors from the world. More...
 
void NotifySectorChanged (int sector)
 Notifies the peers that a sector changed. More...
 
System Peers
deBaseGraphicHeightTerrainGetPeerGraphic () const
 Graphic system peer object. More...
 
void SetPeerGraphic (deBaseGraphicHeightTerrain *peer)
 Set graphic system peer object. More...
 
deBasePhysicsHeightTerrainGetPeerPhysics () const
 Physics system peer object. More...
 
void SetPeerPhysics (deBasePhysicsHeightTerrain *peer)
 Set physics system peer object. More...
 
deBaseAudioHeightTerrainGetPeerAudio () const
 Audio system peer or NULL. More...
 
void SetPeerAudio (deBaseAudioHeightTerrain *peer)
 Set Audio system peer or NULL. More...
 
deBaseAIHeightTerrainGetPeerAI () const
 AI system peer or NULL. More...
 
void SetPeerAI (deBaseAIHeightTerrain *peer)
 Set AI system peer or NULL. More...
 
- 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 sectorResolution)
 Create new height terrain. More...
 
virtual ~deHeightTerrain ()
 Clean up height terrain. More...
 

Collision Detection

void FindDecalsAt (const decDVector &point, deDecalList &list)
 
void FindDecalsTouching (const decShape &shape, deDecalList &list)
 

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.

Member Typedef Documentation

◆ Ref

Type holding strong reference.

Constructor & Destructor Documentation

◆ deHeightTerrain()

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

Create new height terrain.

Parameters
[in]managerHeight terrain manager.
[in]sectorSizeSize in meters of sectors along the X and Z axis.
[in]sectorResolutionResolution of sectors (width and height of height images).

◆ ~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

◆ AddSector()

void deHeightTerrain::AddSector ( deHeightTerrainSector sector)

Adds a sector to the world.

◆ 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.

◆ FindDecalsTouching()

void deHeightTerrain::FindDecalsTouching ( const 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.

◆ GetBaseHeight()

float deHeightTerrain::GetBaseHeight ( ) const
inline

Base height in meters.

◆ GetCollisionFilter()

const decCollisionFilter& deHeightTerrain::GetCollisionFilter ( ) const
inline

Collision filter.

◆ GetHeightScaling()

float deHeightTerrain::GetHeightScaling ( ) const
inline

Height scaling.

◆ GetPeerAI()

deBaseAIHeightTerrain* deHeightTerrain::GetPeerAI ( ) const
inline

AI system peer or NULL.

◆ GetPeerAudio()

deBaseAudioHeightTerrain* deHeightTerrain::GetPeerAudio ( ) const
inline

Audio system peer or NULL.

◆ GetPeerGraphic()

deBaseGraphicHeightTerrain* deHeightTerrain::GetPeerGraphic ( ) const
inline

Graphic system peer object.

◆ GetPeerPhysics()

deBasePhysicsHeightTerrain* deHeightTerrain::GetPeerPhysics ( ) const
inline

Physics system peer object.

◆ GetSectorAt()

deHeightTerrainSector* deHeightTerrain::GetSectorAt ( int  index) const

Sector at the given index.

◆ GetSectorCount()

int deHeightTerrain::GetSectorCount ( ) const

Number of sectors.

◆ GetSectorResolution()

int deHeightTerrain::GetSectorResolution ( ) const
inline

Resolution of sectors (width and height of height images).

◆ GetSectorSize()

float deHeightTerrain::GetSectorSize ( ) const
inline

Size in meters of sectors along the X and Z axis..

◆ GetSectorWith()

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

Sector with the given coordinates or NULL if not existing.

◆ NotifyHeightChanged()

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

Notifies the peers that a sector heights changed.

◆ NotifySectorChanged()

void deHeightTerrain::NotifySectorChanged ( int  sector)

Notifies the peers that a sector changed.

◆ RemoveAllSectors()

void deHeightTerrain::RemoveAllSectors ( )

Removes all sectors from the world.

◆ RemoveSector()

void deHeightTerrain::RemoveSector ( deHeightTerrainSector sector)

Removes the given sector from the world.

◆ SetBaseHeight()

void deHeightTerrain::SetBaseHeight ( float  height)

Set base height in meters.

◆ SetCollisionFilter()

void deHeightTerrain::SetCollisionFilter ( const decCollisionFilter collisionFilter)

Set collision filter.

◆ SetHeightScaling()

void deHeightTerrain::SetHeightScaling ( float  scaling)

Set height scaling.

◆ SetPeerAI()

void deHeightTerrain::SetPeerAI ( deBaseAIHeightTerrain peer)

Set AI system peer or NULL.

◆ SetPeerAudio()

void deHeightTerrain::SetPeerAudio ( deBaseAudioHeightTerrain peer)

Set Audio system peer or NULL.

◆ SetPeerGraphic()

void deHeightTerrain::SetPeerGraphic ( deBaseGraphicHeightTerrain peer)

Set graphic system peer object.

◆ SetPeerPhysics()

void deHeightTerrain::SetPeerPhysics ( deBasePhysicsHeightTerrain peer)

Set physics system peer object.


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