Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
MockTerrain Class Reference

Simple terrain implementation with constant height of 50. More...

#include <ComponentTest.h>

Inheritance diagram for MockTerrain:
ICmpTerrain IComponent

Public Member Functions

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 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...
 
virtual void ReloadTerrain ()
 Call when the underlying CTerrain has been modified behind our backs. 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 JSClass * GetJSClass () const
 
virtual jsval GetJSInstance () const
 

Additional Inherited Members

- Static Public Member Functions inherited from IComponent
static std::string GetSchema ()
 
static u8 GetSerializationVersion ()
 

Detailed Description

Simple terrain implementation with constant height of 50.

Definition at line 180 of file ComponentTest.h.

Member Function Documentation

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

Implements ICmpTerrain.

Definition at line 195 of file ComponentTest.h.

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

Implements ICmpTerrain.

Definition at line 190 of file ComponentTest.h.

virtual CTerrain* MockTerrain::GetCTerrain ( )
inlinevirtual

Implements ICmpTerrain.

Definition at line 220 of file ComponentTest.h.

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

Implements ICmpTerrain.

Definition at line 205 of file ComponentTest.h.

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

Implements ICmpTerrain.

Definition at line 200 of file ComponentTest.h.

virtual u16 MockTerrain::GetTilesPerSide ( )
inlinevirtual

Returns number of tiles per side on the terrain.

Return value is always non-zero.

Implements ICmpTerrain.

Definition at line 210 of file ComponentTest.h.

virtual u16 MockTerrain::GetVerticesPerSide ( )
inlinevirtual

Returns number of vertices per side on the terrain.

Return value is always non-zero.

Implements ICmpTerrain.

Definition at line 215 of file ComponentTest.h.

virtual bool MockTerrain::IsLoaded ( )
inlinevirtual

Implements ICmpTerrain.

Definition at line 185 of file ComponentTest.h.

virtual void MockTerrain::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 225 of file ComponentTest.h.

virtual void MockTerrain::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 229 of file ComponentTest.h.


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