vmmlib
1.12.0
Templatized C++ vector and matrix math library
|
Represents a frustum, following OpenGL conventions. More...
#include <frustum.hpp>
Public Member Functions | |
Frustum () | |
Construct a default frustum (-1, 1, -1, 1, 0.1, 100). More... | |
Frustum (T left, T right, T bottom, T top, T nearPlane, T farPlane) | |
Construct a frustum with default values. | |
Frustum (T field_of_view_y, T aspect_ratio, T nearPlane_, T farPlane) | |
Construct a frustum using gluPerspective semantics. | |
Frustum (const Matrix< 4, 4, T > &projection) | |
Construct a frustum from a projection matrix. | |
~Frustum () | |
Destruct this frustum. | |
bool | operator== (const Frustum< T > &other) const |
bool | operator!= (const Frustum< T > &other) const |
bool | equals (const Frustum< T > &other, T tolerance=std::numeric_limits< T >::epsilon()) const |
Matrix< 4, 4, T > | computePerspectiveMatrix () const |
Matrix< 4, 4, T > | computeOrthoMatrix () const |
void | jitter (const vector< 2, T > &jitter_) |
Move the frustum near plane by the given offset "sideways". | |
void | adjustNearPlane (const T nearPlane) |
Move the frustum near plane. More... | |
T | getWidth () const |
T | getHeight () const |
Access to frustum corners | |
T & | left () |
T | left () const |
T & | right () |
T | right () const |
T & | bottom () |
T | bottom () const |
T & | top () |
T | top () const |
T & | nearPlane () |
T | nearPlane () const |
T & | farPlane () |
T | farPlane () const |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Frustum &f) |
Represents a frustum, following OpenGL conventions.
Definition at line 42 of file frustum.hpp.
vmml::Frustum< T >::Frustum | ( | ) |
Construct a default frustum (-1, 1, -1, 1, 0.1, 100).
Definition at line 142 of file frustum.hpp.
void vmml::Frustum< T >::adjustNearPlane | ( | const T | nearPlane | ) |
Move the frustum near plane.
Changes the position of the nearPlane, adjusting the other parameters in a way that the shape of the perspective pyramid stays the same.
Definition at line 277 of file frustum.hpp.
Referenced by vmml::Frustum< T >::~Frustum().
Matrix< 4, 4, T > vmml::Frustum< T >::computeOrthoMatrix | ( | ) | const |
Definition at line 241 of file frustum.hpp.
Referenced by vmml::Frustum< T >::~Frustum().
Matrix< 4, 4, T > vmml::Frustum< T >::computePerspectiveMatrix | ( | ) | const |
Definition at line 212 of file frustum.hpp.
Referenced by vmml::Frustum< T >::~Frustum().
bool vmml::Frustum< T >::equals | ( | const Frustum< T > & | other, |
T | tolerance = std::numeric_limits< T >::epsilon( ) |
||
) | const |
Definition at line 201 of file frustum.hpp.
Referenced by vmml::Frustum< T >::~Frustum().
|
inline |
Definition at line 295 of file frustum.hpp.
Referenced by vmml::Frustum< T >::~Frustum().
|
inline |
Definition at line 290 of file frustum.hpp.
Referenced by vmml::Frustum< T >::~Frustum().
bool vmml::Frustum< T >::operator!= | ( | const Frustum< T > & | other | ) | const |
Definition at line 195 of file frustum.hpp.
Referenced by vmml::Frustum< T >::~Frustum().
bool vmml::Frustum< T >::operator== | ( | const Frustum< T > & | other | ) | const |
Definition at line 189 of file frustum.hpp.
Referenced by vmml::Frustum< T >::~Frustum().