All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
openVDBAsset.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_OPENVDBASSET_H
8#define USDVOL_GENERATED_OPENVDBASSET_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
19#include "pxr/base/vt/value.h"
20
21#include "pxr/base/gf/vec3d.h"
22#include "pxr/base/gf/vec3f.h"
24
25#include "pxr/base/tf/token.h"
26#include "pxr/base/tf/type.h"
27
28PXR_NAMESPACE_OPEN_SCOPE
29
30class SdfAssetPath;
31
32// -------------------------------------------------------------------------- //
33// OPENVDBASSET //
34// -------------------------------------------------------------------------- //
35
47{
48public:
52 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
53
58 explicit UsdVolOpenVDBAsset(const UsdPrim& prim=UsdPrim())
59 : UsdVolFieldAsset(prim)
60 {
61 }
62
66 explicit UsdVolOpenVDBAsset(const UsdSchemaBase& schemaObj)
67 : UsdVolFieldAsset(schemaObj)
68 {
69 }
70
72 USDVOL_API
74
78 USDVOL_API
79 static const TfTokenVector &
80 GetSchemaAttributeNames(bool includeInherited=true);
81
91 USDVOL_API
93 Get(const UsdStagePtr &stage, const SdfPath &path);
94
117 USDVOL_API
118 static UsdVolOpenVDBAsset
119 Define(const UsdStagePtr &stage, const SdfPath &path);
120
121protected:
125 USDVOL_API
127
128private:
129 // needs to invoke _GetStaticTfType.
130 friend class UsdSchemaRegistry;
131 USDVOL_API
132 static const TfType &_GetStaticTfType();
133
134 static bool _IsTypedSchema();
135
136 // override SchemaBase virtuals.
137 USDVOL_API
138 const TfType &_GetTfType() const override;
139
140public:
141 // --------------------------------------------------------------------- //
142 // FIELDDATATYPE
143 // --------------------------------------------------------------------- //
156 USDVOL_API
158
164 USDVOL_API
165 UsdAttribute CreateFieldDataTypeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
166
167public:
168 // --------------------------------------------------------------------- //
169 // FIELDCLASS
170 // --------------------------------------------------------------------- //
182 USDVOL_API
184
190 USDVOL_API
191 UsdAttribute CreateFieldClassAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
192
193public:
194 // ===================================================================== //
195 // Feel free to add custom code below this line, it will be preserved by
196 // the code generator.
197 //
198 // Just remember to:
199 // - Close the class declaration with };
200 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
201 // - Close the include guard with #endif
202 // ===================================================================== //
203 // --(BEGIN CUSTOM CODE)--
204};
205
206PXR_NAMESPACE_CLOSE_SCOPE
207
208#endif
Contains an asset path and an optional resolved path.
Definition: assetPath.h:30
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
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:160
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...
Base class for field primitives defined by an external file.
Definition: fieldAsset.h:46
OpenVDB field primitive.
Definition: openVDBAsset.h:47
static USDVOL_API UsdVolOpenVDBAsset Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdVolOpenVDBAsset holding the prim adhering to this schema at path on stage.
USDVOL_API UsdAttribute GetFieldDataTypeAttr() const
Token which is used to indicate the data type of an individual field.
USDVOL_API UsdAttribute GetFieldClassAttr() const
Optional token which can be used to indicate the class of an individual grid.
virtual USDVOL_API ~UsdVolOpenVDBAsset()
Destructor.
USDVOL_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition: openVDBAsset.h:52
static USDVOL_API UsdVolOpenVDBAsset 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 UsdAttribute CreateFieldDataTypeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetFieldDataTypeAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
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...
UsdVolOpenVDBAsset(const UsdSchemaBase &schemaObj)
Construct a UsdVolOpenVDBAsset on the prim held by schemaObj .
Definition: openVDBAsset.h:66
UsdVolOpenVDBAsset(const UsdPrim &prim=UsdPrim())
Construct a UsdVolOpenVDBAsset on UsdPrim prim .
Definition: openVDBAsset.h:58
USDVOL_API UsdAttribute CreateFieldClassAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetFieldClassAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:147
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