HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cubeWrapper.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 
7 #ifndef GUSD_CUBEWRAPPER_H
8 #define GUSD_CUBEWRAPPER_H
9 
10 #include "primWrapper.h"
11 
12 #include <pxr/pxr.h>
13 #include <pxr/usd/usdGeom/cube.h>
14 
16 
17 /// Wraps a USD cube prim and refines it to a GT mesh for the viewport or
18 /// conversion back to GU primitives.
20 {
21 public:
22  GusdCubeWrapper(const UsdGeomCube &usdCube, UsdTimeCode t,
23  GusdPurposeSet purposes);
24 
25  ~GusdCubeWrapper() override;
26 
27  const UsdGeomImageable getUsdPrim() const override
28  {
29  return m_usdCube;
30  }
31 
32  const char* className() const override;
33 
34  void
35  enlargeBounds(UT_BoundingBox boxes[], int nsegments) const override;
36 
37  int getMotionSegments() const override;
38 
39  int64 getMemoryUsage() const override;
40 
41  GT_PrimitiveHandle doSoftCopy() const override;
42 
43  bool isValid() const override;
44 
45  bool refine(GT_Refine& refiner,
46  const GT_RefineParms* parms=NULL) const override;
47 
48 public:
49  static GT_PrimitiveHandle
51  GusdPurposeSet purposes);
52 
53 private:
54  bool initUsdPrim(const UsdStagePtr& stage,
55  const SdfPath& path,
56  bool asOverride);
57 
58  UsdGeomCube m_usdCube;
59 };
60 
62 
63 #endif
A GT_Primitive that wraps a USD Prim.
Definition: primWrapper.h:90
bool isValid() const override
Return true if the underlying USD prim is valid.
GT_API const UT_StringHolder time
~GusdCubeWrapper() override
const UsdGeomImageable getUsdPrim() const override
Definition: cubeWrapper.h:27
static GT_PrimitiveHandle defineForRead(const UsdGeomImageable &sourcePrim, UsdTimeCode time, GusdPurposeSet purposes)
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
int64 getMemoryUsage() const override
bool refine(GT_Refine &refiner, const GT_RefineParms *parms=NULL) const override
void enlargeBounds(UT_BoundingBox boxes[], int nsegments) const override
GusdCubeWrapper(const UsdGeomCube &usdCube, UsdTimeCode t, GusdPurposeSet purposes)
long long int64
Definition: SYS_Types.h:116
Definition: path.h:290
GLdouble t
Definition: glad.h:2397
Processes primitives generated by refinement process.
Definition: GT_Refine.h:20
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1432
GT_PrimitiveHandle doSoftCopy() const override
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
const char * className() const override
int getMotionSegments() const override
GusdPurposeSet
Definition: purpose.h:39