Public Member Functions | Static Public Attributes

sp::scene::Projection3D< T > Class Template Reference

#include <spProjection.hpp>

List of all members.

Public Member Functions

 Projection3D ()
 Projection3D (const dim::rect2di &Viewport, const T &NearPlane=Projection3D< T >::DEFAULT_NEAR, const T &FarPlane=Projection3D< T >::DEFAULT_FAR, const T &FieldOfView=Projection3D< T >::DEFAULT_FOV, bool IsOrtho=false)
 Projection3D (const Projection3D< T > &Other)
 ~Projection3D ()
Projection3D< T > & operator= (const Projection3D< T > &Other)
void update () const
const dim::matrix4< T > & getMatrixLH () const
const dim::matrix4< T > & getMatrixRH () const
void setViewport (const dim::rect2di &Viewport)
 Sets the viewport rectangle. By default (0, 0, 100, 100).
const dim::rect2digetViewport () const
 Returns the viewport rectangle.
void setNearPlane (const T &NearPlane)
 Sets the near clipping plane. By default 0.25.
const T & getNearPlane () const
 Returns the near clipping plane.
void setFarPlane (const T &FarPlane)
 Sets the far clipping plane. By default 1000.0.
const T & getFarPlane () const
 Returns the far clipping plane.
void setFOV (const T &FieldOfView)
 Sets the field of view (FOV). By default 74.0.
const T & getFOV () const
 Returns the field of view (FOV).
void setZoom (const T &Zoom)
 Sets the zoom factor. By default 1.0. This uses the setFOV function.
getZoom () const
void setOrtho (bool Enable)
 Enables or disables orthogonal projection. By default false.
bool getOrtho () const
 Returns true if orthogonal projection is enabled.

Static Public Attributes

static const dim::rect2di DEFAULT_VIEWPORT = dim::rect2di(0, 0, 100, 100)
static const T DEFAULT_NEAR = T(0.25)
static const T DEFAULT_FAR = T(1000)
static const T DEFAULT_FOV = T(74)

Detailed Description

template<typename T>
class sp::scene::Projection3D< T >

Base class for projection matrices.

See also:
matrix4
Since:
Version 3.2

Constructor & Destructor Documentation

template<typename T>
sp::scene::Projection3D< T >::Projection3D (  )  [inline]
template<typename T>
sp::scene::Projection3D< T >::Projection3D ( const dim::rect2di Viewport,
const T &  NearPlane = Projection3D<T>::DEFAULT_NEAR,
const T &  FarPlane = Projection3D<T>::DEFAULT_FAR,
const T &  FieldOfView = Projection3D<T>::DEFAULT_FOV,
bool  IsOrtho = false 
) [inline]
template<typename T>
sp::scene::Projection3D< T >::Projection3D ( const Projection3D< T > &  Other  )  [inline]
template<typename T>
sp::scene::Projection3D< T >::~Projection3D (  )  [inline]

Member Function Documentation

template<typename T>
const T& sp::scene::Projection3D< T >::getFarPlane (  )  const [inline]

Returns the far clipping plane.

template<typename T>
const T& sp::scene::Projection3D< T >::getFOV (  )  const [inline]

Returns the field of view (FOV).

template<typename T>
const dim::matrix4<T>& sp::scene::Projection3D< T >::getMatrixLH (  )  const [inline]

Returns the left-handed 4x4 projection matrix. This is the default projection matrix. Only use the right-handed projection matrix for the OpenGL render sytsem.

See also:
getMatrixRH
template<typename T>
const dim::matrix4<T>& sp::scene::Projection3D< T >::getMatrixRH (  )  const [inline]

Returns the right-handed 4x4 projection matrix. This is only used for the OpenGL render system.

See also:
getMatrixLH
template<typename T>
const T& sp::scene::Projection3D< T >::getNearPlane (  )  const [inline]

Returns the near clipping plane.

template<typename T>
bool sp::scene::Projection3D< T >::getOrtho (  )  const [inline]

Returns true if orthogonal projection is enabled.

template<typename T>
const dim::rect2di& sp::scene::Projection3D< T >::getViewport (  )  const [inline]

Returns the viewport rectangle.

template<typename T>
T sp::scene::Projection3D< T >::getZoom (  )  const [inline]
template<typename T>
Projection3D<T>& sp::scene::Projection3D< T >::operator= ( const Projection3D< T > &  Other  )  [inline]
template<typename T>
void sp::scene::Projection3D< T >::setFarPlane ( const T &  FarPlane  )  [inline]

Sets the far clipping plane. By default 1000.0.

template<typename T>
void sp::scene::Projection3D< T >::setFOV ( const T &  FieldOfView  )  [inline]

Sets the field of view (FOV). By default 74.0.

template<typename T>
void sp::scene::Projection3D< T >::setNearPlane ( const T &  NearPlane  )  [inline]

Sets the near clipping plane. By default 0.25.

template<typename T>
void sp::scene::Projection3D< T >::setOrtho ( bool  Enable  )  [inline]

Enables or disables orthogonal projection. By default false.

template<typename T>
void sp::scene::Projection3D< T >::setViewport ( const dim::rect2di Viewport  )  [inline]

Sets the viewport rectangle. By default (0, 0, 100, 100).

template<typename T>
void sp::scene::Projection3D< T >::setZoom ( const T &  Zoom  )  [inline]

Sets the zoom factor. By default 1.0. This uses the setFOV function.

template<typename T>
void sp::scene::Projection3D< T >::update (  )  const [inline]

Member Data Documentation

template<typename T>
const T sp::scene::Projection3D< T >::DEFAULT_FAR = T(1000) [static]
template<typename T>
const T sp::scene::Projection3D< T >::DEFAULT_FOV = T(74) [static]
template<typename T>
const T sp::scene::Projection3D< T >::DEFAULT_NEAR = T(0.25) [static]
template<typename T>
const dim::rect2di sp::scene::Projection3D< T >::DEFAULT_VIEWPORT = dim::rect2di(0, 0, 100, 100) [static]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines