Loading...
Searching...
No Matches
screenWindowParameters.h
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
5// with the following modification; you may not use this file except in
6// compliance with the Apache License and the following modification to it:
7// Section 6. Trademarks. is deleted and replaced with:
8//
9// 6. Trademarks. This License does not grant permission to use the trade
10// names, trademarks, service marks, or product names of the Licensor
11// and its affiliates, except as required to comply with Section 4(c) of
12// the License and to reproduce the content of the NOTICE file.
13//
14// You may obtain a copy of the Apache License at
15//
16// http://www.apache.org/licenses/LICENSE-2.0
17//
18// Unless required by applicable law or agreed to in writing, software
19// distributed under the Apache License with the above modification is
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21// KIND, either express or implied. See the Apache License for the specific
22// language governing permissions and limitations under the Apache License.
23//
24#ifndef PXR_IMAGING_CAMERA_UTIL_SCREEN_WINDOW_PARAMETERS_H
25#define PXR_IMAGING_CAMERA_UTIL_SCREEN_WINDOW_PARAMETERS_H
26
27#include "pxr/pxr.h"
28#include "pxr/imaging/cameraUtil/api.h"
29#include "pxr/base/gf/camera.h"
30
31PXR_NAMESPACE_OPEN_SCOPE
32
33
40{
41public:
44 CAMERAUTIL_API
46 GfCamera::FOVDirection fitDirection =
47 GfCamera::FOVHorizontal);
48
52 const GfVec4d & GetScreenWindow() const { return _screenWindow; }
53
59 double GetFieldOfView() const { return _fieldOfView; }
60
66 return _zFacingViewMatrix;
67 }
68
69private:
70 GfVec4d _screenWindow;
71 double _fieldOfView;
72 GfMatrix4d _zFacingViewMatrix;
73};
74
75
76PXR_NAMESPACE_CLOSE_SCOPE
77
78#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:50
FOVDirection
Direction used for Field of View or orthographic size.
Definition: camera.h:59
Stores a 4x4 matrix of double elements.
Definition: matrix4d.h:88
Basic type for a vector of 4 double components.
Definition: vec4d.h:63