23 template <
int N,
typename Real>
46 std::array<Vector<N, Real>, 2>
p;
59 template <
typename Real>
62 template <
typename Real>
66 template <
int N,
typename Real>
73 template <
int N,
typename Real>
81 template <
int N,
typename Real>
87 template <
int N,
typename Real>
94 template <
int N,
typename Real>
98 p[0] = center - extent * direction;
99 p[1] = center + extent * direction;
102 template <
int N,
typename Real>
106 center = ((Real)0.5)*(
p[0] +
p[1]);
107 direction =
p[1] -
p[0];
108 extent = ((Real)0.5)*
Normalize(direction);
111 template <
int N,
typename Real>
114 return p == segment.
p;
117 template <
int N,
typename Real>
123 template <
int N,
typename Real>
126 return p < segment.
p;
129 template <
int N,
typename Real>
135 template <
int N,
typename Real>
141 template <
int N,
typename Real>
std::array< Vector< N, Real >, 2 > p
bool operator>=(Segment const &segment) const
bool operator==(Segment const &segment) const
bool operator<=(Segment const &segment) const
bool operator<(Segment const &segment) const
Real Normalize(GVector< Real > &v, bool robust=false)
bool operator>(Segment const &segment) const
void SetCenteredForm(Vector< N, Real > const ¢er, Vector< N, Real > const &direction, Real extent)
bool operator!=(Segment const &segment) const
void GetCenteredForm(Vector< N, Real > ¢er, Vector< N, Real > &direction, Real &extent) const