29 #include "../precompiled.h"
43 p[0] = -( p1[2] * -p2[3] - p2[2] * -p1[3] );
44 p[1] = -( p2[1] * -p1[3] - p1[1] * -p2[3] );
45 p[2] = p1[1] * p2[2] - p2[1] * p1[2];
47 p[3] = -( p1[0] * -p2[3] - p2[0] * -p1[3] );
48 p[4] = p1[0] * p2[1] - p2[0] * p1[1];
49 p[5] = p1[0] * p2[2] - p2[0] * p1[2];
51 return (
p[2] != 0.0
f ||
p[5] != 0.0
f ||
p[4] != 0.0
f );
66 dir[0] = -a.
p[5] *
p[4] - a.
p[4] * -
p[5];
67 dir[1] = a.
p[4] *
p[2] - a.
p[2] *
p[4];
68 dir[2] = a.
p[2] * -
p[5] - -a.
p[5] *
p[2];
69 if ( dir[0] == 0.0
f && dir[1] == 0.0
f && dir[2] == 0.0
f ) {
72 d = a.
p[4] * (
p[2]*dir[1] - -
p[5]*dir[0]) +
73 a.
p[5] * (
p[2]*dir[2] -
p[4]*dir[0]) +
74 a.
p[2] * (-
p[5]*dir[2] -
p[4]*dir[1]);
76 return ( dir * dir ) * ( s *
s );
static const char * FloatArrayToString(const float *array, const int length, const int precision)
int GetDimension(void) const
const char * ToString(int precision=2) const
idPluecker pluecker_origin(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)
bool FromPlanes(const idPlane &p1, const idPlane &p2)
float PermutedInnerProduct(const idPluecker &a) const
GLubyte GLubyte GLubyte a
const float * ToFloatPtr(void) const
float Distance3DSqr(const idPluecker &a) const