52 template <
typename Real>
57 Real coefficidents[10]);
67 template <
typename Real>
76 template <
typename Real>
81 for (
int i = 0; i < numPoints; ++i)
83 Real
x = points[i][0];
84 Real
y = points[i][1];
85 Real
z = points[i][2];
155 A(0, 0) =
static_cast<Real
>(numPoints);
179 for (
int col = 0; col <
row; ++col)
181 A(row, col) = A(col, row);
185 Real invNumPoints = ((Real)1) /
static_cast<Real
>(numPoints);
188 for (
int col = 0; col < 10; ++col)
190 A(
row, col) *= invNumPoints;
204 template <
typename Real>
209 for (
int i = 0; i < numPoints; ++i)
211 Real
x = points[i][0];
212 Real
y = points[i][1];
213 Real
z = points[i][2];
220 Real r2 = x2 + y2 + z2;
242 A(0, 0) =
static_cast<Real
>(numPoints);
246 for (
int col = 0; col <
row; ++col)
248 A(row, col) = A(col, row);
252 Real invNumPoints = ((Real)1) /
static_cast<Real
>(numPoints);
255 for (
int col = 0; col < 5; ++col)
257 A(
row, col) *= invNumPoints;
266 Real inv = ((Real)1) / evector[4];
267 Real coefficients[4];
270 coefficients[
row] = inv * evector[
row];
273 sphere.
center[0] = ((Real)-0.5) * coefficients[1];
274 sphere.
center[1] = ((Real)-0.5) * coefficients[2];
275 sphere.
center[2] = ((Real)-0.5) * coefficients[3];
gte::BSNumber< UIntegerType > abs(gte::BSNumber< UIntegerType > const &number)
void GetEigenvector(int c, Real *eigenvector) const
GLfixed GLfixed GLfixed y2
GLfixed GLfixed GLint GLint GLfixed points
Real GetEigenvalue(int c) const
GLenum GLenum GLsizei void * row
unsigned int Solve(Real const *input, int sortType)
DualQuaternion< Real > Dot(DualQuaternion< Real > const &d0, DualQuaternion< Real > const &d1)
GLdouble GLdouble GLdouble z
Real operator()(int numPoints, Vector3< Real > const *points, Sphere3< Real > &sphere)
Real operator()(int numPoints, Vector3< Real > const *points, Real coefficidents[10])