SpatiumLib
|
Camera object in a 3D scene. More...
#include <Camera.h>
Public Member Functions | |
Camera (double near, double far) | |
Constructor. More... | |
virtual | ~Camera ()=default |
double | near () const |
Get the distance to the near clipping plane in world space. More... | |
double | far () const |
Get the distance to the far clipping plane in world space. More... | |
void | lookAt (const geom3d::Point3 &target, const geom3d::Vector3 &up) |
Set view direction towards target position. The resulting transformation matrix maps the reference point to the negative z axis and the eye point to the origin. More... | |
void | lookAt (const geom3d::Point3 &eye, const geom3d::Point3 &target, const geom3d::Vector3 &up) |
Set camera position and set view direction towards target position. The resulting transformation matrix maps the reference point to the negative z axis and the eye point to the origin. More... | |
![]() | |
SceneObject () | |
Transform & | transform () |
Get the transformation. More... | |
Protected Attributes | |
double | m_near |
double | m_far |
![]() | |
Transform | m_transform |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Camera &camera) |
Output to ostream. More... | |
Camera object in a 3D scene.
Camera with perspective projection.
Vantage point from where an image can be rendered. In its default position centred at the origin and aligned along the negative z-axis.
|
inline |
Constructor.
|
virtualdefault |
|
inline |
Get the distance to the far clipping plane in world space.
|
inline |
Set view direction towards target position. The resulting transformation matrix maps the reference point to the negative z axis and the eye point to the origin.
[in] | target | Target position |
[in] | up | Up vector May not be parallel with view direction vector |
|
inline |
Set camera position and set view direction towards target position. The resulting transformation matrix maps the reference point to the negative z axis and the eye point to the origin.
[in] | eye | Camera/eye position |
[in] | target | Target position |
[in] | up | Up vector May not be parallel with vector from eye to target |
|
inline |
Get the distance to the near clipping plane in world space.
|
friend |
Output to ostream.
|
protected |
|
protected |