HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
basisCurvesTopologySchema.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_IMAGING_HD_BASIS_CURVES_TOPOLOGY_SCHEMA_H
19 #define PXR_IMAGING_HD_BASIS_CURVES_TOPOLOGY_SCHEMA_H
20 
21 /// \file
22 
23 #include "pxr/imaging/hd/api.h"
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 HD_BASIS_CURVES_TOPOLOGY_SCHEMA_TOKENS \
36  (topology) \
37  (curveVertexCounts) \
38  (curveIndices) \
39  (basis) \
40  (type) \
41  (wrap) \
42 
43 TF_DECLARE_PUBLIC_TOKENS(HdBasisCurvesTopologySchemaTokens, HD_API,
45 
46 //-----------------------------------------------------------------------------
47 
48 
49 /// \class HdBasisCurvesTopologySchema
50 ///
52 {
53 public:
54  /// \name Schema retrieval
55  /// @{
56 
57  HdBasisCurvesTopologySchema(HdContainerDataSourceHandle container)
58  : HdSchema(container) {}
59 
60  /// Retrieves a container data source with the schema's default name token
61  /// "topology" from the parent container and constructs a
62  /// HdBasisCurvesTopologySchema instance.
63  /// Because the requested container data source may not exist, the result
64  /// should be checked with IsDefined() or a bool comparison before use.
65  HD_API
67  const HdContainerDataSourceHandle &fromParentContainer);
68 
69  /// @}
70 
71 // --(BEGIN CUSTOM CODE: Schema Methods)--
72 // --(END CUSTOM CODE: Schema Methods)--
73 
74  /// \name Member accessor
75  /// @{
76 
77  HD_API
79 
80  HD_API
82 
83  HD_API
85 
86  HD_API
88 
89  HD_API
91 
92  /// @}
93 
94  /// \name Schema location
95  /// @{
96 
97  /// Returns a token where the container representing this schema is found in
98  /// a container by default.
99  HD_API
100  static const TfToken &GetSchemaToken();
101 
102  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
103  /// where the container representing this schema is found by default.
104  HD_API
105  static const HdDataSourceLocator &GetDefaultLocator();
106 
107  /// @}
108 
109  /// \name Schema construction
110  /// @{
111 
112  /// \deprecated Use Builder instead.
113  ///
114  /// Builds a container data source which includes the provided child data
115  /// sources. Parameters with nullptr values are excluded. This is a
116  /// low-level interface. For cases in which it's desired to define
117  /// the container with a sparse set of child fields, the Builder class
118  /// is often more convenient and readable.
119  HD_API
120  static HdContainerDataSourceHandle
122  const HdIntArrayDataSourceHandle &curveVertexCounts,
123  const HdIntArrayDataSourceHandle &curveIndices,
124  const HdTokenDataSourceHandle &basis,
126  const HdTokenDataSourceHandle &wrap
127  );
128 
129  /// \class HdBasisCurvesTopologySchema::Builder
130  ///
131  /// Utility class for setting sparse sets of child data source fields to be
132  /// filled as arguments into BuildRetained. Because all setter methods
133  /// return a reference to the instance, this can be used in the "builder
134  /// pattern" form.
135  class Builder
136  {
137  public:
138  HD_API
140  const HdIntArrayDataSourceHandle &curveVertexCounts);
141  HD_API
143  const HdIntArrayDataSourceHandle &curveIndices);
144  HD_API
145  Builder &SetBasis(
146  const HdTokenDataSourceHandle &basis);
147  HD_API
148  Builder &SetType(
150  HD_API
151  Builder &SetWrap(
152  const HdTokenDataSourceHandle &wrap);
153 
154  /// Returns a container data source containing the members set thus far.
155  HD_API
156  HdContainerDataSourceHandle Build();
157 
158  private:
159  HdIntArrayDataSourceHandle _curveVertexCounts;
160  HdIntArrayDataSourceHandle _curveIndices;
164 
165  };
166 
167  /// @}
168 };
169 
171 
172 #endif
HD_API HdTokenDataSourceHandle GetBasis() const
HD_API Builder & SetType(const HdTokenDataSourceHandle &type)
HD_API HdIntArrayDataSourceHandle GetCurveIndices() const
HD_API HdTokenDataSourceHandle GetWrap() const
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
HD_API Builder & SetCurveVertexCounts(const HdIntArrayDataSourceHandle &curveVertexCounts)
#define HD_API
Definition: api.h:23
HD_API Builder & SetWrap(const HdTokenDataSourceHandle &wrap)
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
HdBasisCurvesTopologySchema(HdContainerDataSourceHandle container)
HD_API Builder & SetBasis(const HdTokenDataSourceHandle &basis)
static HD_API const TfToken & GetSchemaToken()
#define HD_BASIS_CURVES_TOPOLOGY_SCHEMA_TOKENS
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
Definition: token.h:70
static HD_API HdContainerDataSourceHandle BuildRetained(const HdIntArrayDataSourceHandle &curveVertexCounts, const HdIntArrayDataSourceHandle &curveIndices, const HdTokenDataSourceHandle &basis, const HdTokenDataSourceHandle &type, const HdTokenDataSourceHandle &wrap)
HdIntArrayDataSource::Handle HdIntArrayDataSourceHandle
HD_API HdTokenDataSourceHandle GetType() const
TF_DECLARE_PUBLIC_TOKENS(HdBasisCurvesTopologySchemaTokens, HD_API, HD_BASIS_CURVES_TOPOLOGY_SCHEMA_TOKENS)
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
static HD_API const HdDataSourceLocator & GetDefaultLocator()
HD_API Builder & SetCurveIndices(const HdIntArrayDataSourceHandle &curveIndices)
static HD_API HdBasisCurvesTopologySchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
HD_API HdIntArrayDataSourceHandle GetCurveVertexCounts() const
HdTokenDataSource::Handle HdTokenDataSourceHandle