Drag[en]gine Game Engine
1.21
|
Height Terrain. More...
#include <deHeightTerrain.h>
Public Types | |
typedef deTObjectReference< deHeightTerrain > | Ref |
Type holding strong reference. More... | |
Public Types inherited from deResource | |
typedef deTObjectReference< deResource > | Ref |
Type holding strong reference. More... | |
Public Types inherited from deObject | |
typedef deTObjectReference< deObject > | Ref |
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 decCollisionFilter & | GetCollisionFilter () 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... | |
deHeightTerrainSector * | GetSectorAt (int index) const |
Sector at the given index. More... | |
deHeightTerrainSector * | GetSectorWith (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 | |
deBaseGraphicHeightTerrain * | GetPeerGraphic () const |
Graphic system peer object. More... | |
void | SetPeerGraphic (deBaseGraphicHeightTerrain *peer) |
Set graphic system peer object. More... | |
deBasePhysicsHeightTerrain * | GetPeerPhysics () const |
Physics system peer object. More... | |
void | SetPeerPhysics (deBasePhysicsHeightTerrain *peer) |
Set physics system peer object. More... | |
deBaseAudioHeightTerrain * | GetPeerAudio () const |
Audio system peer or NULL. More... | |
void | SetPeerAudio (deBaseAudioHeightTerrain *peer) |
Set Audio system peer or NULL. More... | |
deBaseAIHeightTerrain * | GetPeerAI () const |
AI system peer or NULL. More... | |
void | SetPeerAI (deBaseAIHeightTerrain *peer) |
Set AI system peer or NULL. More... | |
Public Member Functions inherited from deResource | |
deResourceManager * | GetResourceManager () const |
Resource manager or NULL if resource is leaking. More... | |
deEngine * | GetEngine () const |
Game engine object from resource manager. More... | |
deResource * | GetLLManagerPrev () const |
Previous resource in the resource manager linked list. More... | |
void | SetLLManagerPrev (deResource *resource) |
Set next resource in the resource manager linked list. More... | |
deResource * | GetLLManagerNext () 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... | |
Height Terrain.
Defines a height terrain.
Type holding strong reference.
deHeightTerrain::deHeightTerrain | ( | deHeightTerrainManager * | manager, |
float | sectorSize, | ||
int | sectorResolution | ||
) |
Create new height terrain.
[in] | manager | Height terrain manager. |
[in] | sectorSize | Size in meters of sectors along the X and Z axis. |
[in] | sectorResolution | Resolution of sectors (width and height of height images). |
|
protectedvirtual |
Clean up height terrain.
void deHeightTerrain::AddSector | ( | deHeightTerrainSector * | sector | ) |
Adds a sector to the world.
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.
point | Point on the surface to test. |
list | List of decals to fill in. Not emptied before filling. |
void deHeightTerrain::FindDecalsTouching | ( | const decShape & | shape, |
deDecalList & | list | ||
) |
Stores all decals in contact with the given shape into the provided list.
shape | Shape to test. |
list | List of decals to fill in. Not emptied before filling. |
|
inline |
Base height in meters.
|
inline |
Collision filter.
|
inline |
Height scaling.
|
inline |
AI system peer or NULL.
|
inline |
Audio system peer or NULL.
|
inline |
Graphic system peer object.
|
inline |
Physics system peer object.
deHeightTerrainSector* deHeightTerrain::GetSectorAt | ( | int | index | ) | const |
Sector at the given index.
int deHeightTerrain::GetSectorCount | ( | ) | const |
Number of sectors.
|
inline |
Resolution of sectors (width and height of height images).
|
inline |
Size in meters of sectors along the X and Z axis..
deHeightTerrainSector* deHeightTerrain::GetSectorWith | ( | const decPoint & | coordinates | ) | const |
Sector with the given coordinates or NULL if not existing.
void deHeightTerrain::NotifyHeightChanged | ( | const decPoint & | fromSector, |
const decPoint & | fromCoordinates, | ||
const decPoint & | toSector, | ||
const decPoint & | toCoordinates | ||
) |
Notifies the peers that a sector heights changed.
void deHeightTerrain::NotifySectorChanged | ( | int | sector | ) |
Notifies the peers that a sector changed.
void deHeightTerrain::RemoveAllSectors | ( | ) |
Removes all sectors from the world.
void deHeightTerrain::RemoveSector | ( | deHeightTerrainSector * | sector | ) |
Removes the given sector from the world.
void deHeightTerrain::SetBaseHeight | ( | float | height | ) |
Set base height in meters.
void deHeightTerrain::SetCollisionFilter | ( | const decCollisionFilter & | collisionFilter | ) |
Set collision filter.
void deHeightTerrain::SetHeightScaling | ( | float | scaling | ) |
Set height scaling.
void deHeightTerrain::SetPeerAI | ( | deBaseAIHeightTerrain * | peer | ) |
Set AI system peer or NULL.
void deHeightTerrain::SetPeerAudio | ( | deBaseAudioHeightTerrain * | peer | ) |
Set Audio system peer or NULL.
void deHeightTerrain::SetPeerGraphic | ( | deBaseGraphicHeightTerrain * | peer | ) |
Set graphic system peer object.
void deHeightTerrain::SetPeerPhysics | ( | deBasePhysicsHeightTerrain * | peer | ) |
Set physics system peer object.