Pyrogenesis  trunk
Public Member Functions | List of all members
ICmpTerrain Class Referenceabstract

#include <ICmpTerrain.h>

Inheritance diagram for ICmpTerrain:
Inheritance graph
[legend]
Collaboration diagram for ICmpTerrain:
Collaboration graph
[legend]

Public Member Functions

virtual bool IsLoaded () const =0
 
virtual CFixedVector3D CalcNormal (entity_pos_t x, entity_pos_t z) const =0
 
virtual CVector3D CalcExactNormal (float x, float z) const =0
 
virtual entity_pos_t GetGroundLevel (entity_pos_t x, entity_pos_t z) const =0
 
virtual float GetExactGroundLevel (float x, float z) const =0
 
virtual u16 GetTilesPerSide () const =0
 Returns number of tiles per side on the terrain. More...
 
virtual u16 GetVerticesPerSide () const =0
 Returns number of vertices per side on the terrain. More...
 
virtual u32 GetMapSize () const =0
 Returns the map size in metres (world space units). More...
 
virtual CTerrainGetCTerrain ()=0
 
virtual void ReloadTerrain (bool ReloadWater=true)=0
 Call when the underlying CTerrain has been modified behind our backs. More...
 
virtual void MakeDirty (i32 i0, i32 j0, i32 i1, i32 j1)=0
 Indicate that terrain tiles within the given region (inclusive lower bound, exclusive upper bound) have been changed. More...
 
- Public Member Functions inherited from IComponent
virtual ~IComponent ()
 
virtual void Init (const CParamNode &paramNode)=0
 
virtual void Deinit ()=0
 
virtual void HandleMessage (const CMessage &msg, bool global)
 
CEntityHandle GetEntityHandle () const
 
void SetEntityHandle (CEntityHandle ent)
 
entity_id_t GetEntityId () const
 
CEntityHandle GetSystemEntity () const
 
const CSimContextGetSimContext () const
 
void SetSimContext (const CSimContext &context)
 
virtual void Serialize (ISerializer &serialize)=0
 
virtual void Deserialize (const CParamNode &paramNode, IDeserializer &deserialize)=0
 
virtual bool NewJSObject (const ScriptInterface &scriptInterface, JS::MutableHandleObject out) const
 Returns false by default, indicating that a scripted wrapper of this IComponent is not supported. More...
 
virtual JS::Value GetJSInstance () const
 
virtual int GetComponentTypeId () const =0
 

Additional Inherited Members

- Public Types inherited from IComponent
using AllocFunc = IComponent *(*)(const ScriptInterface &scriptInterface, JS::HandleValue ctor)
 
using DeallocFunc = void(*)(IComponent *)
 
- Static Public Member Functions inherited from IComponent
static std::string GetSchema ()
 
static void RegisterComponentType (CComponentManager &mgr, EInterfaceId iid, EComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char *name, const std::string &schema)
 
static void RegisterComponentTypeScriptWrapper (CComponentManager &mgr, EInterfaceId iid, EComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char *name, const std::string &schema)
 
static u8 GetSerializationVersion ()
 

Member Function Documentation

◆ CalcExactNormal()

virtual CVector3D ICmpTerrain::CalcExactNormal ( float  x,
float  z 
) const
pure virtual

Implemented in MockTerrain, and CCmpTerrain.

◆ CalcNormal()

virtual CFixedVector3D ICmpTerrain::CalcNormal ( entity_pos_t  x,
entity_pos_t  z 
) const
pure virtual

Implemented in MockTerrain, and CCmpTerrain.

◆ GetCTerrain()

virtual CTerrain* ICmpTerrain::GetCTerrain ( )
pure virtual

Implemented in MockTerrain, and CCmpTerrain.

◆ GetExactGroundLevel()

virtual float ICmpTerrain::GetExactGroundLevel ( float  x,
float  z 
) const
pure virtual

Implemented in MockTerrain, and CCmpTerrain.

◆ GetGroundLevel()

virtual entity_pos_t ICmpTerrain::GetGroundLevel ( entity_pos_t  x,
entity_pos_t  z 
) const
pure virtual

Implemented in MockTerrain, and CCmpTerrain.

◆ GetMapSize()

virtual u32 ICmpTerrain::GetMapSize ( ) const
pure virtual

Returns the map size in metres (world space units).

Implemented in MockTerrain, and CCmpTerrain.

◆ GetTilesPerSide()

virtual u16 ICmpTerrain::GetTilesPerSide ( ) const
pure virtual

Returns number of tiles per side on the terrain.

Return value is always non-zero.

Implemented in MockTerrain, and CCmpTerrain.

◆ GetVerticesPerSide()

virtual u16 ICmpTerrain::GetVerticesPerSide ( ) const
pure virtual

Returns number of vertices per side on the terrain.

Return value is always non-zero.

Implemented in MockTerrain, and CCmpTerrain.

◆ IsLoaded()

virtual bool ICmpTerrain::IsLoaded ( ) const
pure virtual

Implemented in MockTerrain, and CCmpTerrain.

◆ MakeDirty()

virtual void ICmpTerrain::MakeDirty ( i32  i0,
i32  j0,
i32  i1,
i32  j1 
)
pure virtual

Indicate that terrain tiles within the given region (inclusive lower bound, exclusive upper bound) have been changed.

CMessageTerrainChanged will be sent to any components that care about terrain changes.

Implemented in MockTerrain, and CCmpTerrain.

◆ ReloadTerrain()

virtual void ICmpTerrain::ReloadTerrain ( bool  ReloadWater = true)
pure virtual

Call when the underlying CTerrain has been modified behind our backs.

(TODO: eventually we should manage the CTerrain in this class so nobody can modify it behind our backs).

Implemented in MockTerrain, and CCmpTerrain.


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