The module that holds object and scene data of the simulation. It is also responsible for synching it across the server and the client.
|
Public Member Functions |
void | Init () |
| Initializes the module.
|
void | Open (Ogre::SceneManager *mgr, const char *bspfile) |
void | Close () |
| Closes the module for simulation.
|
void | Iterate () |
| Call this at regular intervals for proper functioning.
|
bool | IsServer () |
| Returns whether this module resides in a server application of client application.
|
void | TransmitToAllClients (CPacket *packet) |
| Transmits a packet to all clients. Only valid for the server.
|
void | TransmitToServer (CPacket *packet) |
| Transmits a packet to the server. Only valid for a client.
|
string | MyName () |
| Returns the network id of this module.
|
CObject * | CreateObject () |
| Creates an object in the simulation and returns it.
|
CPlayer * | CreatePlayer () |
| Creates a player in the simulation and returns it.
|
void | Delete (CCommon *obj) |
| Deletes an object or a player in the simulation.
|
CCommon * | GetById (int id) |
CCommon * | GetByName (string name) |
CPlayer * | GetByUser (string usr) |
CPlayer * | GetMyPlayer () |
| Returns the CPlayer instance controlled by the user of this computer.
|
CWorld * | GetWorld () |
| Returns the CWorld instance used by this module.
|
Ogre::SceneManager * | GetSceneManager () |
| Returns the scene manager used that this module is bounded to.
|
void | PlayWav (string filename) |
void | Play3DWav (string filename, Vector3 position, float attdist) |
void | MsgToServer (const char *msg) |
void | MsgToClient (const char *clt, const char *msg) |
void | MsgToAllClients (const char *msg) |
void | MsgSetCB (const char *cb) |
string | MsgGetCB () |
| Gets the name of the lua callback function.
|
void | ResetNext () |
| Resets the enumeration of all of the CCommons in the module. Call this before enumerating the CCommons via Next.
|
CCommon * | Next () |
void | ResetPlayerUsers () |
| Sets the User property of all of the player to "".
|
CCommon * | Clone (CCommon *com) |
| Clones a CCommon and returns it.
|
void | Stick (CCommon *x, CCommon *y) |
void | ForceSynch (CCommon *c) |
| Synhronizes a CCommon between the server and the client.
|
bool | GetOvermapParameters (Vector3 *pos, float *sizeX, float *sizeY, float *camHeight, float *surfaceDist) |
bool | HasOvermap () |
| Returns true if there is an overmap for the current map, false if there isn't.
|
float | GetOvermapZ () |
| Returns the Z component of the overmap position.
|
float | GetGravity () |
| Returns the gravitational acceleration in the simulation.
|
void | SetGravity (float grav) |
| Sets the gravitational acceleration in the simulation.
|
void | SetSelected (CCommon *obj) |
| Selects a CCommon so it is displayed with a bounding box.
|
CCommon * | GetSelected () |
| Returns the selected CCommon.
|
void | SelectThroughRay (Ray ray) |
| Attempts selection of a CCommon with a ray query considering the overmap.
|
void | SelectThroughRay3D (Ray ray) |
| Attempts selection of a CCommon with a ray query considering the scene.
|
void | SetSelectedCB (string cb) |
| Sets the name of the lua callback function for selection. See OPSIMUS Scenario Scripting Guide for details.
|
string | GetSelectedCB () |
| Gets the name of the lua callback function for selection. See OPSIMUS Scenario Scripting Guide for details.
|
void | CommandThroughRay (Ray ray) |
| Commands with a ray query.
|
void | SetCommandCB (string cb) |
| Sets the name of the lua callback function for commands. See OPSIMUS Scenario Scripting Guide for details.
|
string | GetCommandCB () |
| Gets the name of the lua callback function for commands. See OPSIMUS Scenario Scripting Guide for details.
|
void | SetAmbientColor (float r, float g, float b) |
| Sets the ambient light. Parameters are red,green,blue respectively. The parameters should be between 0 and 1 inclusively.
|
void | SetLightDirection (int ltno, Vector3 v) |
void | SetLightColor (int ltno, float r, float g, float b) |
void | SetLightEnabled (int ltno, bool tf) |
void | SerializeLight (CPacket *p) |
| Serializes the currnet light state in to a packet.
|
void | DeserializeLight (CPacket *p) |
| Deserializes the currnet light state from a packet.
|
void | ReceivePacket (CPacket *packet) |
| Derived from CModule_Conn::ReceivePacket. Handles packet receiving tasks.
|
| CObjectModule () |
| Constructor.
|
void | Destroy () |
| Destroys the module.
|
Static Public Member Functions |
static CObjectModule * | GetInstance () |
| sub classes should implement this for easy access to self (which is a singleton)
|
Friends |
class | CCommon |
class | CPlayer |
class | CObject |
The module that holds object and scene data of the simulation. It is also responsible for synching it across the server and the client.