legacyDisplayStyleSchema.h
1 //
2 // Copyright 2022 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 
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_LEGACY_DISPLAY_STYLE_SCHEMA_H
32 #define PXR_IMAGING_HD_LEGACY_DISPLAY_STYLE_SCHEMA_H
33 
34 #include "pxr/imaging/hd/api.h"
35 
36 #include "pxr/imaging/hd/schema.h"
37 
38 PXR_NAMESPACE_OPEN_SCOPE
39 
40 //-----------------------------------------------------------------------------
41 
42 #define HDLEGACYDISPLAYSTYLE_SCHEMA_TOKENS \
43  (displayStyle) \
44  (refineLevel) \
45  (flatShadingEnabled) \
46  (displacementEnabled) \
47  (occludedSelectionShowsThrough) \
48  (pointsShadingEnabled) \
49  (materialIsFinal) \
50  (shadingStyle) \
51  (reprSelector) \
52  (cullStyle) \
53 
54 TF_DECLARE_PUBLIC_TOKENS(HdLegacyDisplayStyleSchemaTokens, HD_API,
55  HDLEGACYDISPLAYSTYLE_SCHEMA_TOKENS);
56 
57 //-----------------------------------------------------------------------------
58 
59 class HdLegacyDisplayStyleSchema : public HdSchema
60 {
61 public:
62  HdLegacyDisplayStyleSchema(HdContainerDataSourceHandle container)
63  : HdSchema(container) {}
64 
65  //ACCESSORS
66 
67  HD_API
68  HdIntDataSourceHandle GetRefineLevel();
69  HD_API
70  HdBoolDataSourceHandle GetFlatShadingEnabled();
71  HD_API
72  HdBoolDataSourceHandle GetDisplacementEnabled();
73  HD_API
74  HdBoolDataSourceHandle GetOccludedSelectionShowsThrough();
75  HD_API
76  HdBoolDataSourceHandle GetPointsShadingEnabled();
77  HD_API
78  HdBoolDataSourceHandle GetMaterialIsFinal();
79  HD_API
80  HdTokenDataSourceHandle GetShadingStyle();
81  HD_API
82  HdTokenArrayDataSourceHandle GetReprSelector();
83  HD_API
84  HdTokenDataSourceHandle GetCullStyle();
85 
86  // RETRIEVING AND CONSTRUCTING
87 
93  HD_API
94  static HdContainerDataSourceHandle
95  BuildRetained(
96  const HdIntDataSourceHandle &refineLevel,
97  const HdBoolDataSourceHandle &flatShadingEnabled,
98  const HdBoolDataSourceHandle &displacementEnabled,
99  const HdBoolDataSourceHandle &occludedSelectionShowsThrough,
100  const HdBoolDataSourceHandle &pointsShadingEnabled,
101  const HdBoolDataSourceHandle &materialIsFinal,
102  const HdTokenDataSourceHandle &shadingStyle,
103  const HdTokenArrayDataSourceHandle &reprSelector,
104  const HdTokenDataSourceHandle &cullStyle
105  );
106 
113  class Builder
114  {
115  public:
116  HD_API
117  Builder &SetRefineLevel(
118  const HdIntDataSourceHandle &refineLevel);
119  HD_API
120  Builder &SetFlatShadingEnabled(
121  const HdBoolDataSourceHandle &flatShadingEnabled);
122  HD_API
123  Builder &SetDisplacementEnabled(
124  const HdBoolDataSourceHandle &displacementEnabled);
125  HD_API
126  Builder &SetOccludedSelectionShowsThrough(
127  const HdBoolDataSourceHandle &occludedSelectionShowsThrough);
128  HD_API
129  Builder &SetPointsShadingEnabled(
130  const HdBoolDataSourceHandle &pointsShadingEnabled);
131  HD_API
132  Builder &SetMaterialIsFinal(
133  const HdBoolDataSourceHandle &materialIsFinal);
134  HD_API
135  Builder &SetShadingStyle(
136  const HdTokenDataSourceHandle &shadingStyle);
137  HD_API
138  Builder &SetReprSelector(
139  const HdTokenArrayDataSourceHandle &reprSelector);
140  HD_API
141  Builder &SetCullStyle(
142  const HdTokenDataSourceHandle &cullStyle);
143 
145  HD_API
146  HdContainerDataSourceHandle Build();
147 
148  private:
149  HdIntDataSourceHandle _refineLevel;
150  HdBoolDataSourceHandle _flatShadingEnabled;
151  HdBoolDataSourceHandle _displacementEnabled;
152  HdBoolDataSourceHandle _occludedSelectionShowsThrough;
153  HdBoolDataSourceHandle _pointsShadingEnabled;
154  HdBoolDataSourceHandle _materialIsFinal;
155  HdTokenDataSourceHandle _shadingStyle;
156  HdTokenArrayDataSourceHandle _reprSelector;
157  HdTokenDataSourceHandle _cullStyle;
158  };
159 
165  HD_API
166  static HdLegacyDisplayStyleSchema GetFromParent(
167  const HdContainerDataSourceHandle &fromParentContainer);
168 
171  HD_API
172  static const HdDataSourceLocator &GetDefaultLocator();
173 
174 
179  HD_API
180  static const HdDataSourceLocator &GetReprSelectorLocator();
181 
186  HD_API
187  static const HdDataSourceLocator &GetCullStyleLocator();
188 
189 };
190 
191 PXR_NAMESPACE_CLOSE_SCOPE
192 
193 #endif
Represents an object that can identify the location of a data source.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:118
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:42