HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GT_PrimChannel.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_PrimChannel.h ( GT Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GT_PrimChannel__
12 #define __GT_PrimChannel__
13 
14 #include "GT_API.h"
15 #include "GT_Primitive.h"
16 #include "GT_GEOPrimCollect.h"
17 #include "GT_Transform.h"
18 
19 /// @brief A channel primitive
20 /// @endcode
22 {
23 public:
24  /// Default constructor
25  GT_PrimChannel(const GU_ConstDetailHandle &gdh, const GEO_Primitive *prim);
26  /// Destructor
27  ~GT_PrimChannel() override;
28 
29  const char *className() const override { return "GT_PrimChannel"; }
30 
31  GT_PrimitiveHandle doSoftCopy() const override
32  { return new GT_PrimChannel(*this); }
33  GT_PrimitiveHandle doHarden() const override;
34 
35  /// @{
36  /// Methods defined on GT_Primitive
37  void enlargeBounds(UT_BoundingBox boxes[],
38  int nsegments) const override;
39  int getMotionSegments() const override;
40  int64 getMemoryUsage() const override;
41  /// @}
42 
43  /// @{
44  /// Methods defined on GT_Primitive
45  int getPrimitiveType() const override
46  { return GT_PRIM_CHANNEL; }
47  /// @}
48 
50  { return getPrimitive(); }
51 
52 protected:
53 
54 private:
55  const GEO_Primitive *getPrimitive() const;
56 
57  GU_ConstDetailHandle myDetail;
58  GA_Offset myPrimOffset;
59 };
60 
61 /// Trivial collector class for Channel - 1 GT_PrimChannel per Channel primitive
63 {
64 public:
67 
70  const GT_RefineParms *parms) const override;
71 
73  const GEO_Primitive *const* prim_list,
74  int,
75  GT_GEOPrimCollectData *) const override;
76 
78  endCollecting(const GT_GEODetailListHandle &geometry,
79  GT_GEOPrimCollectData *data) const override;
80 };
81 
82 #endif
virtual int getMotionSegments() const =0
virtual GT_GEOPrimCollectData * beginCollecting(const GT_GEODetailListHandle &geometry, const GT_RefineParms *parms) const
#define GT_API
Definition: GT_API.h:13
Trivial collector class for Channel - 1 GT_PrimChannel per Channel primitive.
Collection data container.
int getPrimitiveType() const override
GA_Size GA_Offset
Definition: GA_Types.h:646
virtual GT_PrimitiveHandle endCollecting(const GT_GEODetailListHandle &geometry, GT_GEOPrimCollectData *data) const
virtual GT_PrimitiveHandle collect(const GT_GEODetailListHandle &geometry, const GEO_Primitive *const *prim_list, int nsegments, GT_GEOPrimCollectData *data) const =0
GT_PrimitiveHandle doSoftCopy() const override
long long int64
Definition: SYS_Types.h:116
The base class for all GT primitive types.
Definition: GT_Primitive.h:43
virtual GT_PrimitiveHandle doHarden() const
virtual int64 getMemoryUsage() const =0
const GEO_Primitive * getGeoPrimitive() const
~GT_GEOPrimCollectChannel() override
const char * className() const override
A channel primitive .
UT_SharedPtr< GT_GEODetailList > GT_GEODetailListHandle
virtual void enlargeBounds(UT_BoundingBox boxes[], int nsegments) const =0
Definition: format.h:895