HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
basisCurvesSchema.h
Go to the documentation of this file.
1 //
2 // Copyright 2023 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 /* ************************************************************************** */
27 /* ** This file is generated by a script. Do not edit directly. Edit ** */
28 /* ** defs.py or the (*)Schema.template.h files to make changes. ** */
29 /* ************************************************************************** */
30 
31 #ifndef PXR_IMAGING_HD_BASIS_CURVES_SCHEMA_H
32 #define PXR_IMAGING_HD_BASIS_CURVES_SCHEMA_H
33 
34 #include "pxr/imaging/hd/api.h"
35 
38 
39 
41 
42 //-----------------------------------------------------------------------------
43 
44 #define HDBASISCURVES_SCHEMA_TOKENS \
45  (basisCurves) \
46  (topology) \
47  (geomSubsets) \
48 
49 TF_DECLARE_PUBLIC_TOKENS(HdBasisCurvesSchemaTokens, HD_API,
51 
52 //-----------------------------------------------------------------------------
53 
55 {
56 public:
57  HdBasisCurvesSchema(HdContainerDataSourceHandle container)
58  : HdSchema(container) {}
59 
60  //ACCESSORS
61 
62  HD_API
64  HD_API
66 
67  // RETRIEVING AND CONSTRUCTING
68 
69  /// Builds a container data source which includes the provided child data
70  /// sources. Parameters with nullptr values are excluded. This is a
71  /// low-level interface. For cases in which it's desired to define
72  /// the container with a sparse set of child fields, the Builder class
73  /// is often more convenient and readable.
74  HD_API
75  static HdContainerDataSourceHandle
77  const HdContainerDataSourceHandle &topology,
78  const HdContainerDataSourceHandle &geomSubsets
79  );
80 
81  /// \class HdBasisCurvesSchema::Builder
82  ///
83  /// Utility class for setting sparse sets of child data source fields to be
84  /// filled as arguments into BuildRetained. Because all setter methods
85  /// return a reference to the instance, this can be used in the "builder
86  /// pattern" form.
87  class Builder
88  {
89  public:
90  HD_API
92  const HdContainerDataSourceHandle &topology);
93  HD_API
95  const HdContainerDataSourceHandle &geomSubsets);
96 
97  /// Returns a container data source containing the members set thus far.
98  HD_API
99  HdContainerDataSourceHandle Build();
100 
101  private:
102  HdContainerDataSourceHandle _topology;
103  HdContainerDataSourceHandle _geomSubsets;
104  };
105 
106  /// Retrieves a container data source with the schema's default name token
107  /// "basisCurves" from the parent container and constructs a
108  /// HdBasisCurvesSchema instance.
109  /// Because the requested container data source may not exist, the result
110  /// should be checked with IsDefined() or a bool comparison before use.
111  HD_API
113  const HdContainerDataSourceHandle &fromParentContainer);
114 
115  /// Returns a token where the container representing this schema is found in
116  /// a container by default.
117  HD_API
118  static const TfToken &GetSchemaToken();
119 
120  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
121  /// where the container representing this schema is found by default.
122  HD_API
123  static const HdDataSourceLocator &GetDefaultLocator();
124 
125 
126  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
127  /// where the topology data source can be found.
128  /// This is often useful for checking intersection against the
129  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
130  HD_API
131  static const HdDataSourceLocator &GetTopologyLocator();
132 
133  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
134  /// where the geomsubsets data source can be found.
135  /// This is often useful for checking intersection against the
136  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
137  HD_API
139 
140 };
141 
143 
144 #endif
static HD_API const HdDataSourceLocator & GetDefaultLocator()
TF_DECLARE_PUBLIC_TOKENS(HdBasisCurvesSchemaTokens, HD_API, HDBASISCURVES_SCHEMA_TOKENS)
#define HD_API
Definition: api.h:40
HdBasisCurvesSchema(HdContainerDataSourceHandle container)
HD_API HdBasisCurvesTopologySchema GetTopology()
HD_API Builder & SetGeomSubsets(const HdContainerDataSourceHandle &geomSubsets)
#define HDBASISCURVES_SCHEMA_TOKENS
Definition: token.h:87
static HD_API const HdDataSourceLocator & GetGeomSubsetsLocator()
static HD_API const TfToken & GetSchemaToken()
GT_API const UT_StringHolder topology
static HD_API const HdDataSourceLocator & GetTopologyLocator()
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1441
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
HD_API HdGeomSubsetsSchema GetGeomSubsets()
static HD_API HdBasisCurvesSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
HD_API Builder & SetTopology(const HdContainerDataSourceHandle &topology)
static HD_API HdContainerDataSourceHandle BuildRetained(const HdContainerDataSourceHandle &topology, const HdContainerDataSourceHandle &geomSubsets)