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");
50 for (
int i = 0; i <
m_out.size(); ++i)
54 printf(
"=======output=========\n");
55 for (
int i = 0; i <
m_out.size(); ++i)
60 for (
int i = 0; i <
m_out.size(); ++i)
62 for (
int j = 0; j <
m_out.size(); ++j)
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...
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
btAlignedObjectArray< TV > m_in
btModifiedGramSchmidt(const btAlignedObjectArray< TV > &vecs)
btAlignedObjectArray< TV > m_out