Planeshift
Public Member Functions

npcMesh Class Reference

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

#include <npcmesh.h>

List of all members.

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.

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: