OpenVDB  11.0.0
Classes | Namespaces | Functions
Mat.h File Reference
#include "Math.h"
#include <openvdb/Exceptions.h>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>

Go to the source code of this file.

Classes

class  Mat< SIZE, T >
 
class  Quat< T >
 
class  Vec3< T >
 

Namespaces

 openvdb
 
 openvdb::v11_0
 
 openvdb::v11_0::math
 

Functions

template<class MatType >
MatType rotation (const Quat< typename MatType::value_type > &q, typename MatType::value_type eps=static_cast< typename MatType::value_type >(1.0e-8))
 Return the rotation matrix specified by the given quaternion. More...
 
template<class MatType >
MatType rotation (Axis axis, typename MatType::value_type angle)
 Return a matrix for rotation by angle radians about the given axis. More...
 
template<class MatType >
MatType rotation (const Vec3< typename MatType::value_type > &_axis, typename MatType::value_type angle)
 Return a matrix for rotation by angle radians about the given axis. More...
 
template<class MatType >
Vec3< typename MatType::value_type > eulerAngles (const MatType &mat, RotationOrder rotationOrder, typename MatType::value_type eps=static_cast< typename MatType::value_type >(1.0e-8))
 Return the Euler angles composing the given rotation matrix. More...
 
template<typename MatType , typename ValueType1 , typename ValueType2 >
MatType rotation (const Vec3< ValueType1 > &_v1, const Vec3< ValueType2 > &_v2, typename MatType::value_type eps=static_cast< typename MatType::value_type >(1.0e-8))
 Return a rotation matrix that maps v1 onto v2 about the cross product of v1 and v2. More...
 
template<class MatType >
MatType scale (const Vec3< typename MatType::value_type > &s)
 Return a matrix that scales by s. More...
 
template<class MatType >
Vec3< typename MatType::value_type > getScale (const MatType &mat)
 Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows. More...
 
template<class MatType >
MatType unit (const MatType &mat, typename MatType::value_type eps=1.0e-8)
 Return a copy of the given matrix with its upper 3×3 rows normalized. More...
 
template<class MatType >
MatType unit (const MatType &in, typename MatType::value_type eps, Vec3< typename MatType::value_type > &scaling)
 Return a copy of the given matrix with its upper 3×3 rows normalized, and return the length of each of these rows in scaling. More...
 
template<class MatType >
MatType shear (Axis axis0, Axis axis1, typename MatType::value_type shear)
 Set the matrix to a shear along axis0 by a fraction of axis1. More...
 
template<class MatType >
MatType skew (const Vec3< typename MatType::value_type > &skew)
 Return a matrix as the cross product of the given vector. More...
 
template<class MatType >
MatType aim (const Vec3< typename MatType::value_type > &direction, const Vec3< typename MatType::value_type > &vertical)
 Return an orientation matrix such that z points along direction, and y is along the direction / vertical plane. More...
 
template<class MatType >
MatType snapMatBasis (const MatType &source, Axis axis, const Vec3< typename MatType::value_type > &direction)
 This function snaps a specific axis to a specific direction, preserving scaling. More...
 
template<class MatType >
MatType & padMat4 (MatType &dest)
 Write 0s along Mat4's last row and column, and a 1 on its diagonal. More...
 
template<typename MatType >
void sqrtSolve (const MatType &aA, MatType &aB, double aTol=0.01)
 Solve for A=B*B, given A. More...
 
template<typename MatType >
void powSolve (const MatType &aA, MatType &aB, double aPower, double aTol=0.01)
 
template<typename MatType >
bool isIdentity (const MatType &m)
 Determine if a matrix is an identity matrix. More...
 
template<typename MatType >
bool isInvertible (const MatType &m)
 Determine if a matrix is invertible. More...
 
template<typename MatType >
bool isSymmetric (const MatType &m)
 Determine if a matrix is symmetric. More...
 
template<typename MatType >
bool isUnitary (const MatType &m)
 Determine if a matrix is unitary (i.e., rotation or reflection). More...
 
template<typename MatType >
bool isDiagonal (const MatType &mat)
 Determine if a matrix is diagonal. More...
 
template<typename MatType >
MatType::ValueType lInfinityNorm (const MatType &matrix)
 Return the L norm of an N×N matrix. More...
 
template<typename MatType >
MatType::ValueType lOneNorm (const MatType &matrix)
 Return the L1 norm of an N×N matrix. More...
 
template<typename MatType >
bool polarDecomposition (const MatType &input, MatType &unitary, MatType &positive_hermitian, unsigned int MAX_ITERATIONS=100)
 Decompose an invertible 3×3 matrix into a unitary matrix followed by a symmetric matrix (positive semi-definite Hermitian), i.e., M = U * S. More...
 
template<unsigned SIZE, typename T >
bool cwiseLessThan (const Mat< SIZE, T > &m0, const Mat< SIZE, T > &m1)
 
template<unsigned SIZE, typename T >
bool cwiseGreaterThan (const Mat< SIZE, T > &m0, const Mat< SIZE, T > &m1)
 

Detailed Description

Author
Joshua Schpok