Ion
|
#include "ion/math/angle.h"
#include "ion/math/matrix.h"
#include "ion/math/rotation.h"
#include "ion/math/vector.h"
Go to the source code of this file.
Namespaces | |
ion | |
Copyright 2016 Google Inc. | |
ion::math | |
Functions | |
template<int Dimension, typename T > | |
const Vector< Dimension, T > | ion::math::operator* (const Matrix< Dimension+1, T > &m, const Vector< Dimension, T > &v) |
Transforming vectors and points. More... | |
template<int Dimension, typename T > | |
const Point< Dimension, T > | ion::math::operator* (const Matrix< Dimension+1, T > &m, const Point< Dimension, T > &p) |
Multiplies a Matrix and a Point of one smaller Dimension (the template parameter) to produce another Point. More... | |
template<int Dimension, typename T > | |
const Point< Dimension, T > | ion::math::ProjectPoint (const Matrix< Dimension+1, T > &m, const Point< Dimension, T > &p) |
Multiplies a Matrix and a Point of one smaller Dimension (the template parameter) to produce another Point and projects it by dividing by the homogeneous coordinate. More... | |
template<typename T > | |
Matrix< 3, T > | ion::math::NonhomogeneousSubmatrixH (const Matrix< 4, T > &m) |
Homogeneous matrices. More... | |
template<typename T > | |
const Matrix< 4, T > | ion::math::OrthoInverseH (const Matrix< 4, T > &m) |
Public functions. More... | |
template<int Dimension, typename T > | |
const Matrix< Dimension+1, T > | ion::math::TranslationMatrix (const VectorBase< Dimension, T > &t) |
Affine transformation matrices. More... | |
template<int Dimension, typename T > | |
const Matrix< Dimension+1, T > | ion::math::ScaleMatrixH (const Vector< Dimension, T > &s) |
Returns a Matrix representing a scale by the factors in a Vector whose Dimension is one less than the Dimension of the Matrix. More... | |
template<int Dimension, typename T > | |
const Matrix< Dimension, T > | ion::math::ScaleMatrixNH (const Vector< Dimension, T > &s) |
Returns a Matrix representing a scale by the factors in a Vector, which is the same Dimension as the Matrix. More... | |
template<typename T > | |
ION_API const Matrix< 4, T > | ion::math::RotationMatrixH (const Rotation< T > &r) |
Returns a 4x4 Matrix representing a 3D rotation. More... | |
template<typename T > | |
ION_API const Matrix< 3, T > | ion::math::RotationMatrixNH (const Rotation< T > &r) |
Returns a 3x3 Matrix representing a 3D rotation. More... | |
template<typename T > | |
const Matrix< 4, T > | ion::math::RotationMatrixAxisAngleH (const Vector< 3, T > &axis, const Angle< T > &angle) |
Returns a 4x4 Matrix representing a 3D rotation specified as axis and angle. More... | |
template<typename T > | |
const Matrix< 3, T > | ion::math::RotationMatrixAxisAngleNH (const Vector< 3, T > &axis, const Angle< T > &angle) |
Returns a 3x3 Matrix representing a 3D rotation specified as axis and angle. More... | |
template<typename T > | |
ION_API const Matrix< 4, T > | ion::math::LookAtMatrixFromCenter (const Point< 3, T > &eye, const Point< 3, T > ¢er, const Vector< 3, T > &up) |
View matrices. More... | |
template<typename T > | |
ION_API const Matrix< 4, T > | ion::math::LookAtMatrixFromDir (const Point< 3, T > &eye, const Vector< 3, T > &dir, const Vector< 3, T > &up) |
Returns a 4x4 viewing matrix based on the given camera parameters, which use a view direction rather than look at center point. More... | |
template<typename T > | |
ION_API const Matrix< 4, T > | ion::math::OrthographicMatrixFromFrustum (T x_left, T x_right, T y_bottom, T y_top, T z_near, T z_far) |
Projection matrices. More... | |
template<typename T > | |
ION_API const Matrix< 4, T > | ion::math::PerspectiveMatrixFromFrustum (T x_left, T x_right, T y_bottom, T y_top, T z_near, T z_far) |
Returns a 4x4 perspective projection matrix based on the given parameters, which follow the conventions of the old glFrustum() function. More... | |
template<typename T > | |
ION_API const Matrix< 4, T > | ion::math::PerspectiveMatrixFromView (const Angle< T > &fovy, T aspect, T z_near, T z_far) |
Returns a 4x4 perspective projection matrix based on the given parameters, which follow the conventions of the gluPerspective() function. More... | |
template<typename T > | |
const Matrix< 4, T > | ion::math::PerspectiveMatrixInverse (const Matrix< 4, T > &m) |
Returns the inverse of m iff m is a perspective projection matrix, i.e., iff it has the following form:
[X 0 A 0]
[0 Y B 0]
[0 0 C D]
[0 0 -1 0]
Triggers a DCHECK otherwise. More... | |