Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Public Attributes | List of all members
vtGeode Class Reference

#include <NodeOSG.h>

Inheritance diagram for vtGeode:
NodeExtension vtDynGeom MyGeom vtDynTerrainGeom vtTiledGeom BruteTerrain DemeterTerrain SMTerrain SRTerrain TVTerrain

Public Member Functions

vtGeodeCloneGeode ()
 
void CloneFromGeode (const vtGeode *rhs)
 
void AddMesh (vtMesh *pMesh, int iMatIdx)
 
void RemoveMesh (vtMesh *pMesh)
 
void AddTextMesh (vtTextMesh *pMesh, int iMatIdx)
 
uint GetNumMeshes () const
 
vtMeshGetMesh (int i) const
 
vtTextMeshGetTextMesh (int i) const
 
virtual void SetMaterials (const class vtMaterialArray *mats)
 
const vtMaterialArrayGetMaterials () const
 
vtMaterialGetMaterial (int idx)
 
void SetMeshMatIndex (vtMesh *pMesh, int iMatIdx)
 
- Public Member Functions inherited from NodeExtension
void SetEnabled (bool bOn)
 
bool GetEnabled () const
 
void SetCastShadow (bool b)
 Set this node to cast a shadow, if it is under a vtShadow node. Default is false.
 
bool GetCastShadow ()
 Get whether this node casts a shadow.
 
void GetBoundSphere (FSphere &sphere, bool bGlobal=false)
 Get the Bounding Sphere of the node.
 
void SetOsgNode (osg::Node *n)
 

Public Attributes

osg::ref_ptr< const
vtMaterialArray
m_pMaterialArray
 
- Public Attributes inherited from NodeExtension
osg::Node * m_pNode
 
bool m_bCastShadow
 

Detailed Description

A vtGeode is a "Geometry Node "which can contain any number of visible vtMesh objects.

A vtGeode 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 vtGeode nodes which contain it, which permits a large number of visual instances (each with potentially different material and transform) with very little memory cost.

Member Function Documentation

void vtGeode::AddMesh ( vtMesh pMesh,
int  iMatIdx 
)

Add a mesh to this geometry.

Parameters
pMeshThe mesh to add
iMatIdxThe material index for this mesh, which is an index into the material array of the geometry.
void vtGeode::AddTextMesh ( vtTextMesh pMesh,
int  iMatIdx 
)

Add a text mesh to this geometry.

Parameters
pMeshThe mesh to add
iMatIdxThe material index for this mesh, which is an index into the material array of the geometry.
vtMesh * vtGeode::GetMesh ( int  i) const

Return a contained vtMesh by index.

uint vtGeode::GetNumMeshes ( ) const

Return the number of contained meshes.

vtTextMesh * vtGeode::GetTextMesh ( int  i) const

Return a contained vtTextMesh by index.

void vtGeode::RemoveMesh ( vtMesh pMesh)

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


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