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 
51 /// \class UsdSkelImagingBlendShapeSchema
52 ///
53 /// Corresponds to UsdSkelBlendShape.
54 ///
56 {
57 public:
58  /// \name Schema retrieval
59  /// @{
60 
61  UsdSkelImagingBlendShapeSchema(HdContainerDataSourceHandle container)
62  : HdSchema(container) {}
63 
64  /// Retrieves a container data source with the schema's default name token
65  /// "skelBlendShape" from the parent container and constructs a
66  /// UsdSkelImagingBlendShapeSchema instance.
67  /// Because the requested container data source may not exist, the result
68  /// should be checked with IsDefined() or a bool comparison before use.
71  const HdContainerDataSourceHandle &fromParentContainer);
72 
73  /// @}
74 
75 // --(BEGIN CUSTOM CODE: Schema Methods)--
76 // --(END CUSTOM CODE: Schema Methods)--
77 
78  /// \name Member accessor
79  /// @{
80 
83 
86 
89 
92 
93  /// @}
94 
95  /// \name Schema location
96  /// @{
97 
98  /// Returns a token where the container representing this schema is found in
99  /// a container by default.
101  static const TfToken &GetSchemaToken();
102 
103  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
104  /// where the container representing this schema is found by default.
106  static const HdDataSourceLocator &GetDefaultLocator();
107 
108  /// @}
109 
110  /// \name Data source locators for members
111  ///
112  /// The following methods return an HdDataSourceLocator (relative to the
113  /// prim-level data source) where the data source for a member can be found.
114  ///
115  /// This is often useful for checking intersection against the
116  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
117  /// @{
118 
119  /// Prim-level relative data source locator to locate offsets.
121  static const HdDataSourceLocator &GetOffsetsLocator();
122 
123  /// Prim-level relative data source locator to locate normalOffsets.
126 
127  /// Prim-level relative data source locator to locate pointIndices.
130 
131  /// Prim-level relative data source locator to locate inbetweenShapes.
134  /// @}
135 
136  /// \name Schema construction
137  /// @{
138 
139  /// \deprecated Use Builder instead.
140  ///
141  /// Builds a container data source which includes the provided child data
142  /// sources. Parameters with nullptr values are excluded. This is a
143  /// low-level interface. For cases in which it's desired to define
144  /// the container with a sparse set of child fields, the Builder class
145  /// is often more convenient and readable.
147  static HdContainerDataSourceHandle
150  const HdVec3fArrayDataSourceHandle &normalOffsets,
151  const HdIntArrayDataSourceHandle &pointIndices,
152  const HdContainerDataSourceHandle &inbetweenShapes
153  );
154 
155  /// \class UsdSkelImagingBlendShapeSchema::Builder
156  ///
157  /// Utility class for setting sparse sets of child data source fields to be
158  /// filled as arguments into BuildRetained. Because all setter methods
159  /// return a reference to the instance, this can be used in the "builder
160  /// pattern" form.
161  class Builder
162  {
163  public:
169  const HdVec3fArrayDataSourceHandle &normalOffsets);
172  const HdIntArrayDataSourceHandle &pointIndices);
175  const HdContainerDataSourceHandle &inbetweenShapes);
176 
177  /// Returns a container data source containing the members set thus far.
179  HdContainerDataSourceHandle Build();
180 
181  private:
183  HdVec3fArrayDataSourceHandle _normalOffsets;
184  HdIntArrayDataSourceHandle _pointIndices;
185  HdContainerDataSourceHandle _inbetweenShapes;
186 
187  };
188 
189  /// @}
190 };
191 
193 
194 #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
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
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
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)