21 template <
typename Real>
23 Vector3<Real>
const&
v2, Circle3<Real>& circle);
26 template <
typename Real>
28 Vector3<Real>
const&
v2, Vector3<Real>
const&
v3, Sphere3<Real>& sphere);
31 template <
typename Real>
32 bool Inscribe(Vector3<Real>
const&
v0, Vector3<Real>
const&
v1,
33 Vector3<Real>
const&
v2, Circle3<Real>& circle);
36 template <
typename Real>
37 bool Inscribe(Vector3<Real>
const&
v0, Vector3<Real>
const&
v1,
38 Vector3<Real>
const&
v2, Vector3<Real>
const&
v3, Sphere3<Real>& sphere);
41 template <
typename Real>
47 Real e02e02 =
Dot(E02, E02);
48 Real e02e12 =
Dot(E02, E12);
49 Real e12e12 =
Dot(E12, E12);
50 Real det = e02e02*e12e12 - e02e12*e02e12;
53 Real halfInvDet = ((Real)0.5) / det;
54 Real u0 = halfInvDet*e12e12*(e02e02 - e02e12);
55 Real
u1 = halfInvDet*e02e02*(e12e12 - e02e12);
65 template <
typename Real>
79 ((Real)0.5)*
Dot(E10, E10),
80 ((Real)0.5)*
Dot(E20, E20),
81 ((Real)0.5)*
Dot(E30, E30) };
86 sphere.
center = v0 + solution;
93 template <
typename Real>
110 Real a0 =
Dot(N1, E0);
116 Real a1 =
Dot(N2, E1);
122 Real a2 =
Dot(N0, E2);
128 Real invA0 = ((Real)1) / a0;
129 Real invA1 = ((Real)1) / a1;
130 Real invA2 = ((Real)1) / a2;
132 circle.
radius = ((Real)1) / (invA0 + invA1 + invA2);
138 template <
typename Real>
181 sphere.
center = v3 + solution;
bool Inscribe(Vector2< Real > const &v0, Vector2< Real > const &v1, Vector2< Real > const &v2, Circle2< Real > &circle)
gte::BSNumber< UIntegerType > abs(gte::BSNumber< UIntegerType > const &number)
Vector< N, Real > UnitCross(Vector< N, Real > const &v0, Vector< N, Real > const &v1, bool robust=false)
DualQuaternion< Real > Dot(DualQuaternion< Real > const &d0, DualQuaternion< Real > const &d1)
GLfloat GLfloat GLfloat GLfloat v3
Real Normalize(GVector< Real > &v, bool robust=false)
DualQuaternion< Real > Cross(DualQuaternion< Real > const &d0, DualQuaternion< Real > const &d1)
DualQuaternion< Real > Length(DualQuaternion< Real > const &d, bool robust=false)
GLfloat GLfloat GLfloat v2
bool Circumscribe(Vector2< Real > const &v0, Vector2< Real > const &v1, Vector2< Real > const &v2, Circle2< Real > &circle)
void SetRow(int r, Vector< NumCols, Real > const &vec)