My Project
Public Types | Public Member Functions | Static Public Member Functions | List of all members
ParaEngine::IEnvironmentSim Class Referenceabstract

environment simulator. More...

#include <IEnvironmentSim.h>

Inheritance diagram for ParaEngine::IEnvironmentSim:
ParaEngine::CEnvironmentSim ParaEngine::CEnvSimClient ParaEngine::CEnvSimServer

Public Types

enum  SIMULATOR_TYPE { SIM_TYPE_STANDALONE = 0, SIM_TYPE_SERVER = 1, SIM_TYPE_CLIENT = 2 }
 

Public Member Functions

virtual SIMULATOR_TYPE GetSimulatorType ()=0
 return the current type of simulator. More...
 
virtual void Animate (double dTimeDelta)=0
 called each frame to simulate the game world. More...
 
virtual void CheckLoadPhysics (CShapeSphere *points, int nPointCount=1)=0
 when this function is called, it ensures that the physics object around one or more points are properly loaded. More...
 
void CheckLoadPhysics (const Vector3 &vCenter, float fRadius)
 
virtual void Release ()=0
 delete this object. More...
 
virtual CNetTimeGetNetTime ()
 get the net time object More...
 

Static Public Member Functions

static void EnableLog (bool bWriteLog)
 
static bool IsLogEnabled ()
 

Detailed Description

environment simulator.

Member Function Documentation

§ Animate()

virtual void ParaEngine::IEnvironmentSim::Animate ( double  dTimeDelta)
pure virtual

called each frame to simulate the game world.

Parameters
dTimeDeltain seconds.

Implemented in ParaEngine::CEnvironmentSim, ParaEngine::CEnvSimServer, and ParaEngine::CEnvSimClient.

§ CheckLoadPhysics()

virtual void ParaEngine::IEnvironmentSim::CheckLoadPhysics ( CShapeSphere points,
int  nPointCount = 1 
)
pure virtual

when this function is called, it ensures that the physics object around one or more points are properly loaded.

It increases the hit count of these physics objects by 1. The garbage collector in the physics world may use the hit count to move out unused static physics object from the physics scene (Novodex). This function might be called for the current player, each active mobile object in the scene and the camera eye position.

Parameters
pointsif not NULL, it will further check if it hits any of the sphere points.
nPointCountthe number of points defined in points.

Implemented in ParaEngine::CEnvironmentSim.

§ GetNetTime()

virtual CNetTime* ParaEngine::IEnvironmentSim::GetNetTime ( )
inlinevirtual

get the net time object

Returns

Reimplemented in ParaEngine::CEnvSimServer, and ParaEngine::CEnvSimClient.

§ GetSimulatorType()

virtual SIMULATOR_TYPE ParaEngine::IEnvironmentSim::GetSimulatorType ( )
pure virtual

return the current type of simulator.

0 means standalone simulator, 1 means server, 2 means client.

Implemented in ParaEngine::CEnvironmentSim, ParaEngine::CEnvSimServer, and ParaEngine::CEnvSimClient.

§ Release()

virtual void ParaEngine::IEnvironmentSim::Release ( )
pure virtual

delete this object.

Such as Delete this;

Implemented in ParaEngine::CEnvironmentSim, ParaEngine::CEnvSimServer, and ParaEngine::CEnvSimClient.


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