|
template<typename T > |
T | clamp (T val, T my_min, T my_max) |
| Returns \( \min( \max( \) val \(, \) my_min \( ), \) my_max \( ) \). More...
|
|
template<typename T > |
T | sq (T x) |
| Computes and returns \( x^2 \).
|
|
float | deg2rad (float deg) |
| Converts degrees to radians.
|
|
float | rad2deg (float rad) |
| Converts radians to degrees.
|
|
template<typename T > |
T | epsilon () |
| Defines the maximum difference of two objects treated as equal.
|
|
template<> |
float | epsilon< float > () |
| Defines the maximum difference of two single-precision floating point objects treated as equal.
|
|
template<> |
double | epsilon< double > () |
| Defines the maximum difference of two double-precision floating point objects treated as equal.
|
|
template<typename T > |
T | length2 (const T &x) |
| Retrieves the squared length of vector and scalar types. General case assumes scalar type.
|
|
template<typename VectorElementType , int dimension> |
VectorElementType | length2 (const Eigen::Matrix< VectorElementType, dimension, 1 > &x) |
| Retrieves the squared length of vector and scalar types. This is the specialization for vector types.
|
|
template<typename InputType > |
bool | isEqual (const InputType &x, const InputType &y) |
| Tells whether two objects are equal respectively to epsilon.
|
|
template<> |
bool | isEqual (const bool &x, const bool &y) |
| Tells whether two objects are equal. This is the specialization for bool types.
|
|
Matrix4f | identity4f () |
| Returns \(\mathbb R^{4 \times 4}\) identity matrix.
|
|
Matrix3f | identity3f () |
| Returns \(\mathbb R^{3 \times 3}\) identity matrix.
|
|
template<typename MatrixType > |
MatrixType | zeros () |
| Returns matrix with zeros in all components.
|
|
Matrix4f | basis4f (const Vector4f &x, const Vector4f &y, const Vector4f &z, const Vector4f &t=Vector4f(0, 0, 0, 0)) |
| Creates \(\mathbb R^{3 \times 3}\) basis embedded into a \(\mathbb R^{4 \times 4}\) homogenous coordinates matrix. More...
|
|
Matrix4f | basis4f (const Vector3f &x, const Vector3f &y, const Vector3f &z, const Vector3f &t=Vector3f(0, 0, 0)) |
|
Matrix4f | translation4f (float x, float y, float z) |
| Returns matrix that translates homogeneous coordinates.
|
|
template<typename Vector > |
Matrix4f | translation4f (const Vector &v) |
|
Matrix4f | scaling4f (float x, float y, float z) |
| Creates scaling matrix for homogeneous coordinates.
|
|
template<typename VectorElementType > |
Matrix4f | scaling4f (const Eigen::Matrix< VectorElementType, 3, 1 > &v) |
|
Matrix4f | scaling4f (float uniformScaleFactor) |
|
Matrix4f | rotation4f (float x, float y, float z, float radians) |
| Creates rotation matrix for homogeneous coordinates. The rotation is performed around the axis that is specified by the vector with the components x, y and z.
|
|
template<typename Vector > |
Matrix4f | rotation4f (const Vector &v, float radians) |
|
Matrix3f | rotation3f (float x, float y, float z, float radians) |
| Creates rotation matrix for homogeneous coordinates, but returns only the upper left \(3 \times 3\) sub-matrix.
|
|
Vector3f | orthogonal3f (const Vector3f &in) |
| Constructs \(\mathbb R^3\) vector that is orthogonal to in. The result is undefined if the squared length of in equals zero. More...
|
|
template<typename VectorElementType , int rows, typename WType > |
Eigen::Matrix< VectorElementType, 4, 1 > | vector4 (const Eigen::Matrix< VectorElementType, rows, 1 > &v, WType w) |
| Creates 4-dimensional vector from 3-dimensional (or higher) with same component type, and a scalar that is appended as the fourth component.
|
|
template<typename VectorElementType , int rows> |
Eigen::Matrix< VectorElementType, 3, 1 > | vector3 (const Eigen::Matrix< VectorElementType, rows, 1 > &v) |
| Creates 3-dimensional vector from 4-dimensional (or higher) with same component type by dropping the fourth component.
|
|
Matrix4f | plane4f (const Vector3f &normal, float distance) |
| Creates matrix that transforms from the tangent space of a plane with particular normal vector and origin distance to the space that normal and distance are given within.
|
|
Matrix4f | plane4f (const Vector3f &normal, const Vector3f &support) |
|
float | translationDistance2 (const Matrix4f &m) |
| Returns the squared length of the translation component of the homogeneous coordinates transformation matrix m.
|
|
template<typename Matrix > |
Matrix::Scalar | maxAbsElement (const Matrix &m) |
| Returns \(\max_{i,j} \left|m_{i,j}\right|\) where $m$ is m.
|
|
Matrix4f | frustum4f (float left, float right, float bottom, float top, float zNear, float zFar) |
| Returns the projection matrix that is described by the specified frustum. More...
|
|
Matrix4f | frustum4f (float fovRadiansHorizontal, float heightOverWidth, float zNear, float zFar) |
|
Matrix4f | ortho4f (float left, float right, float bottom, float top, float zNear, float zFar) |
| Returns the projection matrix that is described by the specified box.
|
|
template<typename Sampler > |
base::math::Vector3f | computeFastGradient3f (Sampler func) |
| Computes fast approximation of the gradient at the origin of the scalar field func. More...
|
|
template<typename ScalarType > |
unsigned int | round_ui (ScalarType x) |
| Rounds x to the closest \(x' \in \mathbb Z_{\geq 0}\). Either the data type of \(x\) must be unsigned or \(x \geq 0\).
|
|
template<typename MatrixElementType , int cols, int rows> |
Eigen::Matrix< unsigned int, cols, rows > | round_ui (const Eigen::Matrix< MatrixElementType, cols, rows > &m) |
| Rounds matrix m to such \(m'\) that every element in \(m'\) is close-most to its corresponding element in \(m\). Either the element data type of \(m\) must be unsigned or \(m_{i,j} \geq 0 \forall i,j\).
|
|
template<typename ScalarType > |
ScalarType | makeEven (ScalarType x, int s) |
| Returns \(x\) if \(x\) is even and \(x + s\) if \(x\) is odd, where \(s \in \left\{-1, +1\right\}\). The data type of \(x\) must be integral.
|
|
template<typename MatrixElementType , int cols, int rows> |
Eigen::Matrix< MatrixElementType, cols, rows > | makeEven (const Eigen::Matrix< MatrixElementType, cols, rows > &m, int s) |
| Returns matrix \(m'\) of the same size like \(m\) where \(m'_{i,j} = m_{i,j}\) if \(m_{i,j}\) is even and \(m'_{i,j} = m_{i,j} + s\) if \(m_{i,j}\) is odd, where \(s \in \left\{-1, +1\right\}\). The element data type of \(m\) must be integral.
|
|
template<typename ResultType , typename SupportType > |
ResultType | mix (const SupportType &a, const SupportType &b, float t) |
| Interpolates between and by t \(\in\left[0, 1\right]\) linearly.
|
|
Provides set of math-related classes and functions.