Planeshift
Public Member Functions

gemMesh Class Reference

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

#include <gemmesh.h>

List of all members.

Public Member Functions

 gemMesh (iObjectRegistry *objreg, gemObject *owner, GEMSupervisor *super)
 Create a new gem Mesh.
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 float yrot, const csVector3 &position)
 Move a mesh.
void RemoveMesh ()
 Removes the mesh from the engine.
void SetMesh (iMeshWrapper *newMesh)
 Set a mesh.
bool SetMesh (const char *factoryName, const char *fileName)
 Set a mesh.
 ~gemMesh ()

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 56 of file gemmesh.h.


Constructor & Destructor Documentation

gemMesh::gemMesh ( iObjectRegistry *  objreg,
gemObject owner,
GEMSupervisor 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 gemObject that is using this mesh.
superThe GEM supervisor object.
gemMesh::~gemMesh ( )

Member Function Documentation

iMeshWrapper* gemMesh::GetMesh ( )

Get the Crystal Space iMeshWrapper from this.

Returns:
an iMeshWrapper that is being used.
iMeshFactoryWrapper* gemMesh::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 gemMesh::MoveMesh ( iSector *  sector,
const float  yrot,
const csVector3 &  position 
)

Move a mesh.

Parameters:
sectorThe sector to move in.
yrotThe Y-axis rotation of the object.
positionThe position to place the mesh.
void gemMesh::RemoveMesh ( )

Removes the mesh from the engine.

bool gemMesh::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 gemMesh::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: