A representation for cameras that pulls on camera parameters used by Riley cameras. More...
Public Member Functions | |
HdPrmanCamera (SdfPath const &id) | |
HDPRMAN_API void | Sync (HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) override |
Synchronizes state from the delegate to this object. More... | |
HDPRMAN_API bool | GetAndResetHasParamsChanged () |
Returns true if any physical camera parameter was updated during Sync, and reset the internal tracking state. More... | |
HDPRMAN_API HdTimeSampleArray < GfMatrix4d, HDPRMAN_MAX_TIME_SAMPLES > const & | GetTimeSampleXforms () const |
Returns the time sampled xforms that were queried during Sync. More... | |
HDPRMAN_API void | SetRileyCameraParams (RtParamList &camParams, RtParamList &projParams) const |
Sets the camera and projection shader parameters as expected by Riley from the USD physical camera params. More... | |
Public Member Functions inherited from HdCamera | |
HD_API | HdCamera (SdfPath const &id) |
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 this prim. More... | |
GfMatrix4d const & | GetTransform () const |
Camera parameters accessor API. More... | |
Projection | GetProjection () const |
Returns whether camera is orthographic and perspective. More... | |
float | GetHorizontalAperture () const |
Returns horizontal aperture in world units. More... | |
float | GetVerticalAperture () const |
Returns vertical aperture in world units. More... | |
float | GetHorizontalApertureOffset () const |
Returns horizontal aperture offset in world units. More... | |
float | GetVerticalApertureOffset () const |
Returns vertical aperture offset in world units. More... | |
float | GetFocalLength () const |
Returns focal length in world units. More... | |
GfRange1f const & | GetClippingRange () const |
Returns near and far plane in world units. More... | |
std::vector< GfVec4d > const & | GetClipPlanes () const |
Returns any additional clipping planes defined in camera space. More... | |
float | GetFStop () const |
Returns fstop of camera. More... | |
float | GetFocusDistance () const |
Returns focus distance in world units. More... | |
double | GetShutterOpen () const |
double | GetShutterClose () const |
float | GetExposure () const |
CameraUtilConformWindowPolicy const & | GetWindowPolicy () const |
Returns the window policy of the camera. More... | |
HD_API GfMatrix4d | GetViewMatrix () const |
Legacy camera parameters accessor API. More... | |
HD_API GfMatrix4d | GetViewInverseMatrix () const |
Returns the matrix transformation from camera to world space. More... | |
HD_API GfMatrix4d | GetProjectionMatrix () const |
Returns the projection matrix for the camera. More... | |
Public Member Functions inherited from HdSprim | |
HD_API | HdSprim (SdfPath const &id) |
SdfPath const & | GetId () const |
Returns the identifier by which this state is known. More... | |
virtual HD_API void | Finalize (HdRenderParam *renderParam) |
Finalizes object resources. More... | |
Additional Inherited Members | |
Public Types inherited from HdCamera | |
enum | DirtyBits : HdDirtyBits { Clean = 0, DirtyTransform = 1 << 0, DirtyViewMatrix = DirtyTransform, DirtyProjMatrix = 1 << 1, DirtyWindowPolicy = 1 << 2, DirtyClipPlanes = 1 << 3, DirtyParams = 1 << 4, AllDirty } |
enum | Projection { Perspective = 0, Orthographic } |
using | ClipPlanesVector = std::vector< GfVec4d > |
Protected Attributes inherited from HdCamera | |
GfMatrix4d | _transform |
Projection | _projection |
float | _horizontalAperture |
float | _verticalAperture |
float | _horizontalApertureOffset |
float | _verticalApertureOffset |
float | _focalLength |
GfRange1f | _clippingRange |
std::vector< GfVec4d > | _clipPlanes |
float | _fStop |
float | _focusDistance |
double | _shutterOpen |
double | _shutterClose |
float | _exposure |
CameraUtilConformWindowPolicy | _windowPolicy |
GfMatrix4d | _worldToViewMatrix |
GfMatrix4d | _worldToViewInverseMatrix |
GfMatrix4d | _projectionMatrix |
A representation for cameras that pulls on camera parameters used by Riley cameras.
Note: We do not create a Riley camera per HdCamera because in PRman 22, it'd require a render target to be created and bound (per camera), which would be prohibitively expensive in Prman 22.
HDPRMAN_API bool GetAndResetHasParamsChanged | ( | ) |
Returns true if any physical camera parameter was updated during Sync, and reset the internal tracking state.
This is meant to be called post Sync, and exists only because we don't hold a handle to the Riley camera to directly update it during Sync.
|
inline |
HDPRMAN_API void SetRileyCameraParams | ( | RtParamList & | camParams, |
RtParamList & | projParams | ||
) | const |
Sets the camera and projection shader parameters as expected by Riley from the USD physical camera params.
|
overridevirtual |
Synchronizes state from the delegate to this object.
Reimplemented from HdCamera.