HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GT_GEOPrimList.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_GEOPrimList.h (GT Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GT_GEOPrimList__
12 #define __GT_GEOPrimList__
13 
14 #include "GT_API.h"
15 #include "GT_Primitive.h"
16 #include "GT_GEOSupport.h"
17 #include <GEO/GEO_Primitive.h>
18 
19 class UT_StringRef;
20 
21 
22 /// Class to contain a range of GEO primitives
24 {
25 public:
27  const GT_GEOOffsetList &prims);
29  virtual ~GT_GEOPrimList();
30 
31  /// @{
32  /// GT_Primitive interface
33  virtual const char *className() const;
34  virtual int getPrimitiveType() const { return GT_GEO_PRIMLIST; }
35  virtual void enlargeBounds(UT_BoundingBox boxes[], int nseg) const;
36  virtual void enlargeRenderBounds(UT_BoundingBox boxes[], int nseg) const;
37  virtual void getVelocityRange(UT_Vector3 &vmin, UT_Vector3 &vmax,
38  const UT_StringRef &attribute_name) const;
39  virtual int getMotionSegments() const;
40  virtual int64 getMemoryUsage() const;
41  virtual bool save(UT_JSONWriter &w) const;
43  { return new GT_GEOPrimList(*this); }
44  virtual GT_PrimitiveHandle doHarden() const
45  { return GT_PrimitiveHandle(); }
46  /// @}
47 
48  /// Refining fails for this primitive.
49  virtual bool refine(GT_Refine &refiner,
50  const GT_RefineParms *parms=NULL) const;
51 
52  /// Add a primitive
53  void append(const GEO_Primitive &prim);
54 
55  /// Access to the GU_Detail
56  const GU_ConstDetailHandle &detail() const { return myGdp; }
57 
58  /// Access the list of primitives
59  GA_Range getPrimitiveRange() const;
60 
61  /// Query primitive type
62  /// If the list contains a heterogeneous mix of primitive types, the type
63  /// will be invalid.
64  const GA_PrimitiveTypeId &getTypeId() const { return myType; }
65 
66 private:
68  GT_GEOOffsetList myPrimitives;
69  GA_PrimitiveTypeId myType;
70 };
71 
72 #endif
virtual int getMotionSegments() const =0
virtual bool refine(GT_Refine &refiner, const GT_RefineParms *parms=NULL) const
virtual int getPrimitiveType() const
#define GT_API
Definition: GT_API.h:11
Class which writes ASCII or binary JSON streams.
Definition: UT_JSONWriter.h:32
const GU_ConstDetailHandle & detail() const
Access to the GU_Detail.
3D Vector class.
A range of elements in an index-map.
Definition: GA_Range.h:42
long long int64
Definition: SYS_Types.h:107
const GA_PrimitiveTypeId & getTypeId() const
virtual GT_PrimitiveHandle doHarden() const
virtual void getVelocityRange(UT_Vector3 &min, UT_Vector3 &max, const UT_StringRef &attribute_name=GA_Names::v) const
virtual void enlargeRenderBounds(UT_BoundingBox boxes[], int nsegments) const
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
virtual bool save(UT_JSONWriter &w) const
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:856
UT_IntrusivePtr< GT_Primitive > GT_PrimitiveHandle
Definition: GT_Handles.h:33
virtual void enlargeBounds(UT_BoundingBox boxes[], int nsegments) const =0
Class to contain a range of GEO primitives.
virtual const char * className() const =0
virtual GT_PrimitiveHandle doSoftCopy() const
GLenum src
Definition: glcorearb.h:1792