HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
geomXformVectorsSchema.h
Go to the documentation of this file.
1 //
2 // Copyright 2023 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 ////////////////////////////////////////////////////////////////////////
8 
9 /* ************************************************************************** */
10 /* ** ** */
11 /* ** This file is generated by a script. ** */
12 /* ** ** */
13 /* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
14 /* ** Edit hdSchemaDefs.py instead to make changes. ** */
15 /* ** ** */
16 /* ************************************************************************** */
17 
18 #ifndef PXR_USD_IMAGING_USD_IMAGING_GEOM_XFORM_VECTORS_SCHEMA_H
19 #define PXR_USD_IMAGING_USD_IMAGING_GEOM_XFORM_VECTORS_SCHEMA_H
20 
21 /// \file
22 
24 
25 #include "pxr/imaging/hd/schema.h"
26 
27 // --(BEGIN CUSTOM CODE: Includes)--
28 // --(END CUSTOM CODE: Includes)--
29 
31 
32 // --(BEGIN CUSTOM CODE: Declares)--
33 // --(END CUSTOM CODE: Declares)--
34 
35 #define USD_IMAGING_GEOM_XFORM_VECTORS_SCHEMA_TOKENS \
36  (geomXformVectors) \
37  (translation) \
38  (rotation) \
39  (rotationOrder) \
40  (scale) \
41  (pivot) \
42 
43 TF_DECLARE_PUBLIC_TOKENS(UsdImagingGeomXformVectorsSchemaTokens, USDIMAGING_API,
45 
46 //-----------------------------------------------------------------------------
47 
48 
49 /// \class UsdImagingGeomXformVectorsSchema
50 ///
51 /// The UsdImagingGeomXformVectorsSchema exposes the result of
52 /// UsdGeomXformCommonAPI::GetXformVectorsByAccumulation(). This is a
53 /// decomposition of the USD transformation operations that includes more
54 /// information than is available in the xform matrix value, such as the pivot
55 /// offset. This schema is intended for read-only access to data stored in USD;
56 /// it is otherwise inert and does not participate in or imply any subsequent
57 /// computations.
58 ///
60 {
61 public:
62  /// \name Schema retrieval
63  /// @{
64 
65  UsdImagingGeomXformVectorsSchema(HdContainerDataSourceHandle container)
66  : HdSchema(container) {}
67 
68  /// Retrieves a container data source with the schema's default name token
69  /// "geomXformVectors" from the parent container and constructs a
70  /// UsdImagingGeomXformVectorsSchema instance.
71  /// Because the requested container data source may not exist, the result
72  /// should be checked with IsDefined() or a bool comparison before use.
75  const HdContainerDataSourceHandle &fromParentContainer);
76 
77  /// @}
78 
79 // --(BEGIN CUSTOM CODE: Schema Methods)--
80 // --(END CUSTOM CODE: Schema Methods)--
81 
82  /// \name Member accessor
83  /// @{
84 
87 
90 
93 
96 
99 
100  /// @}
101 
102  /// \name Schema location
103  /// @{
104 
105  /// Returns a token where the container representing this schema is found in
106  /// a container by default.
108  static const TfToken &GetSchemaToken();
109 
110  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
111  /// where the container representing this schema is found by default.
113  static const HdDataSourceLocator &GetDefaultLocator();
114 
115  /// @}
116 
117  /// \name Schema construction
118  /// @{
119 
120  /// \deprecated Use Builder instead.
121  ///
122  /// Builds a container data source which includes the provided child data
123  /// sources. Parameters with nullptr values are excluded. This is a
124  /// low-level interface. For cases in which it's desired to define
125  /// the container with a sparse set of child fields, the Builder class
126  /// is often more convenient and readable.
128  static HdContainerDataSourceHandle
130  const HdVec3dDataSourceHandle &translation,
132  const HdTokenDataSourceHandle &rotationOrder,
135  );
136 
137  /// \class UsdImagingGeomXformVectorsSchema::Builder
138  ///
139  /// Utility class for setting sparse sets of child data source fields to be
140  /// filled as arguments into BuildRetained. Because all setter methods
141  /// return a reference to the instance, this can be used in the "builder
142  /// pattern" form.
143  class Builder
144  {
145  public:
148  const HdVec3dDataSourceHandle &translation);
154  const HdTokenDataSourceHandle &rotationOrder);
156  Builder &SetScale(
159  Builder &SetPivot(
161 
162  /// Returns a container data source containing the members set thus far.
164  HdContainerDataSourceHandle Build();
165 
166  private:
167  HdVec3dDataSourceHandle _translation;
168  HdVec3fDataSourceHandle _rotation;
169  HdTokenDataSourceHandle _rotationOrder;
172 
173  };
174 
175  /// @}
176 };
177 
179 
180 #endif
static USDIMAGING_API const HdDataSourceLocator & GetDefaultLocator()
HdVec3dDataSource::Handle HdVec3dDataSourceHandle
USDIMAGING_API HdVec3fDataSourceHandle GetRotation() const
#define USDIMAGING_API
Definition: api.h:23
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
USDIMAGING_API HdVec3dDataSourceHandle GetTranslation() const
USDIMAGING_API HdVec3fDataSourceHandle GetScale() const
USDIMAGING_API Builder & SetRotation(const HdVec3fDataSourceHandle &rotation)
GA_API const UT_StringHolder scale
Definition: token.h:70
USDIMAGING_API HdTokenDataSourceHandle GetRotationOrder() const
#define USD_IMAGING_GEOM_XFORM_VECTORS_SCHEMA_TOKENS
SIM_API const UT_StringHolder rotation
HdVec3fDataSource::Handle HdVec3fDataSourceHandle
USDIMAGING_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
static USDIMAGING_API const TfToken & GetSchemaToken()
UsdImagingGeomXformVectorsSchema(HdContainerDataSourceHandle container)
static USDIMAGING_API UsdImagingGeomXformVectorsSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
USDIMAGING_API Builder & SetTranslation(const HdVec3dDataSourceHandle &translation)
TF_DECLARE_PUBLIC_TOKENS(UsdImagingGeomXformVectorsSchemaTokens, USDIMAGING_API, USD_IMAGING_GEOM_XFORM_VECTORS_SCHEMA_TOKENS)
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
USDIMAGING_API HdVec3fDataSourceHandle GetPivot() const
GA_API const UT_StringHolder pivot
static USDIMAGING_API HdContainerDataSourceHandle BuildRetained(const HdVec3dDataSourceHandle &translation, const HdVec3fDataSourceHandle &rotation, const HdTokenDataSourceHandle &rotationOrder, const HdVec3fDataSourceHandle &scale, const HdVec3fDataSourceHandle &pivot)
USDIMAGING_API Builder & SetRotationOrder(const HdTokenDataSourceHandle &rotationOrder)
HdTokenDataSource::Handle HdTokenDataSourceHandle
USDIMAGING_API Builder & SetScale(const HdVec3fDataSourceHandle &scale)
USDIMAGING_API Builder & SetPivot(const HdVec3fDataSourceHandle &pivot)