HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GT_CatPolygonMesh Class Reference

Concatenate GT_PrimPolygonMesh objects into a single GT_PrimPolygonMesh. More...

#include <GT_CatPolygonMesh.h>

Public Types

enum  gt_CatAppendReason {
  APPEND_OK, APPEND_UNSUPPORTED_TYPE, APPEND_TOO_MANY_MESHES, APPEND_TOO_MANY_FACES,
  APPEND_NO_FACES, APPEND_MESH_TOO_LARGE, APPEND_ATTRIB_MISMATCH
}
 

Public Member Functions

 GT_CatPolygonMesh (bool merge_detail_attribs=true, int64 total_num_faces=SYS_INT64_MAX, int64 max_meshes=SYS_INT64_MAX, int64 max_mesh_face_count=SYS_INT64_MAX)
 
 GT_CatPolygonMesh (const UT_Array< GT_PrimitiveHandle > &meshes, bool merge_detail_attribs=true)
 
void mergeDetailLists (bool merge_detail_lists)
 
void setTotalFaceCount (int64 max_num_faces)
 Limit the # of faces in the mesh. append will return false once full. More...
 
void setMaxMeshCount (int64 max_meshes)
 
void setMaxMeshFaceCount (int64 max_faces)
 Don't allow meshes larger than this size to be added. More...
 
bool canAppend (const GT_PrimitiveHandle &prim, gt_CatAppendReason *reason=NULL) const
 Test if the primitive can be added, without adding it. More...
 
bool append (const GT_PrimitiveHandle &prim)
 Append a polygon mesh. Returns false if the primitive isn't valid. More...
 
bool append (const GT_PrimitiveHandle &prim, const GT_TransformHandle &prim_transform)
 Append a polygon mesh. Returns false if the primitive isn't valid. More...
 
bool replace (int idx, const GT_PrimitiveHandle &prim)
 Replace mesh at the index with a new mesh. More...
 
bool remove (int idx)
 
bool clearMesh (int idx)
 Clear the mesh at index, without shifting the list. More...
 
void clearAllMeshes ()
 Reset and release all meshes. More...
 
const GT_PrimPolygonMeshgetMesh (exint i) const
 
exint getNumSourceMeshes () const
 
int64 getNumSourceFaces () const
 
GT_PrimitiveHandle result (GT_AttributeListHandle detail_list=0) const
 Return the concatenation of all the polygon meshes. More...
 

Detailed Description

Concatenate GT_PrimPolygonMesh objects into a single GT_PrimPolygonMesh.

Definition at line 21 of file GT_CatPolygonMesh.h.

Member Enumeration Documentation

Enumerator
APPEND_OK 
APPEND_UNSUPPORTED_TYPE 
APPEND_TOO_MANY_MESHES 
APPEND_TOO_MANY_FACES 
APPEND_NO_FACES 
APPEND_MESH_TOO_LARGE 
APPEND_ATTRIB_MISMATCH 

Definition at line 50 of file GT_CatPolygonMesh.h.

Constructor & Destructor Documentation

GT_CatPolygonMesh::GT_CatPolygonMesh ( bool  merge_detail_attribs = true,
int64  total_num_faces = SYS_INT64_MAX,
int64  max_meshes = SYS_INT64_MAX,
int64  max_mesh_face_count = SYS_INT64_MAX 
)
GT_CatPolygonMesh::GT_CatPolygonMesh ( const UT_Array< GT_PrimitiveHandle > &  meshes,
bool  merge_detail_attribs = true 
)

Member Function Documentation

bool GT_CatPolygonMesh::append ( const GT_PrimitiveHandle prim)

Append a polygon mesh. Returns false if the primitive isn't valid.

bool GT_CatPolygonMesh::append ( const GT_PrimitiveHandle prim,
const GT_TransformHandle prim_transform 
)

Append a polygon mesh. Returns false if the primitive isn't valid.

bool GT_CatPolygonMesh::canAppend ( const GT_PrimitiveHandle prim,
gt_CatAppendReason reason = NULL 
) const

Test if the primitive can be added, without adding it.

void GT_CatPolygonMesh::clearAllMeshes ( )

Reset and release all meshes.

bool GT_CatPolygonMesh::clearMesh ( int  idx)

Clear the mesh at index, without shifting the list.

const GT_PrimPolygonMesh* GT_CatPolygonMesh::getMesh ( exint  i) const
int64 GT_CatPolygonMesh::getNumSourceFaces ( ) const
inline

Definition at line 86 of file GT_CatPolygonMesh.h.

exint GT_CatPolygonMesh::getNumSourceMeshes ( ) const
inline

Definition at line 85 of file GT_CatPolygonMesh.h.

void GT_CatPolygonMesh::mergeDetailLists ( bool  merge_detail_lists)
inline

If 'merge_detail_attribs' is true, the detail lists will be promoted to uniform attributes. If false, only the first meshes detail attribs are used (useful for merging meshes built from the same GU_Detail). default is to merge.

Definition at line 36 of file GT_CatPolygonMesh.h.

bool GT_CatPolygonMesh::remove ( int  idx)
bool GT_CatPolygonMesh::replace ( int  idx,
const GT_PrimitiveHandle prim 
)

Replace mesh at the index with a new mesh.

GT_PrimitiveHandle GT_CatPolygonMesh::result ( GT_AttributeListHandle  detail_list = 0) const

Return the concatenation of all the polygon meshes.

void GT_CatPolygonMesh::setMaxMeshCount ( int64  max_meshes)
inline

Limit the # of consituent meshes in the mesh. append will return false once full.

Definition at line 44 of file GT_CatPolygonMesh.h.

void GT_CatPolygonMesh::setMaxMeshFaceCount ( int64  max_faces)
inline

Don't allow meshes larger than this size to be added.

Definition at line 47 of file GT_CatPolygonMesh.h.

void GT_CatPolygonMesh::setTotalFaceCount ( int64  max_num_faces)
inline

Limit the # of faces in the mesh. append will return false once full.

Definition at line 40 of file GT_CatPolygonMesh.h.


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