HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nurbsPatchTrimCurveSchema.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_NURBS_PATCH_TRIM_CURVE_SCHEMA_H
19 #define PXR_IMAGING_HD_NURBS_PATCH_TRIM_CURVE_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_NURBS_PATCH_TRIM_CURVE_SCHEMA_TOKENS \
36  (trimCurve) \
37  (counts) \
38  (orders) \
39  (vertexCounts) \
40  (knots) \
41  (ranges) \
42  (points) \
43 
44 TF_DECLARE_PUBLIC_TOKENS(HdNurbsPatchTrimCurveSchemaTokens, HD_API,
46 
47 //-----------------------------------------------------------------------------
48 
49 
51 {
52 public:
53  /// \name Schema retrieval
54  /// @{
55 
56  HdNurbsPatchTrimCurveSchema(HdContainerDataSourceHandle container)
57  : HdSchema(container) {}
58 
59  /// Retrieves a container data source with the schema's default name token
60  /// "trimCurve" from the parent container and constructs a
61  /// HdNurbsPatchTrimCurveSchema instance.
62  /// Because the requested container data source may not exist, the result
63  /// should be checked with IsDefined() or a bool comparison before use.
64  HD_API
66  const HdContainerDataSourceHandle &fromParentContainer);
67 
68  /// @}
69 
70 // --(BEGIN CUSTOM CODE: Schema Methods)--
71 // --(END CUSTOM CODE: Schema Methods)--
72 
73  /// \name Member accessor
74  /// @{
75 
76  HD_API
78 
79  HD_API
81 
82  HD_API
84 
85  HD_API
87 
88  HD_API
90 
91  HD_API
93 
94  /// @}
95 
96  /// \name Schema location
97  /// @{
98 
99  /// Returns a token where the container representing this schema is found in
100  /// a container by default.
101  HD_API
102  static const TfToken &GetSchemaToken();
103 
104  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
105  /// where the container representing this schema is found by default.
106  HD_API
107  static const HdDataSourceLocator &GetDefaultLocator();
108 
109  /// @}
110 
111  /// \name Schema construction
112  /// @{
113 
114  /// \deprecated Use Builder instead.
115  ///
116  /// Builds a container data source which includes the provided child data
117  /// sources. Parameters with nullptr values are excluded. This is a
118  /// low-level interface. For cases in which it's desired to define
119  /// the container with a sparse set of child fields, the Builder class
120  /// is often more convenient and readable.
121  HD_API
122  static HdContainerDataSourceHandle
124  const HdIntArrayDataSourceHandle &counts,
125  const HdIntArrayDataSourceHandle &orders,
126  const HdIntArrayDataSourceHandle &vertexCounts,
127  const HdDoubleArrayDataSourceHandle &knots,
128  const HdVec2dArrayDataSourceHandle &ranges,
130  );
131 
132  /// \class HdNurbsPatchTrimCurveSchema::Builder
133  ///
134  /// Utility class for setting sparse sets of child data source fields to be
135  /// filled as arguments into BuildRetained. Because all setter methods
136  /// return a reference to the instance, this can be used in the "builder
137  /// pattern" form.
138  class Builder
139  {
140  public:
141  HD_API
143  const HdIntArrayDataSourceHandle &counts);
144  HD_API
146  const HdIntArrayDataSourceHandle &orders);
147  HD_API
149  const HdIntArrayDataSourceHandle &vertexCounts);
150  HD_API
151  Builder &SetKnots(
152  const HdDoubleArrayDataSourceHandle &knots);
153  HD_API
155  const HdVec2dArrayDataSourceHandle &ranges);
156  HD_API
159 
160  /// Returns a container data source containing the members set thus far.
161  HD_API
162  HdContainerDataSourceHandle Build();
163 
164  private:
167  HdIntArrayDataSourceHandle _vertexCounts;
171 
172  };
173 
174  /// @}
175 };
176 
178 
179 #endif
static HD_API const HdDataSourceLocator & GetDefaultLocator()
HD_API Builder & SetVertexCounts(const HdIntArrayDataSourceHandle &vertexCounts)
static HD_API HdContainerDataSourceHandle BuildRetained(const HdIntArrayDataSourceHandle &counts, const HdIntArrayDataSourceHandle &orders, const HdIntArrayDataSourceHandle &vertexCounts, const HdDoubleArrayDataSourceHandle &knots, const HdVec2dArrayDataSourceHandle &ranges, const HdVec3dArrayDataSourceHandle &points)
GLdouble GLdouble GLint GLint const GLdouble * points
Definition: glad.h:2676
HdVec3dArrayDataSource::Handle HdVec3dArrayDataSourceHandle
HD_API HdVec2dArrayDataSourceHandle GetRanges() const
#define HD_NURBS_PATCH_TRIM_CURVE_SCHEMA_TOKENS
#define HD_API
Definition: api.h:23
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
HD_API HdVec3dArrayDataSourceHandle GetPoints() const
HD_API Builder & SetKnots(const HdDoubleArrayDataSourceHandle &knots)
TF_DECLARE_PUBLIC_TOKENS(HdNurbsPatchTrimCurveSchemaTokens, HD_API, HD_NURBS_PATCH_TRIM_CURVE_SCHEMA_TOKENS)
HD_API HdIntArrayDataSourceHandle GetCounts() const
HdDoubleArrayDataSource::Handle HdDoubleArrayDataSourceHandle
Definition: token.h:70
HdIntArrayDataSource::Handle HdIntArrayDataSourceHandle
HD_API HdIntArrayDataSourceHandle GetVertexCounts() const
HD_API Builder & SetOrders(const HdIntArrayDataSourceHandle &orders)
static HD_API const TfToken & GetSchemaToken()
HD_API Builder & SetRanges(const HdVec2dArrayDataSourceHandle &ranges)
HdVec2dArrayDataSource::Handle HdVec2dArrayDataSourceHandle
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
HD_API Builder & SetCounts(const HdIntArrayDataSourceHandle &counts)
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
static HD_API HdNurbsPatchTrimCurveSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
HD_API HdDoubleArrayDataSourceHandle GetKnots() const
HdNurbsPatchTrimCurveSchema(HdContainerDataSourceHandle container)
HD_API Builder & SetPoints(const HdVec3dArrayDataSourceHandle &points)
HD_API HdIntArrayDataSourceHandle GetOrders() const