24 #ifndef PXR_IMAGING_HD_CAMERA_H
25 #define PXR_IMAGING_HD_CAMERA_H
28 #include "pxr/imaging/hd/api.h"
29 #include "pxr/imaging/hd/version.h"
30 #include "pxr/imaging/hd/sprim.h"
32 #include "pxr/imaging/cameraUtil/conformWindow.h"
34 #include "pxr/usd/sdf/path.h"
41 PXR_NAMESPACE_OPEN_SCOPE
48 #define HD_CAMERA_TOKENS \
51 (horizontalAperture) \
53 (horizontalApertureOffset) \
54 (verticalApertureOffset) \
88 using ClipPlanesVector = std::vector<GfVec4d>;
96 enum DirtyBits : HdDirtyBits
99 DirtyTransform = 1 << 0,
100 DirtyViewMatrix = DirtyTransform,
101 DirtyProjMatrix = 1 << 1,
102 DirtyWindowPolicy = 1 << 2,
103 DirtyClipPlanes = 1 << 3,
104 DirtyParams = 1 << 4,
105 AllDirty = (DirtyTransform
125 HdDirtyBits *dirtyBits)
override;
150 return _horizontalAperture;
155 return _verticalAperture;
160 return _horizontalApertureOffset;
165 return _verticalApertureOffset;
175 return _clippingRange;
190 return _focusDistance;
193 double GetShutterOpen()
const {
197 double GetShutterClose()
const {
198 return _shutterClose;
201 float GetExposure()
const {
208 return _windowPolicy;
233 Projection _projection;
234 float _horizontalAperture;
235 float _verticalAperture;
236 float _horizontalApertureOffset;
237 float _verticalApertureOffset;
240 std::vector<GfVec4d> _clipPlanes;
244 float _focusDistance;
248 double _shutterClose;
253 CameraUtilConformWindowPolicy _windowPolicy;
261 PXR_NAMESPACE_CLOSE_SCOPE
263 #endif // PXR_IMAGING_HD_CAMERA_H
float GetVerticalApertureOffset() const
Returns vertical aperture offset in world units.
Projection GetProjection() const
Returns whether camera is orthographic and perspective.
Hydra schema for a camera that pulls the params (see above) during Sync.
The HdRenderParam is an opaque (to core Hydra) handle, to an object that is obtained from the render ...
float GetVerticalAperture() const
Returns vertical aperture in world units.
HD_API GfMatrix4d GetProjectionMatrix() const
Returns the projection matrix for the camera.
HD_API void Sync(HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) override
Sprim API.
GfMatrix4d const & GetTransform() const
Camera parameters accessor API.
float GetFStop() const
Returns fstop of camera.
Stores a 4x4 matrix of double elements.
Adapter class providing data exchange with the client scene graph.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Basic type: 1-dimensional floating point range.
A path value used to locate objects in layers or scenegraphs.
float GetHorizontalAperture() const
Returns horizontal aperture in world units.
HD_API GfMatrix4d GetViewInverseMatrix() const
Returns the matrix transformation from camera to world space.
Sprim (state prim) is a base class of managing state for non-drawable scene entity (e...
float GetFocusDistance() const
Returns focus distance in world units.
This file defines some macros that are useful for declaring and using static TfTokens.
std::vector< GfVec4d > const & GetClipPlanes() const
Returns any additional clipping planes defined in camera space.
float GetFocalLength() const
Returns focal length in world units.
HD_API GfMatrix4d GetViewMatrix() const
Legacy camera parameters accessor API.
CameraUtilConformWindowPolicy const & GetWindowPolicy() const
Returns the window policy of the camera.
GfRange1f const & GetClippingRange() const
Returns near and far plane in world units.
float GetHorizontalApertureOffset() const
Returns horizontal aperture offset in world units.
HD_API HdDirtyBits GetInitialDirtyBitsMask() const override
Returns the minimal set of dirty bits to place in the change tracker for use in the first sync of thi...