16#ifndef BT_NEOHOOKEAN_H
17#define BT_NEOHOOKEAN_H
392 for (
int i = 0; i < 3; ++i)
394 ans +=
A[i].dot(
B[i]);
404 M[0][0] += scale * (
dF[1][1] *
F[2][2] +
F[1][1] *
dF[2][2] -
dF[2][1] *
F[1][2] -
F[2][1] *
dF[1][2]);
405 M[1][0] += scale * (
dF[2][1] *
F[0][2] +
F[2][1] *
dF[0][2] -
dF[0][1] *
F[2][2] -
F[0][1] *
dF[2][2]);
406 M[2][0] += scale * (
dF[0][1] *
F[1][2] +
F[0][1] *
dF[1][2] -
dF[1][1] *
F[0][2] -
F[1][1] *
dF[0][2]);
407 M[0][1] += scale * (
dF[2][0] *
F[1][2] +
F[2][0] *
dF[1][2] -
dF[1][0] *
F[2][2] -
F[1][0] *
dF[2][2]);
408 M[1][1] += scale * (
dF[0][0] *
F[2][2] +
F[0][0] *
dF[2][2] -
dF[2][0] *
F[0][2] -
F[2][0] *
dF[0][2]);
409 M[2][1] += scale * (
dF[1][0] *
F[0][2] +
F[1][0] *
dF[0][2] -
dF[0][0] *
F[1][2] -
F[0][0] *
dF[1][2]);
410 M[0][2] += scale * (
dF[1][0] *
F[2][1] +
F[1][0] *
dF[2][1] -
dF[2][0] *
F[1][1] -
F[2][0] *
dF[1][1]);
411 M[1][2] += scale * (
dF[2][0] *
F[0][1] +
F[2][0] *
dF[0][1] -
dF[0][0] *
F[2][1] -
F[0][0] *
dF[2][1]);
412 M[2][2] += scale * (
dF[0][0] *
F[1][1] +
F[0][0] *
dF[1][1] -
dF[1][0] *
F[0][1] -
F[1][0] *
dF[0][1]);
void singularValueDecomposition(const btMatrix2x2 &A, GivensRotation &U, const btMatrix2x2 &Sigma, GivensRotation &V, const btScalar tol=64 *std::numeric_limits< btScalar >::epsilon())
2x2 SVD (singular value decomposition) A=USV'
const T & btMax(const T &a, const T &b)
const T & btMin(const T &a, const T &b)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
int size() const
return the number of elements in the array
void resize(int newsize, const T &fillData=T())
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
btMatrix3x3 transpose() const
Return the transpose of the matrix.
void setIdentity()
Set the matrix to the identity.
btVector3 getColumn(int i) const
Get a column of the matrix as a vector.
The btSoftBody is an class to simulate cloth and volumetric soft bodies.
btAlignedObjectArray< TetraScratch > m_tetraScratches
btVector3 can be used to represent 3D points and vectors.