vtGeom Class Reference
[Scene Graph]

Inheritance diagram for vtGeom:

Inheritance graph
[legend]
List of all members.

Detailed Description

The vtGeom class represents a Geometry Node which can contain any number of visible vtMesh objects.
A vtGeom also manages a set of Materials (vtMaterial). Each contained mesh is assigned one of these materials, by index.
This separation (Group/Mesh) provides the useful ability to define a vtMesh once in memory, and have multiple vtGeom nodes which contain it, which permits a large number of visual instances (each with potentially different material and transform) with very little memory cost.


Public Member Functions

void Release ()
void AddMesh (vtMesh *pMesh, int iMatIdx)
void RemoveMesh (vtMesh *pMesh)
void AddTextMesh (vtTextMesh *pMesh, int iMatIdx)
unsigned int GetNumMeshes () const
vtMeshGetMesh (int i) const
vtTextMeshGetTextMesh (int i) const


Member Function Documentation

void vtGeom::AddMesh vtMesh pMesh,
int  iMatIdx
 

Add a mesh to this geometry.

Parameters:
pMesh The mesh to add
iMatIdx The material index for this mesh, which is an index into the material array of the geometry.

void vtGeom::AddTextMesh vtTextMesh pMesh,
int  iMatIdx
 

Add a text mesh to this geometry.

Parameters:
pMesh The mesh to add
iMatIdx The material index for this mesh, which is an index into the material array of the geometry.

vtMesh * vtGeom::GetMesh int  i  )  const
 

Return a contained vtMesh by index.

unsigned int vtGeom::GetNumMeshes  )  const
 

Return the number of contained meshes.

vtTextMesh * vtGeom::GetTextMesh int  i  )  const
 

Return a contained vtTextMesh by index.

void vtGeom::Release  )  [virtual]
 

Releases a node. Use this method instead of C++'s delete operator when you are done with a node. Internally, the node is reference counted so it is not deleted until all references to it are removed.

Reimplemented from vtNode.

void vtGeom::RemoveMesh vtMesh pMesh  ) 
 

Remove a mesh from the geomtry. Has no effect if the mesh is not currently contained.


Generated on Tue Apr 22 10:11:07 2008 for vtlib library by  doxygen 1.4.5