HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GT_PrimTetMesh.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GT_PrimTetMesh.h ( GT Library, C++)
7  *
8  * COMMENTS:
9  */
10 #ifndef GT_PrimTetMesh_h
11 #define GT_PrimTetMesh_h
12 
13 #include "GT_API.h"
14 
15 #include "GT_ElementSetMap.h"
16 #include "GT_Primitive.h"
17 
19 {
20 public:
21  GT_PrimTetMesh(const GT_DataArrayHandle &vertex_list,
22  const GT_AttributeListHandle &vert_attribs,
23  const GT_AttributeListHandle &point_attribs,
24  const GT_AttributeListHandle &prim_attribs,
25  const GT_AttributeListHandle &dtl_attribs,
26  const GT_DataArrayHandle &face_verts);
27 
28  GT_PrimTetMesh(const GT_PrimTetMesh &pmesh,
29  const GT_AttributeListHandle &vert_attribs,
30  const GT_AttributeListHandle &point_attribs,
31  const GT_AttributeListHandle &prim_attribs,
32  const GT_AttributeListHandle &dtl_attribs);
33 
34  GT_PrimTetMesh(const GT_PrimTetMesh &tetmesh);
35  ~GT_PrimTetMesh() override;
36 
37  int getPrimitiveType() const override { return GT_PRIM_TET_MESH; }
38  const char *className() const override { return "GT_PrimTetMesh"; }
39 
40  int getTetCount() const { return myVertexList->entries() / 4; }
41 
43  { return myVertexAttribs; }
45  { return myPointAttribs; }
47  { return myUniformAttribs; }
49  { return myDetailAttribs; }
50 
51  // point connectivity.
52  const GT_DataArrayHandle &getVertexList() const override
53  { return myVertexList; }
54  /// List of the vertices in the tet (0-3) for each face. This has a length
55  /// of 4 * getTetCount() with a tuple size of 3.
57  { return myFaceVerts; }
58 
59  void enlargeBounds(UT_BoundingBox boxes[],
60  int nsegments) const override;
61  bool refine(GT_Refine &refiner,
62  const GT_RefineParms *parms) const override;
63 
64  int getMotionSegments() const override;
65  int64 getMemoryUsage() const override;
66  GT_PrimitiveHandle doSoftCopy() const override;
67 
68  GT_PrimitiveHandle curveMesh() const;
69  GT_PrimitiveHandle curveMesh(GT_DataArrayHandle &verts,
70  GT_DataArrayHandle &uniform_indexing,
71  GT_DataArrayHandle &vertex_indexing) const;
72 
73  /// @{
74  /// Access to the tetrahedron sets
75  const GT_ElementSetMapPtr &tetSetMap() const { return myTetSetMap; }
77  { myTetSetMap = v; }
78  /// @}
79 
80  /// @{
81  /// Access to the point sets
82  const GT_ElementSetMapPtr &pointSetMap() const { return myPointSetMap; }
84  { myPointSetMap = v; }
85  /// @}
86 
87 private:
88  GT_DataArrayHandle myVertexList;
89  GT_DataArrayHandle myFaceVerts;
90 
91  GT_AttributeListHandle myVertexAttribs;
92  GT_AttributeListHandle myPointAttribs;
93  GT_AttributeListHandle myUniformAttribs;
94  GT_AttributeListHandle myDetailAttribs;
95 
96  GT_ElementSetMapPtr myPointSetMap;
97  GT_ElementSetMapPtr myTetSetMap;
98 };
99 
100 #endif
virtual int getMotionSegments() const =0
virtual bool refine(GT_Refine &refiner, const GT_RefineParms *parms=NULL) const
const GLdouble * v
Definition: glcorearb.h:837
const GT_ElementSetMapPtr & pointSetMap() const
const GT_AttributeListHandle & getVertexAttributes() const override
#define GT_API
Definition: GT_API.h:13
int getTetCount() const
const GT_AttributeListHandle & getUniformAttributes() const override
const GT_ElementSetMapPtr & tetSetMap() const
virtual GT_PrimitiveHandle doSoftCopy() const =0
const char * className() const override
long long int64
Definition: SYS_Types.h:116
const GT_AttributeListHandle & getDetailAttributes() const override
The base class for all GT primitive types.
Definition: GT_Primitive.h:43
virtual int64 getMemoryUsage() const =0
Processes primitives generated by refinement process.
Definition: GT_Refine.h:20
const GT_DataArrayHandle & getFaceVertices() const
const GT_DataArrayHandle & getVertexList() const override
void setTetSetMap(const GT_ElementSetMapPtr &v)
int getPrimitiveType() const override
void setPointSetMap(const GT_ElementSetMapPtr &v)
const GT_AttributeListHandle & getPointAttributes() const override
virtual void enlargeBounds(UT_BoundingBox boxes[], int nsegments) const =0