A plane in 3 dimensions. More...
#include <Plane.h>
Public Types | |
typedef T | Number |
The number type. | |
typedef ads::FixedArray< 3, T > | Point |
The representation for a point. | |
Public Member Functions | |
Constructors etc. | |
Plane () | |
Default constructor. Uninitialized memory. | |
Plane (const Point &point, const Point &normal) | |
Construct from a point on the plane and a normal to the plane. | |
Plane (const Point &a, const Point &b, const Point &c) | |
Construct from three points on the plane. | |
void | make (const Point &a, const Point &b, const Point &c) |
Make from three points on the plane. | |
Plane (const Plane< T > &other) | |
Copy constructor. | |
Plane & | operator= (const Plane &other) |
Assignment operator. | |
~Plane () | |
Trivial destructor. | |
Accesors. | |
const Point & | getPointOn () const |
Return a point on the plane. | |
const Point & | getNormal () const |
Return the normal to the plane. | |
Validity checking. | |
bool | isValid () const |
Return true if the plane is valid. | |
Arithmetic operators. | |
Plane & | operator+= (const Point &p) |
Translate the plane by +p. | |
Plane & | operator-= (const Point &p) |
Translate the plane by -p. | |
Mathematical functions. | |
T | computeSignedDistance (const Point &p) const |
Return the distance from p to the plane. | |
T | computeSignedDistanceAndClosestPoint (const Point &x, Point *closestPoint) const |
Return distance from p to the plane. Set cp to be the closest point. | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T > | |
const Plane< T > & | operator+ (const Plane< T > &x) |
The positive operator. Return the same plane. | |
template<typename T > | |
Plane< T > | operator- (const Plane< T > &x) |
The negative operator. Return the plane with opposite orientation. | |
template<typename T > | |
bool | operator== (const Plane< T > &x, const Plane< T > &y) |
Return true if the planes are equal. | |
template<typename T > | |
bool | operator!= (const Plane< T > &x, const Plane< T > &y) |
Return true if the planes are not equal. | |
template<typename T > | |
std::istream & | operator>> (std::istream &in, Plane< T > &x) |
Read the point and normal. | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &out, const Plane< T > &x) |
Write the point and normal. |
A plane in 3 dimensions.
T | is the number type. By default it is double. |
Return true if the planes are not equal.
The positive operator. Return the same plane.
The negative operator. Return the plane with opposite orientation.
References Plane< T >::getNormal(), and Plane< T >::getPointOn().
std::ostream & operator<< | ( | std::ostream & | out, | |
const Plane< T > & | x | |||
) | [related] |
Write the point and normal.
Return true if the planes are equal.
References Plane< T >::getNormal(), and Plane< T >::getPointOn().
std::istream & operator>> | ( | std::istream & | in, | |
Plane< T > & | x | |||
) | [related] |
Read the point and normal.