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