All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdCamera Class Reference

Hydra schema for a camera that pulls the basic params (see above) during Sync. More...

+ Inheritance diagram for HdCamera:

Public Types

enum  DirtyBits : HdDirtyBits {
  Clean = 0, DirtyViewMatrix = 1 << 0, DirtyProjMatrix = 1 << 1, DirtyWindowPolicy = 1 << 2,
  DirtyClipPlanes = 1 << 3, DirtyParams = 1 << 4, AllDirty
}
 
typedef std::vector< GfVec4dClipPlanesVector
 

Public Member Functions

HD_API HdCamera (SdfPath const &id)
 
virtual HD_API void Sync (HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) override
 Sprim API. More...
 
virtual 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...
 
HD_API GfMatrix4d const & GetViewMatrix () const
 Camera parameters accessor API. More...
 
HD_API GfMatrix4d const & GetViewInverseMatrix () const
 Returns the matrix transformation from camera to world space. More...
 
HD_API GfMatrix4d const & GetProjectionMatrix () const
 Returns the projection matrix for the camera. More...
 
HD_API std::vector< GfVec4d >
const & 
GetClipPlanes () const
 Returns any additional clipping planes defined in camera space. More...
 
HD_API
CameraUtilConformWindowPolicy
const & 
GetWindowPolicy () const
 Returns the window policy of 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...
 

Protected Attributes

GfMatrix4d _worldToViewMatrix
 
GfMatrix4d _worldToViewInverseMatrix
 
GfMatrix4d _projectionMatrix
 
CameraUtilConformWindowPolicy _windowPolicy
 
std::vector< GfVec4d_clipPlanes
 

Detailed Description

Hydra schema for a camera that pulls the basic params (see above) during Sync.

Backends that use additional camera parameters can inherit from HdCamera and pull on them.

Definition at line 80 of file camera.h.

Member Function Documentation

HD_API std::vector<GfVec4d> const& GetClipPlanes ( ) const
inline

Returns any additional clipping planes defined in camera space.

Definition at line 145 of file camera.h.

virtual HD_API HdDirtyBits GetInitialDirtyBitsMask ( ) const
overridevirtual

Returns the minimal set of dirty bits to place in the change tracker for use in the first sync of this prim.

Typically this would be all dirty bits.

Implements HdSprim.

Reimplemented in HdPrmanCamera, and HdPrmanCamera.

HD_API GfMatrix4d const& GetProjectionMatrix ( ) const
inline

Returns the projection matrix for the camera.

Definition at line 139 of file camera.h.

HD_API GfMatrix4d const& GetViewInverseMatrix ( ) const
inline

Returns the matrix transformation from camera to world space.

Definition at line 133 of file camera.h.

HD_API GfMatrix4d const& GetViewMatrix ( ) const
inline

Camera parameters accessor API.

Returns the matrix transformation from world to camera space.

Definition at line 127 of file camera.h.

HD_API CameraUtilConformWindowPolicy const& GetWindowPolicy ( ) const
inline

Returns the window policy of the camera.

If no opinion is authored, we default to "CameraUtilFit"

Definition at line 152 of file camera.h.

virtual HD_API void Sync ( HdSceneDelegate sceneDelegate,
HdRenderParam renderParam,
HdDirtyBits *  dirtyBits 
)
overridevirtual

Sprim API.

Synchronizes state from the delegate to this object.

Implements HdSprim.

Reimplemented in HdPrmanCamera, and HdPrmanCamera.


The documentation for this class was generated from the following file: