Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

RmMeshModelContainer Class Reference

Mesh container. More...

#include <RmMesh.h>

List of all members.

Public Member Functions

 RmMeshModelContainer ()
 Constructor.

virtual ~RmMeshModelContainer ()
 Destructor.

virtual RmMeshModelCreateNewMeshModel ()
 Create new mesh model.

void AddMeshModel (RmMeshModel *pModel)
 Add mesh tolist.

void DestroyMeshModel (RmMeshModel *pModel)
 Destroy MeshModel.

void DestroyAllMeshModels ()
 Destroy all models.

void GetGeometryStatistics (int &nNumVertices, int &nNumPrimitives)
 Compute polygonal statistics (number of vertices, primitives).

RmMeshModelListIterator BeginModel ()
 Begin iterator.

RmMeshModelListConstIterator BeginModel () const
 Begin iterator.

RmMeshModelListIterator EndModel ()
 End iterator.

RmMeshModelListConstIterator EndModel () const
 End iterator.

int GetNumModels ()
 Number of models.

void Copy (RmMeshModelContainer *pDestContainer)
 Copy mesh container.

void SetBoundBoxDirty (bool bDirty)
 Set boundbox dirty flag.

void UpdateBoundBox ()
 Update Boundbox.

RmBoundBoxGetBoundBox ()
 Get bound box.

bool GetBoundSphere (RmVector3D &center, float &radius)
 Bound sphere.

void SetCentroidDirty (bool bDirty)
 Set centroid dirty flag.

void UpdateCentroid ()
 Recompute cnetroid.

RmVector3DGetCentroid ()
 Get centroid.


Detailed Description

Mesh container.

Mesh Container


Constructor & Destructor Documentation

RmMeshModelContainer::RmMeshModelContainer  ) 
 

Constructor.

Constructor

virtual RmMeshModelContainer::~RmMeshModelContainer  )  [virtual]
 

Destructor.

Destructor


Member Function Documentation

void RmMeshModelContainer::AddMeshModel RmMeshModel pModel  ) 
 

Add mesh tolist.

Add to list ( as a root model, if model belongs to other model, it should not be added here, instead added to parent model as a child )

Parameters:
pModel Model to add as a child
Returns:
None

RmMeshModelListConstIterator RmMeshModelContainer::BeginModel  )  const [inline]
 

Begin iterator.

Returns an iterator that points to the beginning of the model list

Returns:
Begin iterator

RmMeshModelListIterator RmMeshModelContainer::BeginModel  )  [inline]
 

Begin iterator.

Returns:
Begin iterator

void RmMeshModelContainer::Copy RmMeshModelContainer pDestContainer  ) 
 

Copy mesh container.

Copy ( copies data to destination )

Parameters:
pDestContainer Mesh container to receive data

virtual RmMeshModel* RmMeshModelContainer::CreateNewMeshModel  )  [virtual]
 

Create new mesh model.

Overridable to create custom MeshModel ( new class derived from MeshModel )

Returns:
Newly created MeshModel
See also:
RmMeshModel

void RmMeshModelContainer::DestroyAllMeshModels  ) 
 

Destroy all models.

Destroy all models in this container

Returns:
None

void RmMeshModelContainer::DestroyMeshModel RmMeshModel pModel  ) 
 

Destroy MeshModel.

Parameters:
pModel MeshModel to be destroyed
Returns:
None

RmMeshModelListConstIterator RmMeshModelContainer::EndModel  )  const [inline]
 

End iterator.

Returns an iterator that points to the end of the model list

Returns:
End iterator

RmMeshModelListIterator RmMeshModelContainer::EndModel  )  [inline]
 

End iterator.

Returns an iterator that points to the end of the model list

Returns:
End iterator

RmBoundBox& RmMeshModelContainer::GetBoundBox  ) 
 

Get bound box.

Get boundbox. If dirty flag is set, it calls update to recompute boundbox

Returns:
Boundbox

bool RmMeshModelContainer::GetBoundSphere RmVector3D center,
float &  radius
 

Bound sphere.

Get bounding sphere. Returns false if bound sphere is empty

Returns:
True if bound sphere is not empty

RmVector3D& RmMeshModelContainer::GetCentroid  ) 
 

Get centroid.

Get centroid of mesh. If dirty flag is set, it calls UpdateCentroid to recomoute centroid.

Returns:
Centroid position

void RmMeshModelContainer::GetGeometryStatistics int &  nNumVertices,
int &  nNumPrimitives
 

Compute polygonal statistics (number of vertices, primitives).

Compute polygonal statistics (number of vertices, primitives) for this model container. Note: this method INCREMENTS the incoming nNumVertices and nNumPrimitives, so to start counting from the very beginning, they must be manually reset by the caller of this method.

Parameters:
nNumVertices Number of vertices in this mesh container
nNumPrimitives Number of primitives in this mesh container
Returns:
None

int RmMeshModelContainer::GetNumModels  )  [inline]
 

Number of models.

Returns the number of models

Returns:
Number of models

void RmMeshModelContainer::SetBoundBoxDirty bool  bDirty  ) 
 

Set boundbox dirty flag.

BoundBox ( currently only use POSITION0 data, must be float3 )

Parameters:
bDirty True to set boundbox dirty ( so it GetBoundBox will recomoute )
Returns:
None

void RmMeshModelContainer::SetCentroidDirty bool  bDirty  ) 
 

Set centroid dirty flag.

Set Centroid dirty flag. Set this to true, if vertices are modified.

Parameters:
bDirty Flag to set centroid dirty
Returns:
None

void RmMeshModelContainer::UpdateBoundBox  ) 
 

Update Boundbox.

Recomputes bound box

Returns:
None

void RmMeshModelContainer::UpdateCentroid  ) 
 

Recompute cnetroid.

Recomoute centroid

Returns:
None


The documentation for this class was generated from the following file:
Generated on Fri Feb 25 16:09:11 2005 for RenderMonkey SDK by doxygen 1.3.6