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 
50 {
51 public:
52  /// \name Schema retrieval
53  /// @{
54 
55  HdBasisCurvesTopologySchema(HdContainerDataSourceHandle container)
56  : HdSchema(container) {}
57 
58  /// Retrieves a container data source with the schema's default name token
59  /// "topology" from the parent container and constructs a
60  /// HdBasisCurvesTopologySchema instance.
61  /// Because the requested container data source may not exist, the result
62  /// should be checked with IsDefined() or a bool comparison before use.
63  HD_API
65  const HdContainerDataSourceHandle &fromParentContainer);
66 
67  /// @}
68 
69 // --(BEGIN CUSTOM CODE: Schema Methods)--
70 // --(END CUSTOM CODE: Schema Methods)--
71 
72  /// \name Member accessor
73  /// @{
74 
75  HD_API
77 
78  HD_API
80 
81  HD_API
83 
84  HD_API
86 
87  HD_API
89 
90  /// @}
91 
92  /// \name Schema location
93  /// @{
94 
95  /// Returns a token where the container representing this schema is found in
96  /// a container by default.
97  HD_API
98  static const TfToken &GetSchemaToken();
99 
100  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
101  /// where the container representing this schema is found by default.
102  HD_API
103  static const HdDataSourceLocator &GetDefaultLocator();
104 
105  /// @}
106 
107  /// \name Schema construction
108  /// @{
109 
110  /// \deprecated Use Builder instead.
111  ///
112  /// Builds a container data source which includes the provided child data
113  /// sources. Parameters with nullptr values are excluded. This is a
114  /// low-level interface. For cases in which it's desired to define
115  /// the container with a sparse set of child fields, the Builder class
116  /// is often more convenient and readable.
117  HD_API
118  static HdContainerDataSourceHandle
120  const HdIntArrayDataSourceHandle &curveVertexCounts,
121  const HdIntArrayDataSourceHandle &curveIndices,
122  const HdTokenDataSourceHandle &basis,
124  const HdTokenDataSourceHandle &wrap
125  );
126 
127  /// \class HdBasisCurvesTopologySchema::Builder
128  ///
129  /// Utility class for setting sparse sets of child data source fields to be
130  /// filled as arguments into BuildRetained. Because all setter methods
131  /// return a reference to the instance, this can be used in the "builder
132  /// pattern" form.
133  class Builder
134  {
135  public:
136  HD_API
138  const HdIntArrayDataSourceHandle &curveVertexCounts);
139  HD_API
141  const HdIntArrayDataSourceHandle &curveIndices);
142  HD_API
143  Builder &SetBasis(
144  const HdTokenDataSourceHandle &basis);
145  HD_API
146  Builder &SetType(
148  HD_API
149  Builder &SetWrap(
150  const HdTokenDataSourceHandle &wrap);
151 
152  /// Returns a container data source containing the members set thus far.
153  HD_API
154  HdContainerDataSourceHandle Build();
155 
156  private:
157  HdIntArrayDataSourceHandle _curveVertexCounts;
158  HdIntArrayDataSourceHandle _curveIndices;
162 
163  };
164 
165  /// @}
166 };
167 
169 
170 #endif
HD_API HdTokenDataSourceHandle GetBasis() const
HD_API Builder & SetType(const HdTokenDataSourceHandle &type)
HD_API HdIntArrayDataSourceHandle GetCurveIndices() const
HD_API HdTokenDataSourceHandle GetWrap() const
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)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#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