HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sphereWrapper.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_SPHEREWRAPPER_H
8 #define GUSD_SPHEREWRAPPER_H
9 
10 #include "primWrapper.h"
11 
12 #include <pxr/pxr.h>
13 #include <pxr/usd/usdGeom/sphere.h>
14 
16 
17 /// Wraps a USD sphere prim and refines it to a GT sphere for the viewport or
18 /// conversion back to GU primitives.
20 {
21 public:
22  GusdSphereWrapper(const UsdGeomSphere &usdSphere, UsdTimeCode t,
23  GusdPurposeSet purposes);
24 
25  ~GusdSphereWrapper() override;
26 
27  const UsdGeomImageable getUsdPrim() const override
28  {
29  return m_usdSphere;
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  UsdGeomSphere m_usdSphere;
59 };
60 
62 
63 #endif
A GT_Primitive that wraps a USD Prim.
Definition: primWrapper.h:90
int getMotionSegments() const override
GusdSphereWrapper(const UsdGeomSphere &usdSphere, UsdTimeCode t, GusdPurposeSet purposes)
int64 getMemoryUsage() const override
GT_PrimitiveHandle doSoftCopy() const override
GT_API const UT_StringHolder time
bool isValid() const override
Return true if the underlying USD prim is valid.
long long int64
Definition: SYS_Types.h:116
static GT_PrimitiveHandle defineForRead(const UsdGeomImageable &sourcePrim, UsdTimeCode time, GusdPurposeSet purposes)
Definition: path.h:288
const UsdGeomImageable getUsdPrim() const override
Definition: sphereWrapper.h:27
Processes primitives generated by refinement process.
Definition: GT_Refine.h:20
GLsizei const GLchar *const * path
Definition: glew.h:6461
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1346
bool refine(GT_Refine &refiner, const GT_RefineParms *parms=NULL) const override
void enlargeBounds(UT_BoundingBox boxes[], int nsegments) const override
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
~GusdSphereWrapper() override
GusdPurposeSet
Definition: purpose.h:39
GLdouble GLdouble t
Definition: glew.h:1398
const char * className() const override