HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GT_GEOPrimCaptureRegions.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_GEOPrimCaptureRegions.h ( GT Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GT_GEOPrimCaptureRegions__
12 #define __GT_GEOPrimCaptureRegions__
13 
14 #include "GT_API.h"
15 #include "GT_PrimQuadricMesh.h"
16 #include "GT_TransformArray.h"
17 
18 /// A virtual container used by sphere, circle and tube meshes
20 {
21 public:
22  /// Default c-tor
24  : myTaperX()
25  , myTaperY()
27  { }
28 
30  : GT_PrimQuadricMesh(src)
31  , myTaperX(src.myTaperX)
32  , myTaperY(src.myTaperY)
33  , myBottomCap(src.myBottomCap)
34  , myTopCap(src.myTopCap)
35  {
36  }
37 
38  /// Construct a full list of quadrics
40  const GT_DataArrayHandle &taperx,
41  const GT_DataArrayHandle &tapery,
42  const GT_DataArrayHandle &bcap,
43  const GT_DataArrayHandle &tcap,
45  const GT_AttributeListHandle &detail,
46  const GT_TransformArrayHandle &xforms)
47  : myTaperX(taperx)
48  , myTaperY(tapery)
49  , myBottomCap(bcap)
50  , myTopCap(tcap)
51  , GT_PrimQuadricMesh(vertex, detail, xforms)
52  {
53  }
54  ~GT_GEOPrimCaptureRegions() override;
55 
56  const char *className() const override
57  { return "GT_GEOPrimCaptureRegions"; }
58  int getPrimitiveType() const override
59  { return GT_PRIM_CAPTURE_REGIONS; }
60  GT_PrimitiveHandle doSoftCopy() const override
61  { return new GT_GEOPrimCaptureRegions(*this); }
62  GT_PrimitiveHandle doHarden() const override;
63 
64  bool refine(GT_Refine &refiner,
65  const GT_RefineParms *parms) const override;
66 
67  GT_Size entries() const { return getQuadricCount(); }
68  const GT_DataArrayHandle &taperX() const { return myTaperX; }
69  const GT_DataArrayHandle &taperY() const { return myTaperY; }
70  const GT_DataArrayHandle &bottomCap() const { return myBottomCap; }
71  const GT_DataArrayHandle &topCap() const { return myTopCap; }
72 
73 protected:
74  void getQBounds(UT_BoundingBox &box) const override;
77  const GT_TransformHandle &x,
78  const GT_RefineParms *parms) const override;
79  /// Refine to a curve mesh. Each region will be composed of 4 individual
80  /// curves.
81  GT_PrimitiveHandle refineToCurves(const GT_RefineParms *parms) const;
82 
87 };
88 
89 #endif
SIM_API const UT_StringHolder vertex
const GT_DataArrayHandle & taperX() const
const GT_DataArrayHandle & taperY() const
virtual GT_PrimitiveHandle makeQuadric(GT_Size index, const GT_AttributeListHandle &h, const GT_TransformHandle &x, const GT_RefineParms *parms) const =0
Sub-class method to make an individual primitive.
#define GT_API
Definition: GT_API.h:13
const GT_DataArrayHandle & bottomCap() const
bool refine(GT_Refine &refiner, const GT_RefineParms *parms) const override
const char * className() const override
GT_Size getQuadricCount() const
GT_PrimitiveHandle doSoftCopy() const override
A virtual container used by sphere, circle and tube meshes.
virtual void getQBounds(UT_BoundingBox &box) const =0
A virtual container used by sphere, circle and tube meshes.
GLint GLenum GLint x
Definition: glcorearb.h:409
virtual GT_PrimitiveHandle doHarden() const
Processes primitives generated by refinement process.
Definition: GT_Refine.h:20
int64 GT_Size
Definition: GT_Types.h:128
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:2002
GT_GEOPrimCaptureRegions()
Default c-tor.
GLuint index
Definition: glcorearb.h:786
const GT_DataArrayHandle & topCap() const
GT_GEOPrimCaptureRegions(const GT_DataArrayHandle &taperx, const GT_DataArrayHandle &tapery, const GT_DataArrayHandle &bcap, const GT_DataArrayHandle &tcap, const GT_AttributeListHandle &vertex, const GT_AttributeListHandle &detail, const GT_TransformArrayHandle &xforms)
Construct a full list of quadrics.
int getPrimitiveType() const override
GLenum src
Definition: glcorearb.h:1793
GT_GEOPrimCaptureRegions(const GT_GEOPrimCaptureRegions &src)