Loading...
Searching...
No Matches
cameraSchema.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//
25
26/* ************************************************************************** */
27/* ** ** */
28/* ** This file is generated by a script. ** */
29/* ** ** */
30/* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
31/* ** Edit hdSchemaDefs.py instead to make changes. ** */
32/* ** ** */
33/* ************************************************************************** */
34
35#ifndef PXR_IMAGING_HD_CAMERA_SCHEMA_H
36#define PXR_IMAGING_HD_CAMERA_SCHEMA_H
37
39
40#include "pxr/imaging/hd/api.h"
43
44#include "pxr/imaging/hd/schema.h"
45
46// --(BEGIN CUSTOM CODE: Includes)--
47// --(END CUSTOM CODE: Includes)--
48
49PXR_NAMESPACE_OPEN_SCOPE
50
51// --(BEGIN CUSTOM CODE: Declares)--
52// --(END CUSTOM CODE: Declares)--
53
54#define HD_CAMERA_SCHEMA_TOKENS \
55 (camera) \
56 (projection) \
57 (horizontalAperture) \
58 (verticalAperture) \
59 (horizontalApertureOffset) \
60 (verticalApertureOffset) \
61 (focalLength) \
62 (clippingRange) \
63 (clippingPlanes) \
64 (fStop) \
65 (focusDistance) \
66 (shutterOpen) \
67 (shutterClose) \
68 (exposure) \
69 (focusOn) \
70 (dofAspect) \
71 (splitDiopter) \
72 (lensDistortion) \
73 (perspective) \
74 (orthographic) \
75
76TF_DECLARE_PUBLIC_TOKENS(HdCameraSchemaTokens, HD_API,
77 HD_CAMERA_SCHEMA_TOKENS);
78
79//-----------------------------------------------------------------------------
80
81
82class HdCameraSchema : public HdSchema
83{
84public:
87
88 HdCameraSchema(HdContainerDataSourceHandle container)
89 : HdSchema(container) {}
90
96 HD_API
97 static HdCameraSchema GetFromParent(
98 const HdContainerDataSourceHandle &fromParentContainer);
99
101
102// --(BEGIN CUSTOM CODE: Schema Methods)--
103// --(END CUSTOM CODE: Schema Methods)--
104
107
108 HD_API
109 HdTokenDataSourceHandle GetProjection() const;
110
111 HD_API
112 HdFloatDataSourceHandle GetHorizontalAperture() const;
113
114 HD_API
115 HdFloatDataSourceHandle GetVerticalAperture() const;
116
117 HD_API
118 HdFloatDataSourceHandle GetHorizontalApertureOffset() const;
119
120 HD_API
121 HdFloatDataSourceHandle GetVerticalApertureOffset() const;
122
123 HD_API
124 HdFloatDataSourceHandle GetFocalLength() const;
125
126 HD_API
127 HdVec2fDataSourceHandle GetClippingRange() const;
128
129 HD_API
130 HdVec4dArrayDataSourceHandle GetClippingPlanes() const;
131
132 HD_API
133 HdFloatDataSourceHandle GetFStop() const;
134
135 HD_API
136 HdFloatDataSourceHandle GetFocusDistance() const;
137
138 HD_API
139 HdDoubleDataSourceHandle GetShutterOpen() const;
140
141 HD_API
142 HdDoubleDataSourceHandle GetShutterClose() const;
143
144 HD_API
145 HdFloatDataSourceHandle GetExposure() const;
146
147 HD_API
148 HdBoolDataSourceHandle GetFocusOn() const;
149
150 HD_API
151 HdFloatDataSourceHandle GetDofAspect() const;
152
153 HD_API
154 HdSplitDiopterSchema GetSplitDiopter() const;
155
156 HD_API
157 HdLensDistortionSchema GetLensDistortion() const;
158
160
163
166 HD_API
167 static const TfToken &GetSchemaToken();
168
171 HD_API
172 static const HdDataSourceLocator &GetDefaultLocator();
173
175
184
186 HD_API
187 static const HdDataSourceLocator &GetShutterOpenLocator();
188
190 HD_API
191 static const HdDataSourceLocator &GetShutterCloseLocator();
193
196
204 HD_API
205 static HdContainerDataSourceHandle
206 BuildRetained(
207 const HdTokenDataSourceHandle &projection,
208 const HdFloatDataSourceHandle &horizontalAperture,
209 const HdFloatDataSourceHandle &verticalAperture,
210 const HdFloatDataSourceHandle &horizontalApertureOffset,
211 const HdFloatDataSourceHandle &verticalApertureOffset,
212 const HdFloatDataSourceHandle &focalLength,
213 const HdVec2fDataSourceHandle &clippingRange,
214 const HdVec4dArrayDataSourceHandle &clippingPlanes,
215 const HdFloatDataSourceHandle &fStop,
216 const HdFloatDataSourceHandle &focusDistance,
217 const HdDoubleDataSourceHandle &shutterOpen,
218 const HdDoubleDataSourceHandle &shutterClose,
219 const HdFloatDataSourceHandle &exposure,
220 const HdBoolDataSourceHandle &focusOn,
221 const HdFloatDataSourceHandle &dofAspect,
222 const HdContainerDataSourceHandle &splitDiopter,
223 const HdContainerDataSourceHandle &lensDistortion
224 );
225
233 {
234 public:
235 HD_API
236 Builder &SetProjection(
237 const HdTokenDataSourceHandle &projection);
238 HD_API
239 Builder &SetHorizontalAperture(
240 const HdFloatDataSourceHandle &horizontalAperture);
241 HD_API
242 Builder &SetVerticalAperture(
243 const HdFloatDataSourceHandle &verticalAperture);
244 HD_API
245 Builder &SetHorizontalApertureOffset(
246 const HdFloatDataSourceHandle &horizontalApertureOffset);
247 HD_API
248 Builder &SetVerticalApertureOffset(
249 const HdFloatDataSourceHandle &verticalApertureOffset);
250 HD_API
251 Builder &SetFocalLength(
252 const HdFloatDataSourceHandle &focalLength);
253 HD_API
254 Builder &SetClippingRange(
255 const HdVec2fDataSourceHandle &clippingRange);
256 HD_API
257 Builder &SetClippingPlanes(
258 const HdVec4dArrayDataSourceHandle &clippingPlanes);
259 HD_API
260 Builder &SetFStop(
261 const HdFloatDataSourceHandle &fStop);
262 HD_API
263 Builder &SetFocusDistance(
264 const HdFloatDataSourceHandle &focusDistance);
265 HD_API
266 Builder &SetShutterOpen(
267 const HdDoubleDataSourceHandle &shutterOpen);
268 HD_API
269 Builder &SetShutterClose(
270 const HdDoubleDataSourceHandle &shutterClose);
271 HD_API
272 Builder &SetExposure(
273 const HdFloatDataSourceHandle &exposure);
274 HD_API
275 Builder &SetFocusOn(
276 const HdBoolDataSourceHandle &focusOn);
277 HD_API
278 Builder &SetDofAspect(
279 const HdFloatDataSourceHandle &dofAspect);
280 HD_API
281 Builder &SetSplitDiopter(
282 const HdContainerDataSourceHandle &splitDiopter);
283 HD_API
284 Builder &SetLensDistortion(
285 const HdContainerDataSourceHandle &lensDistortion);
286
288 HD_API
289 HdContainerDataSourceHandle Build();
290
291 private:
292 HdTokenDataSourceHandle _projection;
293 HdFloatDataSourceHandle _horizontalAperture;
294 HdFloatDataSourceHandle _verticalAperture;
295 HdFloatDataSourceHandle _horizontalApertureOffset;
296 HdFloatDataSourceHandle _verticalApertureOffset;
297 HdFloatDataSourceHandle _focalLength;
298 HdVec2fDataSourceHandle _clippingRange;
299 HdVec4dArrayDataSourceHandle _clippingPlanes;
300 HdFloatDataSourceHandle _fStop;
301 HdFloatDataSourceHandle _focusDistance;
302 HdDoubleDataSourceHandle _shutterOpen;
303 HdDoubleDataSourceHandle _shutterClose;
304 HdFloatDataSourceHandle _exposure;
305 HdBoolDataSourceHandle _focusOn;
306 HdFloatDataSourceHandle _dofAspect;
307 HdContainerDataSourceHandle _splitDiopter;
308 HdContainerDataSourceHandle _lensDistortion;
309
310 };
311
318 HD_API
319 static HdTokenDataSourceHandle BuildProjectionDataSource(
320 const TfToken &projection);
321
323};
324
325PXR_NAMESPACE_CLOSE_SCOPE
326
327#endif
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
Definition: cameraSchema.h:233
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.
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:43
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:88
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:98