Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CCmpTerrain Class Reference
Inheritance diagram for CCmpTerrain:
ICmpTerrain IComponent

Public Member Functions

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 ()
 
virtual CFixedVector3D CalcNormal (entity_pos_t x, entity_pos_t z)
 
virtual CVector3D CalcExactNormal (float x, float z)
 
virtual entity_pos_t GetGroundLevel (entity_pos_t x, entity_pos_t z)
 
virtual float GetExactGroundLevel (float x, float z)
 
virtual u16 GetTilesPerSide ()
 Returns number of tiles per side on the terrain. More...
 
virtual u16 GetVerticesPerSide ()
 Returns number of vertices per side on the terrain. More...
 
virtual CTerrainGetCTerrain ()
 
virtual void ReloadTerrain ()
 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 JSClass * GetJSClass () const
 
virtual jsval GetJSInstance () const
 

Static Public Member Functions

static void ClassInit (CComponentManager &componentManager)
 
static IComponentAllocate (ScriptInterface &, jsval)
 
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
 

Detailed Description

Definition at line 32 of file CCmpTerrain.cpp.

Member Function Documentation

static IComponent* CCmpTerrain::Allocate ( ScriptInterface ,
jsval   
)
inlinestatic

Definition at line 39 of file CCmpTerrain.cpp.

virtual CVector3D CCmpTerrain::CalcExactNormal ( float  x,
float  z 
)
inlinevirtual

Implements ICmpTerrain.

Definition at line 78 of file CCmpTerrain.cpp.

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

Implements ICmpTerrain.

Definition at line 71 of file CCmpTerrain.cpp.

static void CCmpTerrain::ClassInit ( CComponentManager componentManager)
inlinestatic

Definition at line 35 of file CCmpTerrain.cpp.

static void CCmpTerrain::Deallocate ( IComponent cmp)
inlinestatic

Definition at line 39 of file CCmpTerrain.cpp.

virtual void CCmpTerrain::Deinit ( )
inlinevirtual

Implements IComponent.

Definition at line 53 of file CCmpTerrain.cpp.

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

Implements IComponent.

Definition at line 61 of file CCmpTerrain.cpp.

virtual CTerrain* CCmpTerrain::GetCTerrain ( )
inlinevirtual

Implements ICmpTerrain.

Definition at line 109 of file CCmpTerrain.cpp.

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

Implements ICmpTerrain.

Definition at line 90 of file CCmpTerrain.cpp.

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

Implements ICmpTerrain.

Definition at line 83 of file CCmpTerrain.cpp.

static std::string CCmpTerrain::GetSchema ( )
inlinestatic

Definition at line 43 of file CCmpTerrain.cpp.

virtual u16 CCmpTerrain::GetTilesPerSide ( )
inlinevirtual

Returns number of tiles per side on the terrain.

Return value is always non-zero.

Implements ICmpTerrain.

Definition at line 95 of file CCmpTerrain.cpp.

virtual u16 CCmpTerrain::GetVerticesPerSide ( )
inlinevirtual

Returns number of vertices per side on the terrain.

Return value is always non-zero.

Implements ICmpTerrain.

Definition at line 102 of file CCmpTerrain.cpp.

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

Implements IComponent.

Definition at line 48 of file CCmpTerrain.cpp.

virtual bool CCmpTerrain::IsLoaded ( )
inlinevirtual

Implements ICmpTerrain.

Definition at line 66 of file CCmpTerrain.cpp.

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.

Definition at line 144 of file CCmpTerrain.cpp.

virtual void CCmpTerrain::ReloadTerrain ( )
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.

Definition at line 114 of file CCmpTerrain.cpp.

virtual void CCmpTerrain::Serialize ( ISerializer serialize)
inlinevirtual

Implements IComponent.

Definition at line 57 of file CCmpTerrain.cpp.

Member Data Documentation

CTerrain* CCmpTerrain::m_Terrain

Definition at line 41 of file CCmpTerrain.cpp.


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