Bullet Collision Detection & Physics Library
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
btPolarDecomposition Class Reference

This class is used to compute the polar decomposition of a matrix. More...

#include <btPolarDecomposition.h>

Public Member Functions

 btPolarDecomposition (btScalar tolerance=DEFAULT_TOLERANCE, unsigned int maxIterations=DEFAULT_MAX_ITERATIONS)
 Creates an instance with optional parameters. More...
 
unsigned int decompose (const btMatrix3x3 &a, btMatrix3x3 &u, btMatrix3x3 &h) const
 Decomposes a matrix into orthogonal and symmetric, positive-definite parts. More...
 
unsigned int maxIterations () const
 Returns the maximum number of iterations that this algorithm will perform to achieve convergence. More...
 

Static Public Attributes

static const btScalar DEFAULT_TOLERANCE = btScalar(0.0001)
 
static const unsigned int DEFAULT_MAX_ITERATIONS = 16
 

Private Attributes

btScalar m_tolerance
 
unsigned int m_maxIterations
 

Detailed Description

This class is used to compute the polar decomposition of a matrix.

In general, the polar decomposition factorizes a matrix, A, into two parts: a unitary matrix (U) and a positive, semi-definite Hermitian matrix (H). However, in this particular implementation the original matrix, A, is required to be a square 3x3 matrix with real elements. This means that U will be an orthogonal matrix and H with be a positive-definite, symmetric matrix.

Definition at line 14 of file btPolarDecomposition.h.

Constructor & Destructor Documentation

btPolarDecomposition::btPolarDecomposition ( btScalar  tolerance = DEFAULT_TOLERANCE,
unsigned int  maxIterations = DEFAULT_MAX_ITERATIONS 
)

Creates an instance with optional parameters.

Parameters
tolerance- the tolerance used to determine convergence of the algorithm
maxIterations- the maximum number of iterations used to achieve convergence

Definition at line 36 of file btPolarDecomposition.cpp.

Member Function Documentation

unsigned int btPolarDecomposition::decompose ( const btMatrix3x3 a,
btMatrix3x3 u,
btMatrix3x3 h 
) const

Decomposes a matrix into orthogonal and symmetric, positive-definite parts.

If the number of iterations returned by this function is equal to the maximum number of iterations, the algorithm has failed to converge.

Parameters
a- the original matrix
u- the resulting orthogonal matrix
h- the resulting symmetric matrix
Returns
the number of iterations performed by the algorithm.

Definition at line 42 of file btPolarDecomposition.cpp.

unsigned int btPolarDecomposition::maxIterations ( ) const

Returns the maximum number of iterations that this algorithm will perform to achieve convergence.

Returns
maximum number of iterations

Definition at line 89 of file btPolarDecomposition.cpp.

Member Data Documentation

const unsigned int btPolarDecomposition::DEFAULT_MAX_ITERATIONS = 16
static

Definition at line 18 of file btPolarDecomposition.h.

const btScalar btPolarDecomposition::DEFAULT_TOLERANCE = btScalar(0.0001)
static

Definition at line 17 of file btPolarDecomposition.h.

unsigned int btPolarDecomposition::m_maxIterations
private

Definition at line 54 of file btPolarDecomposition.h.

btScalar btPolarDecomposition::m_tolerance
private

Definition at line 53 of file btPolarDecomposition.h.


The documentation for this class was generated from the following files: