18#ifndef PXR_IMAGING_HD_CAMERA_SCHEMA_H
19#define PXR_IMAGING_HD_CAMERA_SCHEMA_H
23#include "pxr/imaging/hd/api.h"
24#include "pxr/imaging/hd/schemaTypeDefs.h"
28#include "pxr/imaging/hd/schema.h"
33PXR_NAMESPACE_OPEN_SCOPE
38#define HD_CAMERA_SCHEMA_TOKENS \
41 (horizontalAperture) \
43 (horizontalApertureOffset) \
44 (verticalApertureOffset) \
57 (namespacedProperties) \
62 HD_CAMERA_SCHEMA_TOKENS);
67class HdCameraSchema :
public HdSchema
73 HdCameraSchema(HdContainerDataSourceHandle container)
82 static HdCameraSchema GetFromParent(
83 const HdContainerDataSourceHandle &fromParentContainer);
94 HdTokenDataSourceHandle GetProjection()
const;
97 HdFloatDataSourceHandle GetHorizontalAperture()
const;
100 HdFloatDataSourceHandle GetVerticalAperture()
const;
103 HdFloatDataSourceHandle GetHorizontalApertureOffset()
const;
106 HdFloatDataSourceHandle GetVerticalApertureOffset()
const;
109 HdFloatDataSourceHandle GetFocalLength()
const;
112 HdVec2fDataSourceHandle GetClippingRange()
const;
115 HdVec4dArrayDataSourceHandle GetClippingPlanes()
const;
118 HdFloatDataSourceHandle GetFStop()
const;
121 HdFloatDataSourceHandle GetFocusDistance()
const;
124 HdDoubleDataSourceHandle GetShutterOpen()
const;
127 HdDoubleDataSourceHandle GetShutterClose()
const;
130 HdFloatDataSourceHandle GetExposure()
const;
133 HdBoolDataSourceHandle GetFocusOn()
const;
136 HdFloatDataSourceHandle GetDofAspect()
const;
139 HdSplitDiopterSchema GetSplitDiopter()
const;
142 HdLensDistortionSchema GetLensDistortion()
const;
155 static const TfToken &GetSchemaToken();
197 static HdContainerDataSourceHandle
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
230 const HdTokenDataSourceHandle &projection);
232 Builder &SetHorizontalAperture(
233 const HdFloatDataSourceHandle &horizontalAperture);
236 const HdFloatDataSourceHandle &verticalAperture);
238 Builder &SetHorizontalApertureOffset(
239 const HdFloatDataSourceHandle &horizontalApertureOffset);
241 Builder &SetVerticalApertureOffset(
242 const HdFloatDataSourceHandle &verticalApertureOffset);
245 const HdFloatDataSourceHandle &focalLength);
248 const HdVec2fDataSourceHandle &clippingRange);
251 const HdVec4dArrayDataSourceHandle &clippingPlanes);
254 const HdFloatDataSourceHandle &fStop);
257 const HdFloatDataSourceHandle &focusDistance);
260 const HdDoubleDataSourceHandle &shutterOpen);
263 const HdDoubleDataSourceHandle &shutterClose);
266 const HdFloatDataSourceHandle &exposure);
269 const HdBoolDataSourceHandle &focusOn);
272 const HdFloatDataSourceHandle &dofAspect);
275 const HdContainerDataSourceHandle &splitDiopter);
278 const HdContainerDataSourceHandle &lensDistortion);
280 Builder &SetNamespacedProperties(
281 const HdContainerDataSourceHandle &namespacedProperties);
285 HdContainerDataSourceHandle
Build();
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;
316 static HdTokenDataSourceHandle BuildProjectionDataSource(
322PXR_NAMESPACE_CLOSE_SCOPE
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.
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...
Token for efficient comparison, assignment, and hashing of known strings.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.