5 #ifndef BALL_MATHS_PLANE3_H
6 #define BALL_MATHS_PLANE3_H
8 #ifdef BALL_HAS_IEEEFP_H
15 #ifndef BALL_MATHS_LINE3_H
19 #ifndef BALL_MATHS_VECTOR3_H
23 #ifndef BALL_MATHS_COMMON_H
45 std::ostream& operator << (std::ostream& s, const TPlane3<T>& plane);
114 TPlane3(
const T& a,
const T& b,
const T&
c,
const T& d)
117 if (a == 0 && b == 0 && c == 0)
165 plane.
p = temp_point;
169 plane.
n = temp_point;
203 n = (a - b) % (b - c);
253 T length =
n.getLength();
291 return (
p == plane.
p &&
n == plane.
n);
300 return (
p != plane.
p ||
n != plane.
n);
344 void dump(std::ostream& s = std::cout,
Size depth = 0)
const
352 s <<
" position: " <<
p << std::endl;
355 s <<
" normal: " <<
n << std::endl;
379 template <
typename T>
384 s >> c >> plane.
p >> plane.
n >>
c;
391 template <
typename T>
392 std::ostream& operator << (std::ostream& s, const TPlane3<T>& plane)
395 return (s <<
'(' << plane.p <<
' ' << plane.n <<
')');
405 #endif // BALL_MATHS_PLANE3_H
bool has(const TLine3< T > &line) const
void set(const TVector3< T > &a, const TVector3< T > &b, const TVector3< T > &c)
#define BALL_CREATE(name)
void set(const TVector3< T > &point, const TVector3< T > &normal)
TPlane3(const TVector3< T > &point, const TVector3< T > &normal)
void swap(TPlane3 &plane)
std::istream & operator>>(std::istream &is, TRegularData1D< ValueType > &grid)
Input operator.
bool operator!=(const TPlane3 &plane) const
TPlane3 & operator=(const TPlane3 &plane)
void dump(std::ostream &s=std::cout, Size depth=0) const
BALL_EXTERN_VARIABLE const double c
void set(const TPlane3 &plane)
TPlane3(const TVector3< T > &a, const TVector3< T > &b, const TVector3< T > &c)
#define BALL_DUMP_HEADER(os, cl, ob)
bool isLess(const T1 &a, const T2 &b)
bool operator==(const TPlane3 &plane) const
#define BALL_DUMP_STREAM_PREFIX(os)
bool has(const TVector3< T > &point) const
TPlane3(const TPlane3 &plane)
TPlane3(const T &a, const T &b, const T &c, const T &d)
#define BALL_DUMP_STREAM_SUFFIX(os)
#define BALL_DUMP_DEPTH(os, depth)