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