HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
houdiniMetaCurves.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 USDHOUDINI_GENERATED_HOUDINIMETACURVES_H
8 #define USDHOUDINI_GENERATED_HOUDINIMETACURVES_H
9 
10 /// \file usdHoudini/houdiniMetaCurves.h
11 
12 #include "pxr/pxr.h"
13 #include "./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 // HOUDINIMETACURVES //
33 // -------------------------------------------------------------------------- //
34 
35 /// \class UsdHoudiniHoudiniMetaCurves
36 ///
37 /// Houdini metacurves primitive. This curves primitive subclass
38 /// defines a subcurve with attributes on each point of the
39 /// original curve.
40 ///
41 class
44 {
45 public:
46  /// Compile time constant representing what kind of schema this class is.
47  ///
48  /// \sa UsdSchemaKind
49  static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
50 
51  /// Construct a UsdHoudiniHoudiniMetaCurves on UsdPrim \p prim .
52  /// Equivalent to UsdHoudiniHoudiniMetaCurves::Get(prim.GetStage(), prim.GetPath())
53  /// for a \em valid \p prim, but will not immediately throw an error for
54  /// an invalid \p prim
56  : UsdGeomBasisCurves(prim)
57  {
58  }
59 
60  /// Construct a UsdHoudiniHoudiniMetaCurves on the prim held by \p schemaObj .
61  /// Should be preferred over UsdHoudiniHoudiniMetaCurves(schemaObj.GetPrim()),
62  /// as it preserves SchemaBase state.
63  explicit UsdHoudiniHoudiniMetaCurves(const UsdSchemaBase& schemaObj)
64  : UsdGeomBasisCurves(schemaObj)
65  {
66  }
67 
68  /// Destructor.
69  virtual ~UsdHoudiniHoudiniMetaCurves() override;
70 
71  /// Return a vector of names of all pre-declared attributes for this schema
72  /// class and all its ancestor classes. Does not include attributes that
73  /// may be authored by custom/extended methods of the schemas involved.
74  static const TfTokenVector &
75  GetSchemaAttributeNames(bool includeInherited=true);
76 
77  /// Return a UsdHoudiniHoudiniMetaCurves holding the prim adhering to this
78  /// schema at \p path on \p stage. If no prim exists at \p path on
79  /// \p stage, or if the prim at that path does not adhere to this schema,
80  /// return an invalid schema object. This is shorthand for the following:
81  ///
82  /// \code
83  /// UsdHoudiniHoudiniMetaCurves(stage->GetPrimAtPath(path));
84  /// \endcode
85  ///
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  Define(const UsdStagePtr &stage, const SdfPath &path);
113 
114 protected:
115  /// Returns the kind of schema this class belongs to.
116  ///
117  /// \sa UsdSchemaKind
118  UsdSchemaKind _GetSchemaKind() const override;
119 
120 private:
121  // needs to invoke _GetStaticTfType.
122  friend class UsdSchemaRegistry;
123  static const TfType &_GetStaticTfType();
124 
125  static bool _IsTypedSchema();
126 
127  // override SchemaBase virtuals.
128  const TfType &_GetTfType() const override;
129 
130 public:
131  // ===================================================================== //
132  // Feel free to add custom code below this line, it will be preserved by
133  // the code generator.
134  //
135  // Just remember to:
136  // - Close the class declaration with };
137  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
138  // - Close the include guard with #endif
139  // ===================================================================== //
140  // --(BEGIN CUSTOM CODE)--
141 };
142 
144 
145 #endif
#define USDHOUDINI_API
Definition: api.h:23
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
Represents a concrete typed schema.
Definition: prim.h:116
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440
Definition: path.h:273
UsdHoudiniHoudiniMetaCurves(const UsdPrim &prim=UsdPrim())
UsdSchemaKind
Definition: common.h:112
UsdHoudiniHoudiniMetaCurves(const UsdSchemaBase &schemaObj)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
Definition: type.h:47