Planeshift
npcMesh Class Reference

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. More...
 
iMeshFactoryWrapper * LoadMeshFactory (const char *fileName, const char *factoryName)
 Load a mesh factory. More...
 
void MoveMesh (iSector *sector, const csVector3 &position)
 Move a mesh. More...
 
 npcMesh (iObjectRegistry *objreg, gemNPCObject *owner, psNPCClient *super)
 Create a new gem Mesh. More...
 
void RemoveMesh ()
 Removes the mesh from the engine. More...
 
bool SetMesh (const char *factoryName, const char *fileName)
 Set a mesh. More...
 
void SetMesh (iMeshWrapper *newMesh)
 Set a mesh. More...
 
 ~npcMesh ()
 Destructor. More...
 

Detailed Description

This is a helper class that defines a mesh on the server.

It wraps around some of the loading details.

Definition at line 55 of file npcmesh.h.

Constructor & Destructor Documentation

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.

Parameters
objregThe main Crystal Space object registry.
ownerThe npcObject that is using this mesh.
superThe NPC client supervisor object.
npcMesh::~npcMesh ( )

Destructor.

Member Function Documentation

iMeshWrapper* npcMesh::GetMesh ( )

Get the Crystal Space iMeshWrapper from this.

Returns
an iMeshWrapper that is being used.
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.

Parameters
fileNameThe name of the file where the factory is stored.
factoryNameThe name of the factory that is loading.
Returns
An iMeshFactoryWrapper that was loaded. Null if nothing could be loaded.
void npcMesh::MoveMesh ( iSector *  sector,
const csVector3 &  position 
)

Move a mesh.

Parameters
sectorThe sector to move in.
positionThe 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.

Parameters
factoryNameThe factory name of the mesh we want to set.
fileNameThe file to load if the factory is not found.
Returns
true If it was successful in setting the mesh.
void npcMesh::SetMesh ( iMeshWrapper *  newMesh)

Set a mesh.

Parameters
newMeshThe Crystal Space mesh wrapper to set in.

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