Plane< T > Class Template Reference

A plane in 3 dimensions. More...

#include <Plane.h>

List of all members.

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.
Planeoperator= (const Plane &other)
 Assignment operator.
 ~Plane ()
 Trivial destructor.
Accesors.

const PointgetPointOn () const
 Return a point on the plane.
const PointgetNormal () const
 Return the normal to the plane.
Validity checking.

bool isValid () const
 Return true if the plane is valid.
Arithmetic operators.

Planeoperator+= (const Point &p)
 Translate the plane by +p.
Planeoperator-= (const Point &p)
 Translate the plane by -p.
Mathematical functions.

computeSignedDistance (const Point &p) const
 Return the distance from p to the plane.
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.

Detailed Description

template<typename T = double>
class Plane< T >

A plane in 3 dimensions.

Parameters:
T is the number type. By default it is double.

Friends And Related Function Documentation

template<typename T >
bool operator!= ( const Plane< T > &  x,
const Plane< T > &  y 
) [related]

Return true if the planes are not equal.

template<typename T >
const Plane< T > & operator+ ( const Plane< T > &  x  )  [related]

The positive operator. Return the same plane.

template<typename T >
Plane< T > operator- ( const Plane< T > &  x  )  [related]

The negative operator. Return the plane with opposite orientation.

References Plane< T >::getNormal(), and Plane< T >::getPointOn().

template<typename T >
std::ostream & operator<< ( std::ostream &  out,
const Plane< T > &  x 
) [related]

Write the point and normal.

template<typename T >
bool operator== ( const Plane< T > &  x,
const Plane< T > &  y 
) [related]

Return true if the planes are equal.

References Plane< T >::getNormal(), and Plane< T >::getPointOn().

template<typename T >
std::istream & operator>> ( std::istream &  in,
Plane< T > &  x 
) [related]

Read the point and normal.


The documentation for this class was generated from the following file:
Generated on Thu Jun 30 02:14:58 2016 for Computational Geometry Package by  doxygen 1.6.3