HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GT_PrimPackedDetail.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_Primitive.h ( GT Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GT_PrimPackedDetail__
12 #define __GT_PrimPackedDetail__
13 
14 #include "GT_API.h"
15 #include "GT_PrimInstance.h"
16 #include <GU/GU_DetailHandle.h>
17 
18 /// @brief A primitive which contains it's own GU_Detail with a transform
19 ///
20 /// This is very similar to an instance. The key differences are that the GT
21 /// geometry is defined by the embedded GU_Detail in the primitive. The other
22 /// difference is that by default, this primitive has a single instance
23 /// containing a single identity transform.
25 {
26 public:
32  ~GT_PrimPackedDetail() override;
33 
34  /// @{
35  /// Interface from GT_Primitive
36  const char *className() const override;
37  int64 getMemoryUsage() const override;
38  bool save(UT_JSONWriter &w) const override;
39  GT_PrimitiveHandle doHarden() const override;
40  GT_PrimitiveHandle doSoftCopy() const override;
41  /// @}
42 
43  /// @{
44  /// Provide read only access to the detail
46  { return GU_ConstDetailHandle(myDetailHandle); }
47 
48  /// Set the detail. This will automatically set the GT representations
49  const GU_DetailHandle &setDetail(const GU_DetailHandle &gdp);
50 
51  /// Set the detail (taking ownership of the GU_Detail* passed in)
52  const GU_DetailHandle &setDetail(GU_Detail *gdp);
53 
54 private:
55  GU_DetailHandle myDetailHandle;
56 };
57 
58 #endif
UT_IntrusivePtr< GT_AttributeList > GT_AttributeListHandle
Definition: GT_Handles.h:28
bool save(UT_JSONWriter &w) const override
#define GT_API
Definition: GT_API.h:13
GU_ConstDetailHandle detailHandle() const
Class which writes ASCII or binary JSON streams.
Definition: UT_JSONWriter.h:37
GT_PrimitiveHandle doHarden() const override
GT_PrimitiveHandle doSoftCopy() const override
long long int64
Definition: SYS_Types.h:116
const char * className() const override
A primitive which contains it's own GU_Detail with a transform.
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:857
int64 getMemoryUsage() const override
GLenum src
Definition: glcorearb.h:1793