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