HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 to contain a range of GEO primitives
21 {
22 public:
24  const GT_GEOOffsetList &prims);
26  virtual ~GT_GEOPrimList();
27 
28  /// @{
29  /// GT_Primitive interface
30  virtual const char *className() const;
31  virtual int getPrimitiveType() const { return GT_GEO_PRIMLIST; }
32  virtual void enlargeBounds(UT_BoundingBox boxes[], int nseg) const;
33  virtual void enlargeRenderBounds(UT_BoundingBox boxes[], int nseg) const;
34  virtual void getVelocityRange(UT_Vector3 &vmin, UT_Vector3 &vmax,
35  const char *attribute_name) const;
36  virtual int getMotionSegments() const;
37  virtual int64 getMemoryUsage() const;
38  virtual bool save(UT_JSONWriter &w) const;
40  { return new GT_GEOPrimList(*this); }
41  virtual GT_PrimitiveHandle doHarden() const
42  { return GT_PrimitiveHandle(); }
43  /// @}
44 
45  /// Refining fails for this primitive.
46  virtual bool refine(GT_Refine &refiner,
47  const GT_RefineParms *parms=NULL) const;
48 
49  /// Add a primitive
50  void append(const GEO_Primitive &prim);
51 
52  /// Access to the GU_Detail
53  const GU_ConstDetailHandle &detail() const { return myGdp; }
54 
55  /// Access the list of primitives
56  GA_Range getPrimitiveRange() const;
57 
58  /// Query primitive type
59  /// If the list contains a heterogeneous mix of primitive types, the type
60  /// will be invalid.
61  const GA_PrimitiveTypeId &getTypeId() const { return myType; }
62 
63 private:
65  GT_GEOOffsetList myPrimitives;
66  GA_PrimitiveTypeId myType;
67 };
68 
69 #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
virtual void getVelocityRange(UT_Vector3 &min, UT_Vector3 &max, const char *attribute_name="v") const
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:100
const GA_PrimitiveTypeId & getTypeId() const
virtual GT_PrimitiveHandle doHarden() const
virtual void enlargeRenderBounds(UT_BoundingBox boxes[], int nsegments) const
The base class for all GT primitive types.
Definition: GT_Primitive.h:41
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