HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
conformWindow.h File Reference
+ Include dependency graph for conformWindow.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  CameraUtilConformWindowPolicy {
  CameraUtilMatchVertically, CameraUtilMatchHorizontally, CameraUtilFit, CameraUtilCrop,
  CameraUtilDontConform
}
 

Functions

CAMERAUTIL_API GfRange2d CameraUtilConformedWindow (const GfRange2d &window, CameraUtilConformWindowPolicy policy, double targetAspect)
 
CAMERAUTIL_API GfVec4d CameraUtilConformedWindow (const GfVec4d &window, CameraUtilConformWindowPolicy policy, double targetAspect)
 
CAMERAUTIL_API GfVec2d CameraUtilConformedWindow (const GfVec2d &window, CameraUtilConformWindowPolicy policy, double targetAspect)
 
CAMERAUTIL_API GfMatrix4d CameraUtilConformedWindow (const GfMatrix4d &projectionMatrix, CameraUtilConformWindowPolicy policy, double targetAspect)
 
CAMERAUTIL_API void CameraUtilConformWindow (GfCamera *camera, CameraUtilConformWindowPolicy policy, double targetAspect)
 
CAMERAUTIL_API void CameraUtilConformWindow (GfFrustum *frustum, CameraUtilConformWindowPolicy policy, double targetAspect)
 

Enumeration Type Documentation

Policy of how to conform a window to the given aspect ratio. An ASCII-art explanation is given in the corresponding .cpp file.

Enumerator
CameraUtilMatchVertically 

Modify width.

CameraUtilMatchHorizontally 

Modify height.

CameraUtilFit 

Increase width or height.

CameraUtilCrop 

Decrease width or height.

CameraUtilDontConform 

Leave unchanged (This can result in stretching/shrinking if not pre-fit)

Definition at line 44 of file conformWindow.h.

Function Documentation

CAMERAUTIL_API GfRange2d CameraUtilConformedWindow ( const GfRange2d window,
CameraUtilConformWindowPolicy  policy,
double  targetAspect 
)

Returns a window with aspect ratio targetAspect by applying policy to window where window is encoded as GfRange2d.

CAMERAUTIL_API GfVec4d CameraUtilConformedWindow ( const GfVec4d window,
CameraUtilConformWindowPolicy  policy,
double  targetAspect 
)

Returns a window with aspect ratio targetAspect by applying policy to window where window is encoded as vector (left, right, bottom, top) similarly to RenderMan's RiScreenWindow.

CAMERAUTIL_API GfVec2d CameraUtilConformedWindow ( const GfVec2d window,
CameraUtilConformWindowPolicy  policy,
double  targetAspect 
)

Returns a window with aspect ratio targetAspect by applying policy to window where window is encoded as vector (width, height).

CAMERAUTIL_API GfMatrix4d CameraUtilConformedWindow ( const GfMatrix4d projectionMatrix,
CameraUtilConformWindowPolicy  policy,
double  targetAspect 
)

Conforms the given projectionMatrix to have aspect ratio targetAspect by applying policy.

Note that this function also supports mirroring about the x- or y-axis of the image corresponding to flipping all signs in the second, respectively, third column of the projection matrix. In other words, we get the same result whether we flip the signs in the matrix and then give it to this function or call this function first and flip the signs of the resulting matrix.

CAMERAUTIL_API void CameraUtilConformWindow ( GfCamera camera,
CameraUtilConformWindowPolicy  policy,
double  targetAspect 
)

Conforms the given camera to have aspect ratio targetAspect by applying policy.

CAMERAUTIL_API void CameraUtilConformWindow ( GfFrustum frustum,
CameraUtilConformWindowPolicy  policy,
double  targetAspect 
)

Conforms the given frustum to have aspect ratio targetAspect by applying policy.