Loading...
Searching...
No Matches
legacyDisplayStyleSchema.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//
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_LEGACY_DISPLAY_STYLE_SCHEMA_H
19#define PXR_IMAGING_HD_LEGACY_DISPLAY_STYLE_SCHEMA_H
20
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
30PXR_NAMESPACE_OPEN_SCOPE
31
32// --(BEGIN CUSTOM CODE: Declares)--
33// --(END CUSTOM CODE: Declares)--
34
35#define HD_LEGACY_DISPLAY_STYLE_SCHEMA_TOKENS \
36 (displayStyle) \
37 (refineLevel) \
38 (flatShadingEnabled) \
39 (displacementEnabled) \
40 (occludedSelectionShowsThrough) \
41 (pointsShadingEnabled) \
42 (materialIsFinal) \
43 (shadingStyle) \
44 (reprSelector) \
45 (cullStyle) \
46
47TF_DECLARE_PUBLIC_TOKENS(HdLegacyDisplayStyleSchemaTokens, HD_API,
48 HD_LEGACY_DISPLAY_STYLE_SCHEMA_TOKENS);
49
50//-----------------------------------------------------------------------------
51
52
53class HdLegacyDisplayStyleSchema : public HdSchema
54{
55public:
58
59 HdLegacyDisplayStyleSchema(HdContainerDataSourceHandle container)
60 : HdSchema(container) {}
61
67 HD_API
68 static HdLegacyDisplayStyleSchema GetFromParent(
69 const HdContainerDataSourceHandle &fromParentContainer);
70
72
73// --(BEGIN CUSTOM CODE: Schema Methods)--
74// --(END CUSTOM CODE: Schema Methods)--
75
78
79 HD_API
80 HdIntDataSourceHandle GetRefineLevel() const;
81
82 HD_API
83 HdBoolDataSourceHandle GetFlatShadingEnabled() const;
84
85 HD_API
86 HdBoolDataSourceHandle GetDisplacementEnabled() const;
87
88 HD_API
89 HdBoolDataSourceHandle GetOccludedSelectionShowsThrough() const;
90
91 HD_API
92 HdBoolDataSourceHandle GetPointsShadingEnabled() const;
93
94 HD_API
95 HdBoolDataSourceHandle GetMaterialIsFinal() const;
96
97 HD_API
98 HdTokenDataSourceHandle GetShadingStyle() const;
99
100 HD_API
101 HdTokenArrayDataSourceHandle GetReprSelector() const;
102
103 HD_API
104 HdTokenDataSourceHandle GetCullStyle() const;
105
107
110
113 HD_API
114 static const TfToken &GetSchemaToken();
115
118 HD_API
119 static const HdDataSourceLocator &GetDefaultLocator();
120
122
131
133 HD_API
134 static const HdDataSourceLocator &GetReprSelectorLocator();
135
137 HD_API
138 static const HdDataSourceLocator &GetCullStyleLocator();
140
143
151 HD_API
152 static HdContainerDataSourceHandle
153 BuildRetained(
154 const HdIntDataSourceHandle &refineLevel,
155 const HdBoolDataSourceHandle &flatShadingEnabled,
156 const HdBoolDataSourceHandle &displacementEnabled,
157 const HdBoolDataSourceHandle &occludedSelectionShowsThrough,
158 const HdBoolDataSourceHandle &pointsShadingEnabled,
159 const HdBoolDataSourceHandle &materialIsFinal,
160 const HdTokenDataSourceHandle &shadingStyle,
161 const HdTokenArrayDataSourceHandle &reprSelector,
162 const HdTokenDataSourceHandle &cullStyle
163 );
164
172 {
173 public:
174 HD_API
175 Builder &SetRefineLevel(
176 const HdIntDataSourceHandle &refineLevel);
177 HD_API
178 Builder &SetFlatShadingEnabled(
179 const HdBoolDataSourceHandle &flatShadingEnabled);
180 HD_API
181 Builder &SetDisplacementEnabled(
182 const HdBoolDataSourceHandle &displacementEnabled);
183 HD_API
184 Builder &SetOccludedSelectionShowsThrough(
185 const HdBoolDataSourceHandle &occludedSelectionShowsThrough);
186 HD_API
187 Builder &SetPointsShadingEnabled(
188 const HdBoolDataSourceHandle &pointsShadingEnabled);
189 HD_API
190 Builder &SetMaterialIsFinal(
191 const HdBoolDataSourceHandle &materialIsFinal);
192 HD_API
193 Builder &SetShadingStyle(
194 const HdTokenDataSourceHandle &shadingStyle);
195 HD_API
196 Builder &SetReprSelector(
197 const HdTokenArrayDataSourceHandle &reprSelector);
198 HD_API
199 Builder &SetCullStyle(
200 const HdTokenDataSourceHandle &cullStyle);
201
203 HD_API
204 HdContainerDataSourceHandle Build();
205
206 private:
207 HdIntDataSourceHandle _refineLevel;
208 HdBoolDataSourceHandle _flatShadingEnabled;
209 HdBoolDataSourceHandle _displacementEnabled;
210 HdBoolDataSourceHandle _occludedSelectionShowsThrough;
211 HdBoolDataSourceHandle _pointsShadingEnabled;
212 HdBoolDataSourceHandle _materialIsFinal;
213 HdTokenDataSourceHandle _shadingStyle;
214 HdTokenArrayDataSourceHandle _reprSelector;
215 HdTokenDataSourceHandle _cullStyle;
216
217 };
218
220};
221
222PXR_NAMESPACE_CLOSE_SCOPE
223
224#endif
Represents an object that can identify the location of a data source.
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:26
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:81