24 template <
typename Real>
26 Ellipse2<Real>& ellipse);
29 template <
typename Real>
30 bool InContainer(Vector2<Real>
const& point, Ellipse2<Real>
const& ellipse);
34 template <
typename Real>
36 Ellipse2<Real>
const& ellipse1, Ellipse2<Real>& merge);
39 template <
typename Real>
47 if (fitter.
Fit(numPoints, points))
53 for (
int j = 0; j < 2; ++j)
55 if (box.
extent[j] < (Real)0)
70 Real maxValue = (Real)0;
71 for (
int i = 0; i < numPoints; ++i)
81 box.
extent[0] * dot[0] * dot[0] +
82 box.
extent[1] * dot[1] * dot[1];
92 for (
int j = 0; j < 2; ++j)
104 template <
typename Real>
111 return Length(standardized) <= (Real)1;
114 template <
typename Real>
123 if (
Dot(ellipse0.
axis[0], ellipse1.
axis[0]) >= (Real)0)
125 merge.
axis[0] = ((Real)0.5)*(ellipse0.
axis[0] + ellipse1.
axis[0]);
129 merge.
axis[0] = ((Real)0.5)*(ellipse0.
axis[0] - ellipse1.
axis[0]);
137 for (
int j = 0; j < 2; ++j)
143 Real min0, max0, min1, max1;
144 Project(ellipse0, line, min0, max0);
145 Project(ellipse1, line, min1, max1);
149 Real maxIntr = (max0 >= max1 ? max0 : max1);
150 Real minIntr = (min0 <= min1 ? min0 : min1);
157 merge.
extent[j] = ((Real)0.5)*(maxIntr - minIntr);
std::array< Vector< N, Real >, N > axis
GVector< Real > Project(GVector< Real > const &v, int reject)
bool GetContainer(int numPoints, Vector3< Real > const *points, Capsule3< Real > &capsule)
bool Fit(int numPoints, Vector2< Real > const *points)
OrientedBox2< Real > const & GetParameters() const
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)
Real Normalize(GVector< Real > &v, bool robust=false)
Vector2< Real > Perp(Vector2< Real > const &v)
DualQuaternion< Real > Length(DualQuaternion< Real > const &d, bool robust=false)
std::array< Vector< N, Real >, N > axis