HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GT_GEOPrimCollectBoxes.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_GEOPrimCollectBoxes.h (GT Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GT_GEOPrimCollectBoxes__
12 #define __GT_GEOPrimCollectBoxes__
13 
14 #include "GT_API.h"
15 #include "GT_GEOPrimCollect.h"
16 
17 /// Class to collect boxes and centroids of boxes.
19 {
20 public:
22  bool add__primitive_id);
24 
25  void appendBox(const UT_BoundingBox &box,
26  const UT_Matrix4F &xform,
27  GA_Offset prim_offset=GA_INVALID_OFFSET,
28  GA_Offset vertex_offset=GA_INVALID_OFFSET,
29  GA_Offset point_offset=GA_INVALID_OFFSET);
30  void appendBox(const UT_BoundingBox &box,
31  const UT_Matrix4D &xform,
32  GA_Offset prim_offset=GA_INVALID_OFFSET,
33  GA_Offset vertex_offset=GA_INVALID_OFFSET,
34  GA_Offset point_offset=GA_INVALID_OFFSET);
35  void appendCentroid(const UT_BoundingBox &box,
36  const UT_Matrix4F &xform,
37  GA_Offset prim_offset=GA_INVALID_OFFSET,
38  GA_Offset vertex_offset=GA_INVALID_OFFSET,
39  GA_Offset point_offset=GA_INVALID_OFFSET);
40  void appendCentroid(const UT_BoundingBox &box,
41  const UT_Matrix4D &xform,
42  GA_Offset prim_offset=GA_INVALID_OFFSET,
43  GA_Offset vertex_offset=GA_INVALID_OFFSET,
44  GA_Offset point_offset=GA_INVALID_OFFSET);
45 
46  GT_PrimitiveHandle getBoxes() const;
47  GT_PrimitiveHandle getCentroids() const;
48  GT_PrimitiveHandle getPrimitive() const;
49 
50 private:
51  const GT_GEODetailListHandle myGeometry;
52  UT_Array<UT_Matrix4F> myBoxTransforms;
53  GT_GEOOffsetList myBoxOffsets;
54  GT_GEOOffsetList myBoxVertices;
55  GT_GEOOffsetList myBoxPoints;
57  UT_Array<UT_Matrix4F> myCentroidTransforms;
58  GT_GEOOffsetList myCentroidOffsets;
59  GT_GEOOffsetList myCentroidVertices;
60  GT_GEOOffsetList myCentroidPoints;
61  bool myPrimitiveIds;
62 };
63 
64 #endif
Class to collect boxes and centroids of boxes.
#define GT_API
Definition: GT_API.h:13
#define GA_INVALID_OFFSET
Definition: GA_Types.h:687
GA_Size GA_Offset
Definition: GA_Types.h:646
UT_SharedPtr< GT_GEODetailList > GT_GEODetailListHandle