A class for a triangle in N dimensions. More...
#include <Triangle.h>
Public Types | |
typedef ads::FixedArray< N, T > | Point |
The representation for a point. | |
Public Member Functions | |
Constructors etc. | |
Triangle () | |
Default constructor. Uninitialized memory. | |
Triangle (const Point &a, const Point &b, const Point &c) | |
Construct from three points. | |
Triangle (const Triangle &other) | |
Copy constructor. | |
const Triangle & | operator= (const Triangle &other) |
Assignment operator. | |
~Triangle () | |
Trivial destructor. | |
Accesors. | |
const Point & | getVertex (const int n) const |
Get the specified vertex. | |
Manipulators. | |
void | setVertex (const int n, const Point &x) const |
Set the specified vertex. | |
Translations. | |
Triangle & | operator+= (const Point &p) |
Translate the triangle by +p. | |
Triangle & | operator-= (const Point &p) |
Translate the triangle by -p. | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T > | |
Plane< T > | buildSupportingPlane (const Triangle< 3, T > &triangle) |
Return the supporting plane of a triangle in 3 dimensions. | |
template<int N, typename T > | |
std::istream & | operator>> (std::istream &in, Triangle< N, T > &t) |
Read the three vertices. | |
template<int N, typename T > | |
std::ostream & | operator<< (std::ostream &out, const Triangle< N, T > &t) |
Write the three vertices. |
A class for a triangle in N dimensions.
N | is the dimension. | |
T | is the number type. By default it is double. |
Plane< T > buildSupportingPlane | ( | const Triangle< 3, T > & | triangle | ) | [related] |
Return the supporting plane of a triangle in 3 dimensions.
std::ostream & operator<< | ( | std::ostream & | out, | |
const Triangle< N, T > & | t | |||
) | [related] |
Write the three vertices.
std::istream & operator>> | ( | std::istream & | in, | |
Triangle< N, T > & | t | |||
) | [related] |
Read the three vertices.