HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
blendShapeSchema.h
Go to the documentation of this file.
1 //
2 // Copyright 2025 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_SKEL_IMAGING_BLEND_SHAPE_SCHEMA_H
19 #define PXR_USD_IMAGING_USD_SKEL_IMAGING_BLEND_SHAPE_SCHEMA_H
20 
21 /// \file
22 
24 
25 #include "pxr/imaging/hd/schema.h"
26 
27 // --(BEGIN CUSTOM CODE: Includes)--
29 // --(END CUSTOM CODE: Includes)--
30 
32 
33 // --(BEGIN CUSTOM CODE: Declares)--
36 // --(END CUSTOM CODE: Declares)--
37 
38 #define USD_SKEL_IMAGING_BLEND_SHAPE_SCHEMA_TOKENS \
39  (skelBlendShape) \
40  (offsets) \
41  (normalOffsets) \
42  (pointIndices) \
43  (inbetweenShapes) \
44 
45 TF_DECLARE_PUBLIC_TOKENS(UsdSkelImagingBlendShapeSchemaTokens, USDSKELIMAGING_API,
47 
48 //-----------------------------------------------------------------------------
49 
50 // Corresponds to UsdSkelBlendShape.
51 //
52 
54 {
55 public:
56  /// \name Schema retrieval
57  /// @{
58 
59  UsdSkelImagingBlendShapeSchema(HdContainerDataSourceHandle container)
60  : HdSchema(container) {}
61 
62  /// Retrieves a container data source with the schema's default name token
63  /// "skelBlendShape" from the parent container and constructs a
64  /// UsdSkelImagingBlendShapeSchema instance.
65  /// Because the requested container data source may not exist, the result
66  /// should be checked with IsDefined() or a bool comparison before use.
69  const HdContainerDataSourceHandle &fromParentContainer);
70 
71  /// @}
72 
73 // --(BEGIN CUSTOM CODE: Schema Methods)--
74 // --(END CUSTOM CODE: Schema Methods)--
75 
76  /// \name Member accessor
77  /// @{
78 
81 
84 
87 
90 
91  /// @}
92 
93  /// \name Schema location
94  /// @{
95 
96  /// Returns a token where the container representing this schema is found in
97  /// a container by default.
99  static const TfToken &GetSchemaToken();
100 
101  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
102  /// where the container representing this schema is found by default.
104  static const HdDataSourceLocator &GetDefaultLocator();
105 
106  /// @}
107 
108  /// \name Data source locators for members
109  ///
110  /// The following methods return an HdDataSourceLocator (relative to the
111  /// prim-level data source) where the data source for a member can be found.
112  ///
113  /// This is often useful for checking intersection against the
114  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
115  /// @{
116 
117  /// Prim-level relative data source locator to locate offsets.
119  static const HdDataSourceLocator &GetOffsetsLocator();
120 
121  /// Prim-level relative data source locator to locate normalOffsets.
124 
125  /// Prim-level relative data source locator to locate pointIndices.
128 
129  /// Prim-level relative data source locator to locate inbetweenShapes.
132  /// @}
133 
134  /// \name Schema construction
135  /// @{
136 
137  /// \deprecated Use Builder instead.
138  ///
139  /// Builds a container data source which includes the provided child data
140  /// sources. Parameters with nullptr values are excluded. This is a
141  /// low-level interface. For cases in which it's desired to define
142  /// the container with a sparse set of child fields, the Builder class
143  /// is often more convenient and readable.
145  static HdContainerDataSourceHandle
148  const HdVec3fArrayDataSourceHandle &normalOffsets,
149  const HdIntArrayDataSourceHandle &pointIndices,
150  const HdContainerDataSourceHandle &inbetweenShapes
151  );
152 
153  /// \class UsdSkelImagingBlendShapeSchema::Builder
154  ///
155  /// Utility class for setting sparse sets of child data source fields to be
156  /// filled as arguments into BuildRetained. Because all setter methods
157  /// return a reference to the instance, this can be used in the "builder
158  /// pattern" form.
159  class Builder
160  {
161  public:
167  const HdVec3fArrayDataSourceHandle &normalOffsets);
170  const HdIntArrayDataSourceHandle &pointIndices);
173  const HdContainerDataSourceHandle &inbetweenShapes);
174 
175  /// Returns a container data source containing the members set thus far.
177  HdContainerDataSourceHandle Build();
178 
179  private:
181  HdVec3fArrayDataSourceHandle _normalOffsets;
182  HdIntArrayDataSourceHandle _pointIndices;
183  HdContainerDataSourceHandle _inbetweenShapes;
184 
185  };
186 
187  /// @}
188 };
189 
191 
192 #endif
USDSKELIMAGING_API Builder & SetOffsets(const HdVec3fArrayDataSourceHandle &offsets)
UsdSkelImagingBlendShapeSchema(HdContainerDataSourceHandle container)
static USDSKELIMAGING_API const HdDataSourceLocator & GetPointIndicesLocator()
Prim-level relative data source locator to locate pointIndices.
static USDSKELIMAGING_API const TfToken & GetSchemaToken()
static USDSKELIMAGING_API UsdSkelImagingBlendShapeSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
USDSKELIMAGING_API HdVec3fArrayDataSourceHandle GetOffsets() const
USDSKELIMAGING_API HdVec3fArrayDataSourceHandle GetNormalOffsets() const
USDSKELIMAGING_API Builder & SetInbetweenShapes(const HdContainerDataSourceHandle &inbetweenShapes)
static USDSKELIMAGING_API const HdDataSourceLocator & GetOffsetsLocator()
Prim-level relative data source locator to locate offsets.
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glcorearb.h:2621
Definition: token.h:70
HdIntArrayDataSource::Handle HdIntArrayDataSourceHandle
static USDSKELIMAGING_API const HdDataSourceLocator & GetInbetweenShapesLocator()
Prim-level relative data source locator to locate inbetweenShapes.
TF_DECLARE_PUBLIC_TOKENS(UsdSkelImagingBlendShapeSchemaTokens, USDSKELIMAGING_API, USD_SKEL_IMAGING_BLEND_SHAPE_SCHEMA_TOKENS)
USDSKELIMAGING_API UsdSkelImagingInbetweenShapeContainerSchema GetInbetweenShapes() const
HdVec3fArrayDataSource::Handle HdVec3fArrayDataSourceHandle
USDSKELIMAGING_API Builder & SetPointIndices(const HdIntArrayDataSourceHandle &pointIndices)
#define USDSKELIMAGING_API
Definition: api.h:23
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
USDSKELIMAGING_API Builder & SetNormalOffsets(const HdVec3fArrayDataSourceHandle &normalOffsets)
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
static USDSKELIMAGING_API const HdDataSourceLocator & GetNormalOffsetsLocator()
Prim-level relative data source locator to locate normalOffsets.
USDSKELIMAGING_API HdIntArrayDataSourceHandle GetPointIndices() const
#define USD_SKEL_IMAGING_BLEND_SHAPE_SCHEMA_TOKENS
static USDSKELIMAGING_API const HdDataSourceLocator & GetDefaultLocator()
USDSKELIMAGING_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
static USDSKELIMAGING_API HdContainerDataSourceHandle BuildRetained(const HdVec3fArrayDataSourceHandle &offsets, const HdVec3fArrayDataSourceHandle &normalOffsets, const HdIntArrayDataSourceHandle &pointIndices, const HdContainerDataSourceHandle &inbetweenShapes)