Loading...
Searching...
No Matches
motionAPI.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 USDGEOM_GENERATED_MOTIONAPI_H
8#define USDGEOM_GENERATED_MOTIONAPI_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/usdGeom/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// MOTIONAPI //
34// -------------------------------------------------------------------------- //
35
51{
52public:
56 static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI;
57
62 explicit UsdGeomMotionAPI(const UsdPrim& prim=UsdPrim())
63 : UsdAPISchemaBase(prim)
64 {
65 }
66
70 explicit UsdGeomMotionAPI(const UsdSchemaBase& schemaObj)
71 : UsdAPISchemaBase(schemaObj)
72 {
73 }
74
76 USDGEOM_API
78
82 USDGEOM_API
83 static const TfTokenVector &
84 GetSchemaAttributeNames(bool includeInherited=true);
85
95 USDGEOM_API
96 static UsdGeomMotionAPI
97 Get(const UsdStagePtr &stage, const SdfPath &path);
98
99
116 USDGEOM_API
117 static bool
118 CanApply(const UsdPrim &prim, std::string *whyNot=nullptr);
119
135 USDGEOM_API
136 static UsdGeomMotionAPI
137 Apply(const UsdPrim &prim);
138
139protected:
143 USDGEOM_API
145
146private:
147 // needs to invoke _GetStaticTfType.
148 friend class UsdSchemaRegistry;
149 USDGEOM_API
150 static const TfType &_GetStaticTfType();
151
152 static bool _IsTypedSchema();
153
154 // override SchemaBase virtuals.
155 USDGEOM_API
156 const TfType &_GetTfType() const override;
157
158public:
159 // --------------------------------------------------------------------- //
160 // MOTIONBLURSCALE
161 // --------------------------------------------------------------------- //
187 USDGEOM_API
189
195 USDGEOM_API
196 UsdAttribute CreateMotionBlurScaleAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
197
198public:
199 // --------------------------------------------------------------------- //
200 // VELOCITYSCALE
201 // --------------------------------------------------------------------- //
220 USDGEOM_API
222
228 USDGEOM_API
229 UsdAttribute CreateVelocityScaleAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
230
231public:
232 // --------------------------------------------------------------------- //
233 // NONLINEARSAMPLECOUNT
234 // --------------------------------------------------------------------- //
261 USDGEOM_API
263
269 USDGEOM_API
270 UsdAttribute CreateNonlinearSampleCountAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
271
272public:
273 // ===================================================================== //
274 // Feel free to add custom code below this line, it will be preserved by
275 // the code generator.
276 //
277 // Just remember to:
278 // - Close the class declaration with };
279 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
280 // - Close the include guard with #endif
281 // ===================================================================== //
282 // --(BEGIN CUSTOM CODE)--
283
296 USDGEOM_API
298
309 USDGEOM_API
311 UsdTimeCode time = UsdTimeCode::Default()) const;
312
323 USDGEOM_API
325 UsdTimeCode time = UsdTimeCode::Default()) const;
326
327};
328
329PXR_NAMESPACE_CLOSE_SCOPE
330
331#endif
Contains an asset path and optional evaluated and resolved paths.
Definition: assetPath.h:78
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
The base class for all API schemas.
Definition: apiSchemaBase.h:99
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:183
UsdGeomMotionAPI encodes data that can live on any prim that may affect computations involving:
Definition: motionAPI.h:51
static USDGEOM_API UsdGeomMotionAPI Apply(const UsdPrim &prim)
Applies this single-apply API schema to the given prim.
static USDGEOM_API UsdGeomMotionAPI Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdGeomMotionAPI holding the prim adhering to this schema at path on stage.
USDGEOM_API float ComputeMotionBlurScale(UsdTimeCode time=UsdTimeCode::Default()) const
Compute the inherited value of motion:blurScale at time, i.e.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition: motionAPI.h:56
static USDGEOM_API bool CanApply(const UsdPrim &prim, std::string *whyNot=nullptr)
Returns true if this single-apply API schema can be applied to the given prim.
USDGEOM_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
USDGEOM_API float ComputeVelocityScale(UsdTimeCode time=UsdTimeCode::Default()) const
static USDGEOM_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...
USDGEOM_API UsdAttribute GetVelocityScaleAttr() const
UsdGeomMotionAPI(const UsdPrim &prim=UsdPrim())
Construct a UsdGeomMotionAPI on UsdPrim prim .
Definition: motionAPI.h:62
virtual USDGEOM_API ~UsdGeomMotionAPI()
Destructor.
USDGEOM_API UsdAttribute GetMotionBlurScaleAttr() const
BlurScale is an inherited float attribute that stipulates the rendered motion blur (as typically spec...
USDGEOM_API UsdAttribute CreateVelocityScaleAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetVelocityScaleAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute GetNonlinearSampleCountAttr() const
Determines the number of position or transformation samples created when motion is described by attri...
USDGEOM_API UsdAttribute CreateNonlinearSampleCountAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetNonlinearSampleCountAttr(), and also Create vs Get Property Methods for when to use Get vs Cre...
UsdGeomMotionAPI(const UsdSchemaBase &schemaObj)
Construct a UsdGeomMotionAPI on the prim held by schemaObj .
Definition: motionAPI.h:70
USDGEOM_API UsdAttribute CreateMotionBlurScaleAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetMotionBlurScaleAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API int ComputeNonlinearSampleCount(UsdTimeCode time=UsdTimeCode::Default()) const
Compute the inherited value of nonlinearSampleCount at time, i.e.
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...
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
Definition: timeCode.h:72
static constexpr UsdTimeCode Default()
Produce a UsdTimeCode representing the sentinel value for 'default'.
Definition: timeCode.h:113
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:152
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