Loading...
Searching...
No Matches
scene.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 USDPHYSICS_GENERATED_SCENE_H
8#define USDPHYSICS_GENERATED_SCENE_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/usdPhysics/api.h"
14#include "pxr/usd/usd/typed.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// PHYSICSSCENE //
34// -------------------------------------------------------------------------- //
35
41{
42public:
46 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
47
52 explicit UsdPhysicsScene(const UsdPrim& prim=UsdPrim())
53 : UsdTyped(prim)
54 {
55 }
56
60 explicit UsdPhysicsScene(const UsdSchemaBase& schemaObj)
61 : UsdTyped(schemaObj)
62 {
63 }
64
66 USDPHYSICS_API
68
72 USDPHYSICS_API
73 static const TfTokenVector &
74 GetSchemaAttributeNames(bool includeInherited=true);
75
85 USDPHYSICS_API
86 static UsdPhysicsScene
87 Get(const UsdStagePtr &stage, const SdfPath &path);
88
111 USDPHYSICS_API
112 static UsdPhysicsScene
113 Define(const UsdStagePtr &stage, const SdfPath &path);
114
115protected:
119 USDPHYSICS_API
121
122private:
123 // needs to invoke _GetStaticTfType.
124 friend class UsdSchemaRegistry;
125 USDPHYSICS_API
126 static const TfType &_GetStaticTfType();
127
128 static bool _IsTypedSchema();
129
130 // override SchemaBase virtuals.
131 USDPHYSICS_API
132 const TfType &_GetTfType() const override;
133
134public:
135 // --------------------------------------------------------------------- //
136 // GRAVITYDIRECTION
137 // --------------------------------------------------------------------- //
147 USDPHYSICS_API
149
155 USDPHYSICS_API
156 UsdAttribute CreateGravityDirectionAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
157
158public:
159 // --------------------------------------------------------------------- //
160 // GRAVITYMAGNITUDE
161 // --------------------------------------------------------------------- //
172 USDPHYSICS_API
174
180 USDPHYSICS_API
181 UsdAttribute CreateGravityMagnitudeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
182
183public:
184 // ===================================================================== //
185 // Feel free to add custom code below this line, it will be preserved by
186 // the code generator.
187 //
188 // Just remember to:
189 // - Close the class declaration with };
190 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
191 // - Close the include guard with #endif
192 // ===================================================================== //
193 // --(BEGIN CUSTOM CODE)--
194};
195
196PXR_NAMESPACE_CLOSE_SCOPE
197
198#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
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:183
General physics simulation properties, required for simulation.
Definition: scene.h:41
USDPHYSICS_API UsdAttribute GetGravityDirectionAttr() const
Gravity direction vector in simulation world space.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition: scene.h:46
static USDPHYSICS_API UsdPhysicsScene Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdPhysicsScene holding the prim adhering to this schema at path on stage.
USDPHYSICS_API UsdAttribute CreateGravityMagnitudeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetGravityMagnitudeAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
virtual USDPHYSICS_API ~UsdPhysicsScene()
Destructor.
static USDPHYSICS_API UsdPhysicsScene Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
USDPHYSICS_API UsdAttribute GetGravityMagnitudeAttr() const
Gravity acceleration magnitude in simulation world space.
UsdPhysicsScene(const UsdPrim &prim=UsdPrim())
Construct a UsdPhysicsScene on UsdPrim prim .
Definition: scene.h:52
USDPHYSICS_API UsdAttribute CreateGravityDirectionAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetGravityDirectionAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
UsdPhysicsScene(const UsdSchemaBase &schemaObj)
Construct a UsdPhysicsScene on the prim held by schemaObj .
Definition: scene.h:60
static USDPHYSICS_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...
USDPHYSICS_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
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...
The base class for all typed schemas (those that can impart a typeName to a UsdPrim),...
Definition: typed.h:45
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