SpatiumLib
Public Member Functions | Protected Attributes | Friends | List of all members
spatium::gfx3d::OrthographicCamera Class Reference

Camera with orthographic projection. More...

#include <OrthographicCamera.h>

Inheritance diagram for spatium::gfx3d::OrthographicCamera:
Inheritance graph
[legend]
Collaboration diagram for spatium::gfx3d::OrthographicCamera:
Collaboration graph
[legend]

Public Member Functions

 OrthographicCamera (double near, double far, double size=10)
 Constructor. More...
 
 ~OrthographicCamera () override=default
 
double size () const
 Get size of the viewing plane along the Y axis. More...
 
- Public Member Functions inherited from spatium::gfx3d::Camera
 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...
 
- Public Member Functions inherited from spatium::gfx3d::SceneObject
 SceneObject ()
 
Transformtransform ()
 Get the transformation. More...
 

Protected Attributes

double m_size
 
- Protected Attributes inherited from spatium::gfx3d::Camera
double m_near
 
double m_far
 
- Protected Attributes inherited from spatium::gfx3d::SceneObject
Transform m_transform
 

Friends

std::ostream & operator<< (std::ostream &os, const OrthographicCamera &camera)
 Convert world point coordinates to view point coordinates. View coordinates (canonical coordinates) are in range [-1, 1]. More...
 

Detailed Description

Camera with orthographic projection.

Constructor & Destructor Documentation

◆ OrthographicCamera()

spatium::gfx3d::OrthographicCamera::OrthographicCamera ( double  near,
double  far,
double  size = 10 
)
inline

Constructor.

Parameters
[in]near
[in]far
[in]sizeOrthographic size of image plane on Y axis, height of view.

◆ ~OrthographicCamera()

spatium::gfx3d::OrthographicCamera::~OrthographicCamera ( )
overridedefault

Member Function Documentation

◆ size()

double spatium::gfx3d::OrthographicCamera::size ( ) const
inline

Get size of the viewing plane along the Y axis.

Returns
Viewing plane size

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const OrthographicCamera camera 
)
friend

Convert world point coordinates to view point coordinates. View coordinates (canonical coordinates) are in range [-1, 1].

Parameters
[in]pointWorld point
Returns
View point coordinates Output to ostream

Member Data Documentation

◆ m_size

double spatium::gfx3d::OrthographicCamera::m_size
protected

The documentation for this class was generated from the following file: