#include <Segment.h>
Inheritance diagram for geom::Segment< N, T >:

Public Types | |
| typedef T | Number |
| The number type. | |
|
typedef ads::FixedArray< N, T > | Point |
| The representation of a point. | |
Public Member Functions | |
Constructors etc. | |
| Segment () | |
| Default constructor. Uninitialized memory. | |
| Segment (const Point &source, const Point &target) | |
| Construct from two points. | |
| Segment (const Segment &other) | |
| Copy constructor. | |
| Segment & | operator= (const Segment &other) |
| Assignment operator. | |
| ~Segment () | |
| Trivial destructor. | |
| void | make (const Point &source, const Point &target) |
| Make from two points. | |
Accesors. | |
| const Point & | getSource () const |
| Return the first point of the line segment. | |
| const Point & | getTarget () const |
| Return the second point of the line segment. | |
Translations. | |
| Segment & | operator+= (const Point &p) |
| Translate by p. | |
| Segment & | operator-= (const Point &p) |
| Translate by -p. | |
Related Functions | |
| (Note that these are not member functions.) | |
| bool | operator== (const Segment< N, T > &x, const Segment< N, T > &y) |
| Return true if the segments are equal. | |
| bool | operator!= (const Segment< N, T > &x, const Segment< N, T > &y) |
| Return true if the segments are not equal. | |
| const Segment< N, T > & | operator+ (const Segment< N, T > &x) |
| Return the segment. | |
| Segment< N, T > | operator- (const Segment< N, T > &x) |
| Return a segment with the opposite orientation. | |
| Segment< N, T > | operator+ (const Segment< N, T > &s, const typename Segment< N, T >::Point &p) |
| Return a segment translated by p. | |
| Segment< N, T > | operator- (const Segment< N, T > &s, const typename Segment< N, T >::Point &p) |
| Return a segment translated by -p. | |
| std::istream & | operator>> (std::istream &in, Segment< N, T > &x) |
| Read a segment. | |
| std::ostream & | operator<< (std::ostream &out, const Segment< N, T > &x) |
| Write the segment. | |
| N | is the dimension. | |
| T | is the number type. By default it is double. |
1.4.7