All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cameraSchema.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_CAMERA_SCHEMA_H
19#define PXR_IMAGING_HD_CAMERA_SCHEMA_H
20
22
23#include "pxr/imaging/hd/api.h"
24#include "pxr/imaging/hd/schemaTypeDefs.h"
27
28#include "pxr/imaging/hd/schema.h"
29
30// --(BEGIN CUSTOM CODE: Includes)--
31// --(END CUSTOM CODE: Includes)--
32
33PXR_NAMESPACE_OPEN_SCOPE
34
35// --(BEGIN CUSTOM CODE: Declares)--
36// --(END CUSTOM CODE: Declares)--
37
38#define HD_CAMERA_SCHEMA_TOKENS \
39 (camera) \
40 (projection) \
41 (horizontalAperture) \
42 (verticalAperture) \
43 (horizontalApertureOffset) \
44 (verticalApertureOffset) \
45 (focalLength) \
46 (clippingRange) \
47 (clippingPlanes) \
48 (fStop) \
49 (focusDistance) \
50 (shutterOpen) \
51 (shutterClose) \
52 (exposure) \
53 (focusOn) \
54 (dofAspect) \
55 (splitDiopter) \
56 (lensDistortion) \
57 (namespacedProperties) \
58 (perspective) \
59 (orthographic) \
60
61TF_DECLARE_PUBLIC_TOKENS(HdCameraSchemaTokens, HD_API,
62 HD_CAMERA_SCHEMA_TOKENS);
63
64//-----------------------------------------------------------------------------
65
66
67class HdCameraSchema : public HdSchema
68{
69public:
72
73 HdCameraSchema(HdContainerDataSourceHandle container)
74 : HdSchema(container) {}
75
81 HD_API
82 static HdCameraSchema GetFromParent(
83 const HdContainerDataSourceHandle &fromParentContainer);
84
86
87// --(BEGIN CUSTOM CODE: Schema Methods)--
88// --(END CUSTOM CODE: Schema Methods)--
89
92
93 HD_API
94 HdTokenDataSourceHandle GetProjection() const;
95
96 HD_API
97 HdFloatDataSourceHandle GetHorizontalAperture() const;
98
99 HD_API
100 HdFloatDataSourceHandle GetVerticalAperture() const;
101
102 HD_API
103 HdFloatDataSourceHandle GetHorizontalApertureOffset() const;
104
105 HD_API
106 HdFloatDataSourceHandle GetVerticalApertureOffset() const;
107
108 HD_API
109 HdFloatDataSourceHandle GetFocalLength() const;
110
111 HD_API
112 HdVec2fDataSourceHandle GetClippingRange() const;
113
114 HD_API
115 HdVec4dArrayDataSourceHandle GetClippingPlanes() const;
116
117 HD_API
118 HdFloatDataSourceHandle GetFStop() const;
119
120 HD_API
121 HdFloatDataSourceHandle GetFocusDistance() const;
122
123 HD_API
124 HdDoubleDataSourceHandle GetShutterOpen() const;
125
126 HD_API
127 HdDoubleDataSourceHandle GetShutterClose() const;
128
129 HD_API
130 HdFloatDataSourceHandle GetExposure() const;
131
132 HD_API
133 HdBoolDataSourceHandle GetFocusOn() const;
134
135 HD_API
136 HdFloatDataSourceHandle GetDofAspect() const;
137
138 HD_API
139 HdSplitDiopterSchema GetSplitDiopter() const;
140
141 HD_API
142 HdLensDistortionSchema GetLensDistortion() const;
143
144 HD_API
145 HdSampledDataSourceContainerContainerSchema GetNamespacedProperties() const;
146
148
151
154 HD_API
155 static const TfToken &GetSchemaToken();
156
159 HD_API
160 static const HdDataSourceLocator &GetDefaultLocator();
161
163
172
174 HD_API
175 static const HdDataSourceLocator &GetShutterOpenLocator();
176
178 HD_API
179 static const HdDataSourceLocator &GetShutterCloseLocator();
180
182 HD_API
183 static const HdDataSourceLocator &GetNamespacedPropertiesLocator();
185
188
196 HD_API
197 static HdContainerDataSourceHandle
198 BuildRetained(
199 const HdTokenDataSourceHandle &projection,
200 const HdFloatDataSourceHandle &horizontalAperture,
201 const HdFloatDataSourceHandle &verticalAperture,
202 const HdFloatDataSourceHandle &horizontalApertureOffset,
203 const HdFloatDataSourceHandle &verticalApertureOffset,
204 const HdFloatDataSourceHandle &focalLength,
205 const HdVec2fDataSourceHandle &clippingRange,
206 const HdVec4dArrayDataSourceHandle &clippingPlanes,
207 const HdFloatDataSourceHandle &fStop,
208 const HdFloatDataSourceHandle &focusDistance,
209 const HdDoubleDataSourceHandle &shutterOpen,
210 const HdDoubleDataSourceHandle &shutterClose,
211 const HdFloatDataSourceHandle &exposure,
212 const HdBoolDataSourceHandle &focusOn,
213 const HdFloatDataSourceHandle &dofAspect,
214 const HdContainerDataSourceHandle &splitDiopter,
215 const HdContainerDataSourceHandle &lensDistortion,
216 const HdContainerDataSourceHandle &namespacedProperties
217 );
218
226 {
227 public:
228 HD_API
229 Builder &SetProjection(
230 const HdTokenDataSourceHandle &projection);
231 HD_API
232 Builder &SetHorizontalAperture(
233 const HdFloatDataSourceHandle &horizontalAperture);
234 HD_API
235 Builder &SetVerticalAperture(
236 const HdFloatDataSourceHandle &verticalAperture);
237 HD_API
238 Builder &SetHorizontalApertureOffset(
239 const HdFloatDataSourceHandle &horizontalApertureOffset);
240 HD_API
241 Builder &SetVerticalApertureOffset(
242 const HdFloatDataSourceHandle &verticalApertureOffset);
243 HD_API
244 Builder &SetFocalLength(
245 const HdFloatDataSourceHandle &focalLength);
246 HD_API
247 Builder &SetClippingRange(
248 const HdVec2fDataSourceHandle &clippingRange);
249 HD_API
250 Builder &SetClippingPlanes(
251 const HdVec4dArrayDataSourceHandle &clippingPlanes);
252 HD_API
253 Builder &SetFStop(
254 const HdFloatDataSourceHandle &fStop);
255 HD_API
256 Builder &SetFocusDistance(
257 const HdFloatDataSourceHandle &focusDistance);
258 HD_API
259 Builder &SetShutterOpen(
260 const HdDoubleDataSourceHandle &shutterOpen);
261 HD_API
262 Builder &SetShutterClose(
263 const HdDoubleDataSourceHandle &shutterClose);
264 HD_API
265 Builder &SetExposure(
266 const HdFloatDataSourceHandle &exposure);
267 HD_API
268 Builder &SetFocusOn(
269 const HdBoolDataSourceHandle &focusOn);
270 HD_API
271 Builder &SetDofAspect(
272 const HdFloatDataSourceHandle &dofAspect);
273 HD_API
274 Builder &SetSplitDiopter(
275 const HdContainerDataSourceHandle &splitDiopter);
276 HD_API
277 Builder &SetLensDistortion(
278 const HdContainerDataSourceHandle &lensDistortion);
279 HD_API
280 Builder &SetNamespacedProperties(
281 const HdContainerDataSourceHandle &namespacedProperties);
282
284 HD_API
285 HdContainerDataSourceHandle Build();
286
287 private:
288 HdTokenDataSourceHandle _projection;
289 HdFloatDataSourceHandle _horizontalAperture;
290 HdFloatDataSourceHandle _verticalAperture;
291 HdFloatDataSourceHandle _horizontalApertureOffset;
292 HdFloatDataSourceHandle _verticalApertureOffset;
293 HdFloatDataSourceHandle _focalLength;
294 HdVec2fDataSourceHandle _clippingRange;
295 HdVec4dArrayDataSourceHandle _clippingPlanes;
296 HdFloatDataSourceHandle _fStop;
297 HdFloatDataSourceHandle _focusDistance;
298 HdDoubleDataSourceHandle _shutterOpen;
299 HdDoubleDataSourceHandle _shutterClose;
300 HdFloatDataSourceHandle _exposure;
301 HdBoolDataSourceHandle _focusOn;
302 HdFloatDataSourceHandle _dofAspect;
303 HdContainerDataSourceHandle _splitDiopter;
304 HdContainerDataSourceHandle _lensDistortion;
305 HdContainerDataSourceHandle _namespacedProperties;
306
307 };
308
315 HD_API
316 static HdTokenDataSourceHandle BuildProjectionDataSource(
317 const TfToken &projection);
318
320};
321
322PXR_NAMESPACE_CLOSE_SCOPE
323
324#endif
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
Definition: cameraSchema.h:226
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.
Template class for a schema backed by a container whose children have arbitrary names but an expected...
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