25 #ifndef INCLUDED_ProjectionMatrixFromFOV_h_GUID_880B5E97_076B_4AB7_2E6E_CC6297F3D85B 26 #define INCLUDED_ProjectionMatrixFromFOV_h_GUID_880B5E97_076B_4AB7_2E6E_CC6297F3D85B 41 template <
typename System>
56 ret[Rectd::RIGHT] = std::tan(
getRadians(hFov / 2.));
57 ret[Rectd::LEFT] = -ret[Rectd::RIGHT];
58 ret[Rectd::TOP] = std::tan(
getRadians(vFov / 2.));
59 ret[Rectd::BOTTOM] = -ret[Rectd::TOP];
65 template <
typename System>
79 template <
typename System>
80 inline Eigen::Matrix4d
94 #endif // INCLUDED_ProjectionMatrixFromFOV_h_GUID_880B5E97_076B_4AB7_2E6E_CC6297F3D85B Definition: RunLoopManager.h:42
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
boost::units::quantity< boost::units::unit< boost::units::plane_angle_dimension, System >, Y > AngleGeneric
Convenience template alias for a plane_angle quantity in an arbitrary system with arbitrary scalar...
Definition: Angles.h:47
Eigen::Matrix4d createSymmetricProjectionMatrix(AngleGeneric< System > hFov, AngleGeneric< System > vFov, double near, double far)
Definition: ProjectionMatrixFromFOV.h:81
Rectd computeSymmetricFOVRect(AngleGeneric< System > hFov, AngleGeneric< System > vFov)
Compute a rectangle at unit distance for the given fov values.
Definition: ProjectionMatrixFromFOV.h:42
Eigen::Matrix4d createProjectionMatrix(Rectd const &bounds, double near, double far)
Takes in points at the near clipping plane, as well as the near and far clipping planes.
Definition: ProjectionMatrix.h:48
Y getRadians(AngleGeneric< System, Y > const angle)
Get the raw scalar value of your angle in radians.
Definition: Angles.h:67