26 template <
typename Real>
28 Ellipsoid3<Real>& ellipsoid);
31 template <
typename Real>
33 Ellipsoid3<Real>
const& ellipsoid);
37 template <
typename Real>
39 Ellipsoid3<Real>
const& ellipsoid1, Ellipsoid3<Real>& merge);
42 template <
typename Real>
50 if (fitter.
Fit(numPoints, points))
56 for (
int j = 0; j < 3; ++j)
58 if (box.
extent[j] < (Real)0)
73 Real maxValue = (Real)0;
74 for (
int i = 0; i < numPoints; ++i)
85 box.
extent[0] * dot[0] * dot[0] +
86 box.
extent[1] * dot[1] * dot[1] +
87 box.
extent[2] * dot[2] * dot[2];
97 for (
int j = 0; j < 3; ++j)
108 template <
typename Real>
117 return Length(standardized) <= (Real)1;
120 template <
typename Real>
138 if (
Dot(q0, q1) < (Real)0)
146 for (
int j = 0; j < 3; ++j)
154 for (
int i = 0; i < 3; ++i)
160 Real min0, max0, min1, max1;
161 Project(ellipsoid0, line, min0, max0);
162 Project(ellipsoid1, line, min1, max1);
166 Real maxIntr = (max0 >= max1 ? max0 : max1);
167 Real minIntr = (min0 <= min1 ? min0 : min1);
174 merge.
extent[i] = ((Real)0.5)*(maxIntr - minIntr);
bool Fit(int numPoints, Vector3< Real > const *points)
std::array< Vector< N, Real >, N > axis
Vector< NumRows, Real > GetCol(int c) const
GVector< Real > Project(GVector< Real > const &v, int reject)
bool GetContainer(int numPoints, Vector3< Real > const *points, Capsule3< Real > &capsule)
bool MergeContainers(Capsule3< Real > const &capsule0, Capsule3< Real > const &capsule1, Capsule3< Real > &merge)
bool InContainer(Vector3< Real > const &point, Capsule3< Real > const &capsule)
GLsizei const GLfloat * value
Vector< N, Real > direction
GLfixed GLfixed GLint GLint GLfixed points
DualQuaternion< Real > Dot(DualQuaternion< Real > const &d0, DualQuaternion< Real > const &d1)
void SetCol(int c, Vector< NumRows, Real > const &vec)
Real Normalize(GVector< Real > &v, bool robust=false)
OrientedBox3< Real > const & GetParameters() const
DualQuaternion< Real > Length(DualQuaternion< Real > const &d, bool robust=false)
GLdouble GLdouble GLdouble GLdouble q
std::array< Vector< N, Real >, N > axis