Class MathFunctions

Class Documentation

class MathFunctions

Public Static Functions

static void extractRotation(const Matrix3r &A, Quaternionr &q, const unsigned int maxIter)

Implementation of the paper:

Matthias Müller, Jan Bender, Nuttapong Chentanez and Miles Macklin, “A Robust Method to Extract the Rotational Part of Deformations”, ACM SIGGRAPH Motion in Games, 2016

static void pseudoInverse(const Matrix3r &a, Matrix3r &res)
static void svdWithInversionHandling(const Matrix3r &A, Vector3r &sigma, Matrix3r &U, Matrix3r &VT)

Perform a singular value decomposition of matrix A: A = U * sigma * V^T. This function returns two proper rotation matrices U and V^T which do not contain a reflection. Reflections are corrected by the inversion handling proposed by Irving et al. 2004.

static void eigenDecomposition(const Matrix3r &A, Matrix3r &eigenVecs, Vector3r &eigenVals)
static void jacobiRotate(Matrix3r &A, Matrix3r &R, int p, int q)
static void getOrthogonalVectors(const Vector3r &vec, Vector3r &x, Vector3r &y)

Returns two orthogonal vectors to vec which are also orthogonal to each other.

static void APD_Newton(const Matrix3r &F, Quaternionr &q)

computes the APD of 8 deformation gradients. (Alg. 3 from the paper: Kugelstadt et al. “Fast Corotated FEM using Operator Splitting”, CGF 2018)