HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fixedJoint.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_FIXEDJOINT_H
8 #define USDPHYSICS_GENERATED_FIXEDJOINT_H
9 
10 /// \file usdPhysics/fixedJoint.h
11 
12 #include "pxr/pxr.h"
13 #include "pxr/usd/usdPhysics/api.h"
15 #include "pxr/usd/usd/prim.h"
16 #include "pxr/usd/usd/stage.h"
17 
18 #include "pxr/base/vt/value.h"
19 
20 #include "pxr/base/gf/vec3d.h"
21 #include "pxr/base/gf/vec3f.h"
22 #include "pxr/base/gf/matrix4d.h"
23 
24 #include "pxr/base/tf/token.h"
25 #include "pxr/base/tf/type.h"
26 
28 
29 class SdfAssetPath;
30 
31 // -------------------------------------------------------------------------- //
32 // PHYSICSFIXEDJOINT //
33 // -------------------------------------------------------------------------- //
34 
35 /// \class UsdPhysicsFixedJoint
36 ///
37 /// Predefined fixed joint type (All degrees of freedom are
38 /// removed.)
39 ///
41 {
42 public:
43  /// Compile time constant representing what kind of schema this class is.
44  ///
45  /// \sa UsdSchemaKind
47 
48  /// Construct a UsdPhysicsFixedJoint on UsdPrim \p prim .
49  /// Equivalent to UsdPhysicsFixedJoint::Get(prim.GetStage(), prim.GetPath())
50  /// for a \em valid \p prim, but will not immediately throw an error for
51  /// an invalid \p prim
52  explicit UsdPhysicsFixedJoint(const UsdPrim& prim=UsdPrim())
53  : UsdPhysicsJoint(prim)
54  {
55  }
56 
57  /// Construct a UsdPhysicsFixedJoint on the prim held by \p schemaObj .
58  /// Should be preferred over UsdPhysicsFixedJoint(schemaObj.GetPrim()),
59  /// as it preserves SchemaBase state.
60  explicit UsdPhysicsFixedJoint(const UsdSchemaBase& schemaObj)
61  : UsdPhysicsJoint(schemaObj)
62  {
63  }
64 
65  /// Destructor.
67  virtual ~UsdPhysicsFixedJoint();
68 
69  /// Return a vector of names of all pre-declared attributes for this schema
70  /// class and all its ancestor classes. Does not include attributes that
71  /// may be authored by custom/extended methods of the schemas involved.
73  static const TfTokenVector &
74  GetSchemaAttributeNames(bool includeInherited=true);
75 
76  /// Return a UsdPhysicsFixedJoint holding the prim adhering to this
77  /// schema at \p path on \p stage. If no prim exists at \p path on
78  /// \p stage, or if the prim at that path does not adhere to this schema,
79  /// return an invalid schema object. This is shorthand for the following:
80  ///
81  /// \code
82  /// UsdPhysicsFixedJoint(stage->GetPrimAtPath(path));
83  /// \endcode
84  ///
87  Get(const UsdStagePtr &stage, const SdfPath &path);
88 
89  /// Attempt to ensure a \a UsdPrim adhering to this schema at \p path
90  /// is defined (according to UsdPrim::IsDefined()) on this stage.
91  ///
92  /// If a prim adhering to this schema at \p path is already defined on this
93  /// stage, return that prim. Otherwise author an \a SdfPrimSpec with
94  /// \a specifier == \a SdfSpecifierDef and this schema's prim type name for
95  /// the prim at \p path at the current EditTarget. Author \a SdfPrimSpec s
96  /// with \p specifier == \a SdfSpecifierDef and empty typeName at the
97  /// current EditTarget for any nonexistent, or existing but not \a Defined
98  /// ancestors.
99  ///
100  /// The given \a path must be an absolute prim path that does not contain
101  /// any variant selections.
102  ///
103  /// If it is impossible to author any of the necessary PrimSpecs, (for
104  /// example, in case \a path cannot map to the current UsdEditTarget's
105  /// namespace) issue an error and return an invalid \a UsdPrim.
106  ///
107  /// Note that this method may return a defined prim whose typeName does not
108  /// specify this schema class, in case a stronger typeName opinion overrides
109  /// the opinion at the current EditTarget.
110  ///
112  static UsdPhysicsFixedJoint
113  Define(const UsdStagePtr &stage, const SdfPath &path);
114 
115 protected:
116  /// Returns the kind of schema this class belongs to.
117  ///
118  /// \sa UsdSchemaKind
120  UsdSchemaKind _GetSchemaKind() const override;
121 
122 private:
123  // needs to invoke _GetStaticTfType.
124  friend class UsdSchemaRegistry;
126  static const TfType &_GetStaticTfType();
127 
128  static bool _IsTypedSchema();
129 
130  // override SchemaBase virtuals.
132  const TfType &_GetTfType() const override;
133 
134 public:
135  // ===================================================================== //
136  // Feel free to add custom code below this line, it will be preserved by
137  // the code generator.
138  //
139  // Just remember to:
140  // - Close the class declaration with };
141  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
142  // - Close the include guard with #endif
143  // ===================================================================== //
144  // --(BEGIN CUSTOM CODE)--
145 };
146 
148 
149 #endif
UsdPhysicsFixedJoint(const UsdPrim &prim=UsdPrim())
Definition: fixedJoint.h:52
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
static const UsdSchemaKind schemaKind
Definition: fixedJoint.h:46
USDPHYSICS_API UsdSchemaKind _GetSchemaKind() const override
UsdPhysicsFixedJoint(const UsdSchemaBase &schemaObj)
Definition: fixedJoint.h:60
virtual USDPHYSICS_API ~UsdPhysicsFixedJoint()
Destructor.
Represents a concrete typed schema.
Definition: prim.h:116
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440
Definition: path.h:273
#define USDPHYSICS_API
Definition: api.h:23
UsdSchemaKind
Definition: common.h:112
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
static USDPHYSICS_API UsdPhysicsFixedJoint Get(const UsdStagePtr &stage, const SdfPath &path)
Definition: type.h:47
static USDPHYSICS_API UsdPhysicsFixedJoint Define(const UsdStagePtr &stage, const SdfPath &path)
static USDPHYSICS_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)