All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
fieldAsset.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_FIELDASSET_H
8#define USDVOL_GENERATED_FIELDASSET_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// FIELDASSET //
34// -------------------------------------------------------------------------- //
35
46{
47public:
51 static const UsdSchemaKind schemaKind = UsdSchemaKind::AbstractTyped;
52
57 explicit UsdVolFieldAsset(const UsdPrim& prim=UsdPrim())
58 : UsdVolFieldBase(prim)
59 {
60 }
61
65 explicit UsdVolFieldAsset(const UsdSchemaBase& schemaObj)
66 : UsdVolFieldBase(schemaObj)
67 {
68 }
69
71 USDVOL_API
73
77 USDVOL_API
78 static const TfTokenVector &
79 GetSchemaAttributeNames(bool includeInherited=true);
80
90 USDVOL_API
91 static UsdVolFieldAsset
92 Get(const UsdStagePtr &stage, const SdfPath &path);
93
94
95protected:
99 USDVOL_API
101
102private:
103 // needs to invoke _GetStaticTfType.
104 friend class UsdSchemaRegistry;
105 USDVOL_API
106 static const TfType &_GetStaticTfType();
107
108 static bool _IsTypedSchema();
109
110 // override SchemaBase virtuals.
111 USDVOL_API
112 const TfType &_GetTfType() const override;
113
114public:
115 // --------------------------------------------------------------------- //
116 // FILEPATH
117 // --------------------------------------------------------------------- //
132 USDVOL_API
134
140 USDVOL_API
141 UsdAttribute CreateFilePathAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
142
143public:
144 // --------------------------------------------------------------------- //
145 // FIELDNAME
146 // --------------------------------------------------------------------- //
155 USDVOL_API
157
163 USDVOL_API
164 UsdAttribute CreateFieldNameAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
165
166public:
167 // --------------------------------------------------------------------- //
168 // FIELDINDEX
169 // --------------------------------------------------------------------- //
180 USDVOL_API
182
188 USDVOL_API
189 UsdAttribute CreateFieldIndexAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
190
191public:
192 // --------------------------------------------------------------------- //
193 // FIELDDATATYPE
194 // --------------------------------------------------------------------- //
206 USDVOL_API
208
214 USDVOL_API
215 UsdAttribute CreateFieldDataTypeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
216
217public:
218 // --------------------------------------------------------------------- //
219 // VECTORDATAROLEHINT
220 // --------------------------------------------------------------------- //
232 USDVOL_API
234
240 USDVOL_API
241 UsdAttribute CreateVectorDataRoleHintAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
242
243public:
244 // ===================================================================== //
245 // Feel free to add custom code below this line, it will be preserved by
246 // the code generator.
247 //
248 // Just remember to:
249 // - Close the class declaration with };
250 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
251 // - Close the include guard with #endif
252 // ===================================================================== //
253 // --(BEGIN CUSTOM CODE)--
254};
255
256PXR_NAMESPACE_CLOSE_SCOPE
257
258#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
USDVOL_API UsdAttribute GetFieldDataTypeAttr() const
Token which is used to indicate the data type of an individual field.
USDVOL_API UsdAttribute CreateFieldNameAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetFieldNameAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDVOL_API UsdAttribute GetFilePathAttr() const
An asset path attribute that points to a file on disk.
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: fieldAsset.h:51
USDVOL_API UsdAttribute GetFieldIndexAttr() const
A file can contain multiple fields with the same name.
USDVOL_API UsdAttribute GetFieldNameAttr() const
Name of an individual field within the file specified by the filePath attribute.
UsdVolFieldAsset(const UsdPrim &prim=UsdPrim())
Construct a UsdVolFieldAsset on UsdPrim prim .
Definition: fieldAsset.h:57
USDVOL_API UsdAttribute CreateVectorDataRoleHintAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetVectorDataRoleHintAttr(), and also Create vs Get Property Methods for when to use Get vs Creat...
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...
USDVOL_API UsdAttribute GetVectorDataRoleHintAttr() const
Optional token which is used to indicate the role of a vector valued field.
UsdVolFieldAsset(const UsdSchemaBase &schemaObj)
Construct a UsdVolFieldAsset on the prim held by schemaObj .
Definition: fieldAsset.h:65
USDVOL_API UsdAttribute CreateFieldIndexAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetFieldIndexAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDVOL_API UsdAttribute CreateFilePathAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetFilePathAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
virtual USDVOL_API ~UsdVolFieldAsset()
Destructor.
static USDVOL_API UsdVolFieldAsset Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdVolFieldAsset holding the prim adhering to this schema at path on stage.
Base class for field primitives.
Definition: fieldBase.h:40
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