Planeshift
|
This is a helper class that defines a mesh on the server. More...
#include <npcmesh.h>
Public Member Functions | |
iMeshWrapper * | GetMesh () |
Get the Crystal Space iMeshWrapper from this. | |
iMeshFactoryWrapper * | LoadMeshFactory (const char *fileName, const char *factoryName) |
Load a mesh factory. | |
void | MoveMesh (iSector *sector, const csVector3 &position) |
Move a mesh. | |
npcMesh (iObjectRegistry *objreg, gemNPCObject *owner, psNPCClient *super) | |
Create a new gem Mesh. | |
void | RemoveMesh () |
Removes the mesh from the engine. | |
bool | SetMesh (const char *factoryName, const char *fileName) |
Set a mesh. | |
void | SetMesh (iMeshWrapper *newMesh) |
Set a mesh. | |
~npcMesh () | |
Destructor. |
This is a helper class that defines a mesh on the server.
It wraps around some of the loading details.
npcMesh::npcMesh | ( | iObjectRegistry * | objreg, |
gemNPCObject * | owner, | ||
psNPCClient * | super | ||
) |
Create a new gem Mesh.
This will setup a new mesh and add it to the CS engine.
objreg | The main Crystal Space object registry. |
owner | The npcObject that is using this mesh. |
super | The NPC client supervisor object. |
npcMesh::~npcMesh | ( | ) |
Destructor.
iMeshWrapper* npcMesh::GetMesh | ( | ) |
Get the Crystal Space iMeshWrapper from this.
iMeshFactoryWrapper* npcMesh::LoadMeshFactory | ( | const char * | fileName, |
const char * | factoryName | ||
) |
Load a mesh factory.
This is called if it can't find the factory in the cached engine list.
fileName | The name of the file where the factory is stored. |
factoryName | The name of the factory that is loading. |
void npcMesh::MoveMesh | ( | iSector * | sector, |
const csVector3 & | position | ||
) |
Move a mesh.
sector | The sector to move in. |
position | The position to place the mesh. |
void npcMesh::RemoveMesh | ( | ) |
Removes the mesh from the engine.
bool npcMesh::SetMesh | ( | const char * | factoryName, |
const char * | fileName | ||
) |
Set a mesh.
factoryName | The factory name of the mesh we want to set. |
fileName | The file to load if the factory is not found. |
void npcMesh::SetMesh | ( | iMeshWrapper * | newMesh | ) |
Set a mesh.
newMesh | The Crystal Space mesh wrapper to set in. |