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