geomSubsetSchema.h
1 //
2 // Copyright 2021 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 //
25 // This file is generated by a script. Do not edit directly. Edit the
26 // schema.template.h file to make changes.
27 
28 #ifndef PXR_IMAGING_HD_GEOM_SUBSET_SCHEMA_H
29 #define PXR_IMAGING_HD_GEOM_SUBSET_SCHEMA_H
30 
31 #include "pxr/imaging/hd/api.h"
32 
33 #include "pxr/imaging/hd/schema.h"
34 
35 PXR_NAMESPACE_OPEN_SCOPE
36 
37 //-----------------------------------------------------------------------------
38 
39 #define HDGEOMSUBSET_SCHEMA_TOKENS \
40  (type) \
41  (indices) \
42  (typeFaceSet) \
43  (typePointSet) \
44  (typeCurveSet) \
45 
46 TF_DECLARE_PUBLIC_TOKENS(HdGeomSubsetSchemaTokens, HD_API,
47  HDGEOMSUBSET_SCHEMA_TOKENS);
48 
49 //-----------------------------------------------------------------------------
50 
51 class HdGeomSubsetSchema : public HdSchema
52 {
53 public:
54  HdGeomSubsetSchema(HdContainerDataSourceHandle container)
55  : HdSchema(container) {}
56 
57  //ACCESSORS
58 
59  HD_API
60  HdTokenDataSourceHandle GetType();
61  HD_API
62  HdIntArrayDataSourceHandle GetIndices();
63 
64  // RETRIEVING AND CONSTRUCTING
65 
71  HD_API
72  static HdContainerDataSourceHandle
73  BuildRetained(
74  const HdTokenDataSourceHandle &type,
75  const HdIntArrayDataSourceHandle &indices
76  );
77 
84  class Builder
85  {
86  public:
87  HD_API
88  Builder &SetType(
89  const HdTokenDataSourceHandle &type);
90  HD_API
91  Builder &SetIndices(
92  const HdIntArrayDataSourceHandle &indices);
93 
95  HD_API
96  HdContainerDataSourceHandle Build();
97 
98  private:
99  HdTokenDataSourceHandle _type;
100  HdIntArrayDataSourceHandle _indices;
101  };
102 
109  HD_API
110  static HdTokenDataSourceHandle BuildTypeDataSource(
111  const TfToken &type);
112 
113 };
114 
115 PXR_NAMESPACE_CLOSE_SCOPE
116 
117 #endif
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:87
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:118
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:42