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 // --------------------------------------------------------------------- //
219 USDVOL_API
221
227 USDVOL_API
228 UsdAttribute CreateSortingModeHintAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
229
230public:
236
239 USDVOL_API
241
243 USDVOL_API
245
247 USDVOL_API
249 VtValue const &defaultValue = VtValue(),
250 bool writeSparsely=false) const;
251
253 USDVOL_API
255
257 USDVOL_API
259 VtValue const &defaultValue = VtValue(),
260 bool writeSparsely=false) const;
261
263public:
269
272 USDVOL_API
274
276 USDVOL_API
278
280 USDVOL_API
282 VtValue const &defaultValue = VtValue(),
283 bool writeSparsely=false) const;
284
286 USDVOL_API
288
290 USDVOL_API
292 VtValue const &defaultValue = VtValue(),
293 bool writeSparsely=false) const;
294
296public:
302
305 USDVOL_API
307
309 USDVOL_API
311
313 USDVOL_API
315 VtValue const &defaultValue = VtValue(),
316 bool writeSparsely=false) const;
317
319 USDVOL_API
321
323 USDVOL_API
325 VtValue const &defaultValue = VtValue(),
326 bool writeSparsely=false) const;
327
329public:
335
338 USDVOL_API
340
342 USDVOL_API
344
346 USDVOL_API
348 VtValue const &defaultValue = VtValue(),
349 bool writeSparsely=false) const;
350
352 USDVOL_API
354
356 USDVOL_API
358 VtValue const &defaultValue = VtValue(),
359 bool writeSparsely=false) const;
360
362public:
368
371 USDVOL_API
373
375public:
381
384 USDVOL_API
386
388 USDVOL_API
390
392 USDVOL_API
394 VtValue const &defaultValue = VtValue(),
395 bool writeSparsely=false) const;
396
398 USDVOL_API
400
402 USDVOL_API
404 VtValue const &defaultValue = VtValue(),
405 bool writeSparsely=false) const;
406
408 USDVOL_API
410
412 USDVOL_API
414 VtValue const &defaultValue = VtValue(),
415 bool writeSparsely=false) const;
416
418public:
419 // ===================================================================== //
420 // Feel free to add custom code below this line, it will be preserved by
421 // the code generator.
422 //
423 // Just remember to:
424 // - Close the class declaration with };
425 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
426 // - Close the include guard with #endif
427 // ===================================================================== //
428 // --(BEGIN CUSTOM CODE)--
429
436 USDVOL_API
437 bool UsesFloatPositions(UsdAttribute *positionsAttr) const;
438
443 USDVOL_API
444 bool UsesFloatPositions(TfToken *positionsToken = nullptr) const;
445
452 USDVOL_API
453 bool UsesFloatOrientations(UsdAttribute *orientationsAttr) const;
454
459 USDVOL_API
460 bool UsesFloatOrientations(TfToken *orientationsToken = nullptr) const;
461
468 USDVOL_API
469 bool UsesFloatScales(UsdAttribute *scalesAttr) const;
470
475 USDVOL_API
476 bool UsesFloatScales(TfToken *scalesToken = nullptr) const;
477
484 USDVOL_API
485 bool UsesFloatOpacities(UsdAttribute *opacitiesAttr) const;
486
491 USDVOL_API
492 bool UsesFloatOpacities(TfToken *opacitiesToken = nullptr) const;
493
503 USDVOL_API
505 UsdAttribute *radianceCoefficientsAttr) const;
506
513 USDVOL_API
515 TfToken *radianceCoefficientsToken = nullptr) const;
516
517private:
519 bool _UsesFloatAttr(
520 TfToken const& floatName,
521 TfToken const& halfName,
522 UsdAttribute *outAttr) const;
523
525 bool _UsesFloatAttr(
526 TfToken const& floatName,
527 TfToken const& halfName,
528 TfToken *outToken) const;
529};
530
531PXR_NAMESPACE_CLOSE_SCOPE
532
533#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