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"
41#include "pxr/imaging/hd/schemaTypeDefs.h"
44
45#include "pxr/imaging/hd/schema.h"
46
47// --(BEGIN CUSTOM CODE: Includes)--
48// --(END CUSTOM CODE: Includes)--
49
50PXR_NAMESPACE_OPEN_SCOPE
51
52// --(BEGIN CUSTOM CODE: Declares)--
53// --(END CUSTOM CODE: Declares)--
54
55#define HD_CAMERA_SCHEMA_TOKENS \
56 (camera) \
57 (projection) \
58 (horizontalAperture) \
59 (verticalAperture) \
60 (horizontalApertureOffset) \
61 (verticalApertureOffset) \
62 (focalLength) \
63 (clippingRange) \
64 (clippingPlanes) \
65 (fStop) \
66 (focusDistance) \
67 (shutterOpen) \
68 (shutterClose) \
69 (exposure) \
70 (focusOn) \
71 (dofAspect) \
72 (splitDiopter) \
73 (lensDistortion) \
74 (namespacedProperties) \
75 (perspective) \
76 (orthographic) \
77
78TF_DECLARE_PUBLIC_TOKENS(HdCameraSchemaTokens, HD_API,
79 HD_CAMERA_SCHEMA_TOKENS);
80
81//-----------------------------------------------------------------------------
82
83
84class HdCameraSchema : public HdSchema
85{
86public:
89
90 HdCameraSchema(HdContainerDataSourceHandle container)
91 : HdSchema(container) {}
92
98 HD_API
99 static HdCameraSchema GetFromParent(
100 const HdContainerDataSourceHandle &fromParentContainer);
101
103
104// --(BEGIN CUSTOM CODE: Schema Methods)--
105// --(END CUSTOM CODE: Schema Methods)--
106
109
110 HD_API
111 HdTokenDataSourceHandle GetProjection() const;
112
113 HD_API
114 HdFloatDataSourceHandle GetHorizontalAperture() const;
115
116 HD_API
117 HdFloatDataSourceHandle GetVerticalAperture() const;
118
119 HD_API
120 HdFloatDataSourceHandle GetHorizontalApertureOffset() const;
121
122 HD_API
123 HdFloatDataSourceHandle GetVerticalApertureOffset() const;
124
125 HD_API
126 HdFloatDataSourceHandle GetFocalLength() const;
127
128 HD_API
129 HdVec2fDataSourceHandle GetClippingRange() const;
130
131 HD_API
132 HdVec4dArrayDataSourceHandle GetClippingPlanes() const;
133
134 HD_API
135 HdFloatDataSourceHandle GetFStop() const;
136
137 HD_API
138 HdFloatDataSourceHandle GetFocusDistance() const;
139
140 HD_API
141 HdDoubleDataSourceHandle GetShutterOpen() const;
142
143 HD_API
144 HdDoubleDataSourceHandle GetShutterClose() const;
145
146 HD_API
147 HdFloatDataSourceHandle GetExposure() const;
148
149 HD_API
150 HdBoolDataSourceHandle GetFocusOn() const;
151
152 HD_API
153 HdFloatDataSourceHandle GetDofAspect() const;
154
155 HD_API
156 HdSplitDiopterSchema GetSplitDiopter() const;
157
158 HD_API
159 HdLensDistortionSchema GetLensDistortion() const;
160
161 HD_API
162 HdSampledDataSourceContainerContainerSchema GetNamespacedProperties() const;
163
165
168
171 HD_API
172 static const TfToken &GetSchemaToken();
173
176 HD_API
177 static const HdDataSourceLocator &GetDefaultLocator();
178
180
189
191 HD_API
192 static const HdDataSourceLocator &GetShutterOpenLocator();
193
195 HD_API
196 static const HdDataSourceLocator &GetShutterCloseLocator();
197
199 HD_API
200 static const HdDataSourceLocator &GetNamespacedPropertiesLocator();
202
205
213 HD_API
214 static HdContainerDataSourceHandle
215 BuildRetained(
216 const HdTokenDataSourceHandle &projection,
217 const HdFloatDataSourceHandle &horizontalAperture,
218 const HdFloatDataSourceHandle &verticalAperture,
219 const HdFloatDataSourceHandle &horizontalApertureOffset,
220 const HdFloatDataSourceHandle &verticalApertureOffset,
221 const HdFloatDataSourceHandle &focalLength,
222 const HdVec2fDataSourceHandle &clippingRange,
223 const HdVec4dArrayDataSourceHandle &clippingPlanes,
224 const HdFloatDataSourceHandle &fStop,
225 const HdFloatDataSourceHandle &focusDistance,
226 const HdDoubleDataSourceHandle &shutterOpen,
227 const HdDoubleDataSourceHandle &shutterClose,
228 const HdFloatDataSourceHandle &exposure,
229 const HdBoolDataSourceHandle &focusOn,
230 const HdFloatDataSourceHandle &dofAspect,
231 const HdContainerDataSourceHandle &splitDiopter,
232 const HdContainerDataSourceHandle &lensDistortion,
233 const HdContainerDataSourceHandle &namespacedProperties
234 );
235
243 {
244 public:
245 HD_API
246 Builder &SetProjection(
247 const HdTokenDataSourceHandle &projection);
248 HD_API
249 Builder &SetHorizontalAperture(
250 const HdFloatDataSourceHandle &horizontalAperture);
251 HD_API
252 Builder &SetVerticalAperture(
253 const HdFloatDataSourceHandle &verticalAperture);
254 HD_API
255 Builder &SetHorizontalApertureOffset(
256 const HdFloatDataSourceHandle &horizontalApertureOffset);
257 HD_API
258 Builder &SetVerticalApertureOffset(
259 const HdFloatDataSourceHandle &verticalApertureOffset);
260 HD_API
261 Builder &SetFocalLength(
262 const HdFloatDataSourceHandle &focalLength);
263 HD_API
264 Builder &SetClippingRange(
265 const HdVec2fDataSourceHandle &clippingRange);
266 HD_API
267 Builder &SetClippingPlanes(
268 const HdVec4dArrayDataSourceHandle &clippingPlanes);
269 HD_API
270 Builder &SetFStop(
271 const HdFloatDataSourceHandle &fStop);
272 HD_API
273 Builder &SetFocusDistance(
274 const HdFloatDataSourceHandle &focusDistance);
275 HD_API
276 Builder &SetShutterOpen(
277 const HdDoubleDataSourceHandle &shutterOpen);
278 HD_API
279 Builder &SetShutterClose(
280 const HdDoubleDataSourceHandle &shutterClose);
281 HD_API
282 Builder &SetExposure(
283 const HdFloatDataSourceHandle &exposure);
284 HD_API
285 Builder &SetFocusOn(
286 const HdBoolDataSourceHandle &focusOn);
287 HD_API
288 Builder &SetDofAspect(
289 const HdFloatDataSourceHandle &dofAspect);
290 HD_API
291 Builder &SetSplitDiopter(
292 const HdContainerDataSourceHandle &splitDiopter);
293 HD_API
294 Builder &SetLensDistortion(
295 const HdContainerDataSourceHandle &lensDistortion);
296 HD_API
297 Builder &SetNamespacedProperties(
298 const HdContainerDataSourceHandle &namespacedProperties);
299
301 HD_API
302 HdContainerDataSourceHandle Build();
303
304 private:
305 HdTokenDataSourceHandle _projection;
306 HdFloatDataSourceHandle _horizontalAperture;
307 HdFloatDataSourceHandle _verticalAperture;
308 HdFloatDataSourceHandle _horizontalApertureOffset;
309 HdFloatDataSourceHandle _verticalApertureOffset;
310 HdFloatDataSourceHandle _focalLength;
311 HdVec2fDataSourceHandle _clippingRange;
312 HdVec4dArrayDataSourceHandle _clippingPlanes;
313 HdFloatDataSourceHandle _fStop;
314 HdFloatDataSourceHandle _focusDistance;
315 HdDoubleDataSourceHandle _shutterOpen;
316 HdDoubleDataSourceHandle _shutterClose;
317 HdFloatDataSourceHandle _exposure;
318 HdBoolDataSourceHandle _focusOn;
319 HdFloatDataSourceHandle _dofAspect;
320 HdContainerDataSourceHandle _splitDiopter;
321 HdContainerDataSourceHandle _lensDistortion;
322 HdContainerDataSourceHandle _namespacedProperties;
323
324 };
325
332 HD_API
333 static HdTokenDataSourceHandle BuildProjectionDataSource(
334 const TfToken &projection);
335
337};
338
339PXR_NAMESPACE_CLOSE_SCOPE
340
341#endif
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
Definition: cameraSchema.h:243
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: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