Loading...
Searching...
No Matches
particleField3DGaussianSplat.h
Go to the documentation of this file.
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef USDVOL_GENERATED_PARTICLEFIELD3DGAUSSIANSPLAT_H
8#define USDVOL_GENERATED_PARTICLEFIELD3DGAUSSIANSPLAT_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/usdVol/api.h"
15#include "pxr/usd/usd/prim.h"
16#include "pxr/usd/usd/stage.h"
18
25
26
27#include "pxr/base/vt/value.h"
28
29#include "pxr/base/gf/vec3d.h"
30#include "pxr/base/gf/vec3f.h"
32
33#include "pxr/base/tf/token.h"
34#include "pxr/base/tf/type.h"
35
36PXR_NAMESPACE_OPEN_SCOPE
37
38class SdfAssetPath;
39
40// -------------------------------------------------------------------------- //
41// PARTICLEFIELD3DGAUSSIANSPLAT //
42// -------------------------------------------------------------------------- //
43
63{
64public:
68 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
69
76 {
77 }
78
83 : UsdVolParticleField(schemaObj)
84 {
85 }
86
88 USDVOL_API
90
94 USDVOL_API
95 static const TfTokenVector &
96 GetSchemaAttributeNames(bool includeInherited=true);
97
107 USDVOL_API
109 Get(const UsdStagePtr &stage, const SdfPath &path);
110
133 USDVOL_API
135 Define(const UsdStagePtr &stage, const SdfPath &path);
136
137protected:
141 USDVOL_API
143
144private:
145 // needs to invoke _GetStaticTfType.
146 friend class UsdSchemaRegistry;
147 USDVOL_API
148 static const TfType &_GetStaticTfType();
149
150 static bool _IsTypedSchema();
151
152 // override SchemaBase virtuals.
153 USDVOL_API
154 const TfType &_GetTfType() const override;
155
156public:
157 // --------------------------------------------------------------------- //
158 // PROJECTIONMODEHINT
159 // --------------------------------------------------------------------- //
182 USDVOL_API
184
190 USDVOL_API
191 UsdAttribute CreateProjectionModeHintAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
192
193public:
194 // --------------------------------------------------------------------- //
195 // SORTINGMODEHINT
196 // --------------------------------------------------------------------- //
224 USDVOL_API
226
232 USDVOL_API
233 UsdAttribute CreateSortingModeHintAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
234
235public:
241
244 USDVOL_API
246
248 USDVOL_API
250
252 USDVOL_API
254 VtValue const &defaultValue = VtValue(),
255 bool writeSparsely=false) const;
256
258 USDVOL_API
260
262 USDVOL_API
264 VtValue const &defaultValue = VtValue(),
265 bool writeSparsely=false) const;
266
268public:
274
277 USDVOL_API
279
281 USDVOL_API
283
285 USDVOL_API
287 VtValue const &defaultValue = VtValue(),
288 bool writeSparsely=false) const;
289
291 USDVOL_API
293
295 USDVOL_API
297 VtValue const &defaultValue = VtValue(),
298 bool writeSparsely=false) const;
299
301public:
307
310 USDVOL_API
312
314 USDVOL_API
316
318 USDVOL_API
320 VtValue const &defaultValue = VtValue(),
321 bool writeSparsely=false) const;
322
324 USDVOL_API
326
328 USDVOL_API
330 VtValue const &defaultValue = VtValue(),
331 bool writeSparsely=false) const;
332
334public:
340
343 USDVOL_API
345
347 USDVOL_API
349
351 USDVOL_API
353 VtValue const &defaultValue = VtValue(),
354 bool writeSparsely=false) const;
355
357 USDVOL_API
359
361 USDVOL_API
363 VtValue const &defaultValue = VtValue(),
364 bool writeSparsely=false) const;
365
367public:
373
376 USDVOL_API
378
380public:
386
389 USDVOL_API
391
393 USDVOL_API
395
397 USDVOL_API
399 VtValue const &defaultValue = VtValue(),
400 bool writeSparsely=false) const;
401
403 USDVOL_API
405
407 USDVOL_API
409 VtValue const &defaultValue = VtValue(),
410 bool writeSparsely=false) const;
411
413 USDVOL_API
415
417 USDVOL_API
419 VtValue const &defaultValue = VtValue(),
420 bool writeSparsely=false) const;
421
423public:
424 // ===================================================================== //
425 // Feel free to add custom code below this line, it will be preserved by
426 // the code generator.
427 //
428 // Just remember to:
429 // - Close the class declaration with };
430 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
431 // - Close the include guard with #endif
432 // ===================================================================== //
433 // --(BEGIN CUSTOM CODE)--
434
441 USDVOL_API
442 bool UsesFloatPositions(UsdAttribute *positionsAttr) const;
443
448 USDVOL_API
449 bool UsesFloatPositions(TfToken *positionsToken = nullptr) const;
450
457 USDVOL_API
458 bool UsesFloatOrientations(UsdAttribute *orientationsAttr) const;
459
464 USDVOL_API
465 bool UsesFloatOrientations(TfToken *orientationsToken = nullptr) const;
466
473 USDVOL_API
474 bool UsesFloatScales(UsdAttribute *scalesAttr) const;
475
480 USDVOL_API
481 bool UsesFloatScales(TfToken *scalesToken = nullptr) const;
482
489 USDVOL_API
490 bool UsesFloatOpacities(UsdAttribute *opacitiesAttr) const;
491
496 USDVOL_API
497 bool UsesFloatOpacities(TfToken *opacitiesToken = nullptr) const;
498
508 USDVOL_API
510 UsdAttribute *radianceCoefficientsAttr) const;
511
518 USDVOL_API
520 TfToken *radianceCoefficientsToken = nullptr) const;
521
522private:
524 bool _UsesFloatAttr(
525 TfToken const& floatName,
526 TfToken const& halfName,
527 UsdAttribute *outAttr) const;
528
530 bool _UsesFloatAttr(
531 TfToken const& floatName,
532 TfToken const& halfName,
533 TfToken *outToken) const;
534};
535
536PXR_NAMESPACE_CLOSE_SCOPE
537
538#endif
Contains an asset path and optional evaluated and resolved paths.
Definition: assetPath.h:79
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:281
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
TfType represents a dynamic runtime type.
Definition: type.h:48
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:183
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:117
The base class for all schema types in Usd.
Definition: schemaBase.h:39
Singleton registry that provides access to schema type information and the prim definitions for regis...
This is a concrete ParticleField representing the original 3D Gaussian Splats technique (https://arxi...
USDVOL_API UsdAttribute CreateOpacitiesAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdVolParticleFieldOpacityAttributeAPI::CreateOpacitiesAttr().
USDVOL_API UsdAttribute CreatePositionshAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdVolParticleFieldPositionAttributeAPI::CreatePositionshAttr().
USDVOL_API UsdAttribute CreateScalesAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdVolParticleFieldScaleAttributeAPI::CreateScalesAttr().
USDVOL_API UsdAttribute GetOpacitieshAttr() const
See UsdVolParticleFieldOpacityAttributeAPI::GetOpacitieshAttr().
USDVOL_API UsdAttribute GetRadianceSphericalHarmonicsCoefficientshAttr() const
See UsdVolParticleFieldSphericalHarmonicsAttributeAPI::GetRadianceSphericalHarmonicsCoefficientshAttr...
USDVOL_API UsdVolParticleFieldOrientationAttributeAPI ParticleFieldOrientationAttributeAPI() const
Constructs and returns a UsdVolParticleFieldOrientationAttributeAPI object.
USDVOL_API bool UsesFloatScales(UsdAttribute *scalesAttr) const
Determines if we should prefer scales over scalesh based on whether scales has been authored to a non...
virtual USDVOL_API ~UsdVolParticleField3DGaussianSplat()
Destructor.
UsdVolParticleField3DGaussianSplat(const UsdPrim &prim=UsdPrim())
Construct a UsdVolParticleField3DGaussianSplat on UsdPrim prim .
USDVOL_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
USDVOL_API UsdAttribute GetProjectionModeHintAttr() const
A hint for the renderer on how to project the gaussian to achieve a perspective correct view.
static USDVOL_API UsdVolParticleField3DGaussianSplat Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdVolParticleField3DGaussianSplat holding the prim adhering to this schema at path on stage...
USDVOL_API UsdAttribute GetPositionshAttr() const
See UsdVolParticleFieldPositionAttributeAPI::GetPositionshAttr().
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
UsdVolParticleField3DGaussianSplat(const UsdSchemaBase &schemaObj)
Construct a UsdVolParticleField3DGaussianSplat on the prim held by schemaObj .
USDVOL_API UsdAttribute CreateSortingModeHintAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetSortingModeHintAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDVOL_API UsdAttribute GetOrientationsAttr() const
See UsdVolParticleFieldOrientationAttributeAPI::GetOrientationsAttr().
USDVOL_API UsdVolParticleFieldOpacityAttributeAPI ParticleFieldOpacityAttributeAPI() const
Constructs and returns a UsdVolParticleFieldOpacityAttributeAPI object.
USDVOL_API UsdAttribute CreateRadianceSphericalHarmonicsDegreeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdVolParticleFieldSphericalHarmonicsAttributeAPI::CreateRadianceSphericalHarmonicsDegreeAttr().
static USDVOL_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor cl...
USDVOL_API UsdAttribute GetPositionsAttr() const
See UsdVolParticleFieldPositionAttributeAPI::GetPositionsAttr().
USDVOL_API UsdVolParticleFieldSphericalHarmonicsAttributeAPI ParticleFieldSphericalHarmonicsAttributeAPI() const
Constructs and returns a UsdVolParticleFieldSphericalHarmonicsAttributeAPI object.
static USDVOL_API UsdVolParticleField3DGaussianSplat Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
USDVOL_API UsdVolParticleFieldPositionAttributeAPI ParticleFieldPositionAttributeAPI() const
Constructs and returns a UsdVolParticleFieldPositionAttributeAPI object.
USDVOL_API UsdAttribute GetRadianceSphericalHarmonicsCoefficientsAttr() const
See UsdVolParticleFieldSphericalHarmonicsAttributeAPI::GetRadianceSphericalHarmonicsCoefficientsAttr(...
USDVOL_API UsdAttribute GetScalesAttr() const
See UsdVolParticleFieldScaleAttributeAPI::GetScalesAttr().
USDVOL_API UsdAttribute GetRadianceSphericalHarmonicsDegreeAttr() const
See UsdVolParticleFieldSphericalHarmonicsAttributeAPI::GetRadianceSphericalHarmonicsDegreeAttr().
USDVOL_API UsdVolParticleFieldKernelGaussianEllipsoidAPI ParticleFieldKernelGaussianEllipsoidAPI() const
Constructs and returns a UsdVolParticleFieldKernelGaussianEllipsoidAPI object.
USDVOL_API UsdAttribute GetOrientationshAttr() const
See UsdVolParticleFieldOrientationAttributeAPI::GetOrientationshAttr().
USDVOL_API UsdAttribute CreateOrientationshAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdVolParticleFieldOrientationAttributeAPI::CreateOrientationshAttr().
USDVOL_API UsdAttribute GetScaleshAttr() const
See UsdVolParticleFieldScaleAttributeAPI::GetScaleshAttr().
USDVOL_API UsdAttribute CreateRadianceSphericalHarmonicsCoefficientshAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdVolParticleFieldSphericalHarmonicsAttributeAPI::CreateRadianceSphericalHarmonicsCoefficientshA...
USDVOL_API UsdAttribute CreateScaleshAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdVolParticleFieldScaleAttributeAPI::CreateScaleshAttr().
USDVOL_API UsdAttribute CreatePositionsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdVolParticleFieldPositionAttributeAPI::CreatePositionsAttr().
USDVOL_API UsdAttribute CreateOrientationsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdVolParticleFieldOrientationAttributeAPI::CreateOrientationsAttr().
USDVOL_API UsdVolParticleFieldScaleAttributeAPI ParticleFieldScaleAttributeAPI() const
Constructs and returns a UsdVolParticleFieldScaleAttributeAPI object.
USDVOL_API bool UsesFloatRadianceCoefficients(UsdAttribute *radianceCoefficientsAttr) const
Determines if we should prefer radiance:sphericalHarmonicsCoefficients over radiance:sphericalHarmoni...
USDVOL_API bool UsesFloatOrientations(UsdAttribute *orientationsAttr) const
Determines if we should prefer orientations over orientationsh based on whether orientations has been...
USDVOL_API UsdAttribute GetOpacitiesAttr() const
See UsdVolParticleFieldOpacityAttributeAPI::GetOpacitiesAttr().
USDVOL_API bool UsesFloatOpacities(UsdAttribute *opacitiesAttr) const
Determines if we should prefer opacities over opacitiesh based on whether opacities has been authored...
USDVOL_API UsdAttribute CreateProjectionModeHintAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetProjectionModeHintAttr(), and also Create vs Get Property Methods for when to use Get vs Creat...
USDVOL_API UsdAttribute GetSortingModeHintAttr() const
A hint for the renderer on how to sort the gaussians while drawing.
USDVOL_API bool UsesFloatPositions(UsdAttribute *positionsAttr) const
Determines if we should prefer positions over positionsh based on whether positions has been authored...
USDVOL_API UsdAttribute CreateRadianceSphericalHarmonicsCoefficientsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdVolParticleFieldSphericalHarmonicsAttributeAPI::CreateRadianceSphericalHarmonicsCoefficientsAt...
USDVOL_API UsdAttribute CreateOpacitieshAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdVolParticleFieldOpacityAttributeAPI::CreateOpacitieshAttr().
A ParticleField prim is used as a base to describe different types of concrete ParticleField implemen...
Definition: particleField.h:59
Defines the gaussian ellipsoid kernel for a given ParticleField.
A ParticleField related applied schema that provides an opacities attribute to define the opacity of ...
A ParticleField related applied schema that provides an orientations attribute to define the orientat...
A ParticleField related applied schema that provides a position attribute to define the locations of ...
A ParticleField related applied schema that provides a scales attribute to define the linear scale fa...
A ParticleField related applied schema that provides spherical harmonics attributes to define the rad...
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:90
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition: common.h:112
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440