8#ifndef btModifiedGramSchmidt_h
9#define btModifiedGramSchmidt_h
30 for (
int i = 0; i <
m_in.
size(); ++i)
35 for (
int j = 0; j < i; ++j)
37 v = v - v.proj(
m_out[j]);
49 printf(
"=======inputs=========\n");
54 printf(
"=======output=========\n");
68 printf(
"vec[%d] is not unit, norm squared = %f\n", i,
m_out[i].
dot(
m_out[j]));
75 printf(
"vec[%d] and vec[%d] is not orthogonal, dot product = %f\n", i, j,
m_out[i].
dot(
m_out[j]));
btScalar dot(const btQuaternion &q1, const btQuaternion &q2)
Calculate the dot product between two quaternions.
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
int size() const
return the number of elements in the array
void resize(int newsize, const T &fillData=T())
btAlignedObjectArray< TV > m_in
btModifiedGramSchmidt(const btAlignedObjectArray< TV > &vecs)
btAlignedObjectArray< TV > m_out