|
Euclid
Geometry Processing and Shape Analysis in C++
|
A RasCamera using perspective projection. More...
#include <Rasterizer.h>
Public Member Functions | |
| PerspRasCamera () | |
| Create a PerspRasCamera using default parameters. | |
| PerspRasCamera (const Eigen::Vector3f &position, const Eigen::Vector3f &focus, const Eigen::Vector3f &up, float vfov, float aspect, float tnear, float tfar) | |
| Create a PerspRasCamera. More... | |
| PerspRasCamera (const Eigen::Vector3f &position, const Eigen::Vector3f &focus, const Eigen::Vector3f &up, float vfov, unsigned width, unsigned height, float tnear, float tfar) | |
| Create a PerspRasCamera. More... | |
| void | set_aspect (float aspect) |
| Set aspect ratio. | |
| void | set_aspect (unsigned width, unsigned height) |
| Set aspect ratio. | |
| void | set_fov (float vfov) |
| Set vertical fov in degrees. | |
| virtual Eigen::Matrix4f | projection () const override |
| Return the projection matrix. | |
Public Member Functions inherited from Euclid::RasCamera | |
| RasCamera ()=default | |
| Create a RasCamera. | |
| RasCamera (const Eigen::Vector3f &position, const Eigen::Vector3f &focus, const Eigen::Vector3f &up, float tnear, float tfar) | |
| Create a RasCamera. More... | |
| Eigen::Matrix4f | view () const |
| Return the view/lookat matrix. | |
Public Member Functions inherited from Euclid::Camera | |
| Camera ()=default | |
| Create a Camera with default paramters. | |
| Camera (const Vec3 &position, const Vec3 &focus, const Vec3 &up, float tnear, float tfar) | |
| Create a Camera. More... | |
| void | lookat (const Vec3 &position, const Vec3 &focus, const Vec3 &up) |
| Pose the camera according to the parameteres. | |
| void | set_range (float tnear, float tfar) |
| Set the range of the ray. More... | |
Additional Inherited Members | |
Public Types inherited from Euclid::Camera | |
| using | Vec3 = Eigen::Vector3f |
Public Attributes inherited from Euclid::Camera | |
| Eigen::Vector3f | pos { 0.0f, 0.0f, 0.0f } |
| Position. | |
| Eigen::Vector3f | u { 1.0f, 0.0f, 0.0f } |
| Right vector. | |
| Eigen::Vector3f | v { 0.0f, 1.0f, 0.0f } |
| Up vector. | |
| Eigen::Vector3f | dir { 0.0f, 0.0f, 1.0f } |
| Negative view vector. | |
| float | tnear = 0.0f |
| The near plane. | |
| float | tfar = std::numeric_limits<float>::max() |
| The far plane. | |
The range of visible frustum of a perspective camera is determined by the field of view and aspect ratio.
|
inline |
In addition to camera position and orientation, a perspective camera uses field of view and apsect ratio to determine the extent of the film plane.
| position | Position. |
| focus | Focus. |
| up | Rough up direction. |
| vfov | Vertical field of view in degrees. |
| aspect | Aspect ratio. |
| tnear | Near plane of the view frustum. |
| tfar | Far plane of the view frustum. |
|
inline |
In addition to camera position and orientation, a perspective camera uses field of view and apsect ratio to determine the extent of the film plane.
| position | Position. |
| focus | Focus. |
| up | Rough up direction. |
| vfov | Vertical field of view in degrees. |
| width | Width of the image. |
| height | Height of the image. |
| tnear | Near plane of the view frustum. |
| tfar | Far plane of the view frustum. |