renderProductSchema.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_RENDER_PRODUCT_SCHEMA_H
32 #define PXR_IMAGING_HD_RENDER_PRODUCT_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 HDRENDERPRODUCT_SCHEMA_TOKENS \
43  (renderProduct) \
44  (path) \
45  (type) \
46  (name) \
47  (resolution) \
48  (renderVars) \
49  (cameraPrim) \
50  (pixelAspectRatio) \
51  (aspectRatioConformPolicy) \
52  (apertureSize) \
53  (dataWindowNDC) \
54  (disableMotionBlur) \
55  (namespacedSettings) \
56 
57 TF_DECLARE_PUBLIC_TOKENS(HdRenderProductSchemaTokens, HD_API,
58  HDRENDERPRODUCT_SCHEMA_TOKENS);
59 
60 //-----------------------------------------------------------------------------
61 
62 class HdRenderProductSchema : public HdSchema
63 {
64 public:
65  HdRenderProductSchema(HdContainerDataSourceHandle container)
66  : HdSchema(container) {}
67 
68  //ACCESSORS
69 
70  HD_API
71  HdPathDataSourceHandle GetPath();
72  HD_API
73  HdTokenDataSourceHandle GetType();
74  HD_API
75  HdTokenDataSourceHandle GetName();
76  HD_API
77  HdVec2iDataSourceHandle GetResolution();
78  HD_API
79  HdRenderVarVectorSchema GetRenderVars();
80  HD_API
81  HdPathDataSourceHandle GetCameraPrim();
82  HD_API
83  HdFloatDataSourceHandle GetPixelAspectRatio();
84  HD_API
85  HdTokenDataSourceHandle GetAspectRatioConformPolicy();
86  HD_API
87  HdVec2fDataSourceHandle GetApertureSize();
88  HD_API
89  HdVec4fDataSourceHandle GetDataWindowNDC();
90  HD_API
91  HdBoolDataSourceHandle GetDisableMotionBlur();
92  HD_API
93  HdContainerDataSourceHandle GetNamespacedSettings();
94 
95  // RETRIEVING AND CONSTRUCTING
96 
102  HD_API
103  static HdContainerDataSourceHandle
104  BuildRetained(
105  const HdPathDataSourceHandle &path,
106  const HdTokenDataSourceHandle &type,
107  const HdTokenDataSourceHandle &name,
108  const HdVec2iDataSourceHandle &resolution,
109  const HdVectorDataSourceHandle &renderVars,
110  const HdPathDataSourceHandle &cameraPrim,
111  const HdFloatDataSourceHandle &pixelAspectRatio,
112  const HdTokenDataSourceHandle &aspectRatioConformPolicy,
113  const HdVec2fDataSourceHandle &apertureSize,
114  const HdVec4fDataSourceHandle &dataWindowNDC,
115  const HdBoolDataSourceHandle &disableMotionBlur,
116  const HdContainerDataSourceHandle &namespacedSettings
117  );
118 
125  class Builder
126  {
127  public:
128  HD_API
129  Builder &SetPath(
130  const HdPathDataSourceHandle &path);
131  HD_API
132  Builder &SetType(
133  const HdTokenDataSourceHandle &type);
134  HD_API
135  Builder &SetName(
136  const HdTokenDataSourceHandle &name);
137  HD_API
138  Builder &SetResolution(
139  const HdVec2iDataSourceHandle &resolution);
140  HD_API
141  Builder &SetRenderVars(
142  const HdVectorDataSourceHandle &renderVars);
143  HD_API
144  Builder &SetCameraPrim(
145  const HdPathDataSourceHandle &cameraPrim);
146  HD_API
147  Builder &SetPixelAspectRatio(
148  const HdFloatDataSourceHandle &pixelAspectRatio);
149  HD_API
150  Builder &SetAspectRatioConformPolicy(
151  const HdTokenDataSourceHandle &aspectRatioConformPolicy);
152  HD_API
153  Builder &SetApertureSize(
154  const HdVec2fDataSourceHandle &apertureSize);
155  HD_API
156  Builder &SetDataWindowNDC(
157  const HdVec4fDataSourceHandle &dataWindowNDC);
158  HD_API
159  Builder &SetDisableMotionBlur(
160  const HdBoolDataSourceHandle &disableMotionBlur);
161  HD_API
162  Builder &SetNamespacedSettings(
163  const HdContainerDataSourceHandle &namespacedSettings);
164 
166  HD_API
167  HdContainerDataSourceHandle Build();
168 
169  private:
170  HdPathDataSourceHandle _path;
171  HdTokenDataSourceHandle _type;
172  HdTokenDataSourceHandle _name;
173  HdVec2iDataSourceHandle _resolution;
174  HdVectorDataSourceHandle _renderVars;
175  HdPathDataSourceHandle _cameraPrim;
176  HdFloatDataSourceHandle _pixelAspectRatio;
177  HdTokenDataSourceHandle _aspectRatioConformPolicy;
178  HdVec2fDataSourceHandle _apertureSize;
179  HdVec4fDataSourceHandle _dataWindowNDC;
180  HdBoolDataSourceHandle _disableMotionBlur;
181  HdContainerDataSourceHandle _namespacedSettings;
182  };
183 
189  HD_API
190  static HdRenderProductSchema GetFromParent(
191  const HdContainerDataSourceHandle &fromParentContainer);
192 
195  HD_API
196  static const HdDataSourceLocator &GetDefaultLocator();
197 
198 
203  HD_API
204  static const HdDataSourceLocator &GetResolutionLocator();
205 
210  HD_API
211  static const HdDataSourceLocator &GetRenderVarsLocator();
212 
217  HD_API
218  static const HdDataSourceLocator &GetNamespacedSettingsLocator();
219 
220 };
221 
222 PXR_NAMESPACE_CLOSE_SCOPE
223 
224 #endif
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
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
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:43
Base class for vector schema classes that represent a view of a vector data source containing data so...
Definition: vectorSchema.h:73
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...