HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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  virtual ~GT_PrimPackedDetail();
33 
34  /// @{
35  /// Interface from GT_Primitive
36  virtual const char *className() const;
37  virtual int64 getMemoryUsage() const;
38  virtual bool save(UT_JSONWriter &w) const;
39  virtual GT_PrimitiveHandle doHarden() const;
40  virtual GT_PrimitiveHandle doSoftCopy() const;
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
virtual GT_PrimitiveHandle doSoftCopy() const
UT_IntrusivePtr< GT_AttributeList > GT_AttributeListHandle
Definition: GT_Handles.h:24
virtual GT_PrimitiveHandle doHarden() const
#define GT_API
Definition: GT_API.h:11
GU_ConstDetailHandle detailHandle() const
Class which writes ASCII or binary JSON streams.
Definition: UT_JSONWriter.h:32
long long int64
Definition: SYS_Types.h:106
virtual bool save(UT_JSONWriter &w) const
virtual int64 getMemoryUsage() const
A primitive which contains it's own GU_Detail with a transform.
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:856
virtual const char * className() const
GLenum src
Definition: glcorearb.h:1792