Pyrogenesis  trunk
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CCmpTerrain Class Reference
Inheritance diagram for CCmpTerrain:
Inheritance graph
[legend]
Collaboration diagram for CCmpTerrain:
Collaboration graph
[legend]

Public Member Functions

virtual int GetComponentTypeId () const
 
virtual void Init (const CParamNode &paramNode)
 
virtual void Deinit ()
 
virtual void Serialize (ISerializer &serialize)
 
virtual void Deserialize (const CParamNode &paramNode, IDeserializer &deserialize)
 
virtual bool IsLoaded () const
 
virtual CFixedVector3D CalcNormal (entity_pos_t x, entity_pos_t z) const
 
virtual CVector3D CalcExactNormal (float x, float z) const
 
virtual entity_pos_t GetGroundLevel (entity_pos_t x, entity_pos_t z) const
 
virtual float GetExactGroundLevel (float x, float z) const
 
virtual u16 GetTilesPerSide () const
 Returns number of tiles per side on the terrain. More...
 
virtual u16 GetVerticesPerSide () const
 Returns number of vertices per side on the terrain. More...
 
virtual CTerrainGetCTerrain ()
 
virtual void ReloadTerrain (bool ReloadWater)
 Call when the underlying CTerrain has been modified behind our backs. More...
 
virtual void MakeDirty (i32 i0, i32 j0, i32 i1, i32 j1)
 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 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 bool NewJSObject (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
 

Static Public Member Functions

static void ClassInit (CComponentManager &componentManager)
 
static IComponentAllocate (ScriptInterface &, JS::HandleValue)
 
static void Deallocate (IComponent *cmp)
 
static std::string GetSchema ()
 
- Static Public Member Functions inherited from IComponent
static std::string GetSchema ()
 
static u8 GetSerializationVersion ()
 

Public Attributes

CTerrainm_Terrain
 

Member Function Documentation

static IComponent* CCmpTerrain::Allocate ( ScriptInterface ,
JS::HandleValue   
)
inlinestatic
virtual CVector3D CCmpTerrain::CalcExactNormal ( float  x,
float  z 
) const
inlinevirtual

Implements ICmpTerrain.

virtual CFixedVector3D CCmpTerrain::CalcNormal ( entity_pos_t  x,
entity_pos_t  z 
) const
inlinevirtual

Implements ICmpTerrain.

static void CCmpTerrain::ClassInit ( CComponentManager componentManager)
inlinestatic
static void CCmpTerrain::Deallocate ( IComponent cmp)
inlinestatic
virtual void CCmpTerrain::Deinit ( )
inlinevirtual

Implements IComponent.

virtual void CCmpTerrain::Deserialize ( const CParamNode paramNode,
IDeserializer deserialize 
)
inlinevirtual

Implements IComponent.

virtual int CCmpTerrain::GetComponentTypeId ( ) const
inlinevirtual

Implements IComponent.

virtual CTerrain* CCmpTerrain::GetCTerrain ( )
inlinevirtual

Implements ICmpTerrain.

virtual float CCmpTerrain::GetExactGroundLevel ( float  x,
float  z 
) const
inlinevirtual

Implements ICmpTerrain.

virtual entity_pos_t CCmpTerrain::GetGroundLevel ( entity_pos_t  x,
entity_pos_t  z 
) const
inlinevirtual

Implements ICmpTerrain.

static std::string CCmpTerrain::GetSchema ( )
inlinestatic
virtual u16 CCmpTerrain::GetTilesPerSide ( ) const
inlinevirtual

Returns number of tiles per side on the terrain.

Return value is always non-zero.

Implements ICmpTerrain.

virtual u16 CCmpTerrain::GetVerticesPerSide ( ) const
inlinevirtual

Returns number of vertices per side on the terrain.

Return value is always non-zero.

Implements ICmpTerrain.

virtual void CCmpTerrain::Init ( const CParamNode paramNode)
inlinevirtual

Implements IComponent.

virtual bool CCmpTerrain::IsLoaded ( ) const
inlinevirtual

Implements ICmpTerrain.

virtual void CCmpTerrain::MakeDirty ( i32  i0,
i32  j0,
i32  i1,
i32  j1 
)
inlinevirtual

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.

Implements ICmpTerrain.

virtual void CCmpTerrain::ReloadTerrain ( bool  ReloadWater)
inlinevirtual

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

Implements ICmpTerrain.

virtual void CCmpTerrain::Serialize ( ISerializer serialize)
inlinevirtual

Implements IComponent.

Member Data Documentation

CTerrain* CCmpTerrain::m_Terrain

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