Loading...
Searching...
No Matches
screenWindowParameters.h
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_CAMERA_UTIL_SCREEN_WINDOW_PARAMETERS_H
8#define PXR_IMAGING_CAMERA_UTIL_SCREEN_WINDOW_PARAMETERS_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/cameraUtil/api.h"
12#include "pxr/base/gf/camera.h"
13
14PXR_NAMESPACE_OPEN_SCOPE
15
16
23{
24public:
27 CAMERAUTIL_API
29 GfCamera::FOVDirection fitDirection =
30 GfCamera::FOVHorizontal);
31
35 const GfVec4d & GetScreenWindow() const { return _screenWindow; }
36
42 double GetFieldOfView() const { return _fieldOfView; }
43
49 return _zFacingViewMatrix;
50 }
51
52private:
53 GfVec4d _screenWindow;
54 double _fieldOfView;
55 GfMatrix4d _zFacingViewMatrix;
56};
57
58
59PXR_NAMESPACE_CLOSE_SCOPE
60
61#endif // PXR_IMAGING_CAMERA_UTIL_SCREEN_WINDOW_PARAMETERS_H
Given a camera object, compute parameters suitable for setting up RenderMan.
double GetFieldOfView() const
The field of view.
const GfMatrix4d & GetZFacingViewMatrix() const
Returns the inverse of the transform for a camera that is y-Up and z-facing (vs the OpenGL camera tha...
CAMERAUTIL_API CameraUtilScreenWindowParameters(const GfCamera &camera, GfCamera::FOVDirection fitDirection=GfCamera::FOVHorizontal)
Constructs screenwindow parameter.
const GfVec4d & GetScreenWindow() const
The vector (left, right, bottom, top) defining the rectangle in the image plane.
Object-based representation of a camera.
Definition: camera.h:33
FOVDirection
Direction used for Field of View or orthographic size.
Definition: camera.h:42
Stores a 4x4 matrix of double elements.
Definition: matrix4d.h:71
Basic type for a vector of 4 double components.
Definition: vec4d.h:46