vtf-logo

geom::Segment< N, T > Class Template Reference

A segment in N dimensional space. More...

#include <Segment.h>

Inheritance diagram for geom::Segment< N, T >:

geom::SegmentMath< N, T > List of all members.

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.

Detailed Description

template<int N, typename T = double>
class geom::Segment< N, T >

A segment in N dimensional space.

Parameters:
N is the dimension.
T is the number type. By default it is double.
A segment is an ordered double of points.


The documentation for this class was generated from the following file:
Generated on Fri Aug 24 12:56:00 2007 for Computational Geometry Package by  doxygen 1.4.7