vtf-logo

geom::Line_2< T > Class Template Reference

A line in 2-D. More...

#include <Line_2.h>

List of all members.

Public Types

typedef T Number
 The number type.
typedef SegmentMath< 2, T > Segment
 The segment upon which this line is built.
typedef Segment::Point Point
 The point type.

Public Member Functions

Constructors etc.
 Line_2 ()
 Default constructor. Uninitialized memory.
 Line_2 (const Point &source, const Point &target)
 Construct from points.
void make (const Point &source, const Point &target)
 Make from points.
 Line_2 (const Segment &segment)
 Construct from a segment.
 Line_2 (const geom::Segment< 2, Number > &segment)
 Construct from a Segment<2,Number>.
 Line_2 (const Line_2 &other)
 Copy constructor.
Line_2 & operator= (const Line_2 &other)
 Assignment operator.
 ~Line_2 ()
 Trivial destructor.
Accesors.
const Point & getPointOn () const
 Return a point on the line.
const Point & getTangent () const
 Return the tangent to the line.
const Point & getNormal () const
 Return the normal to the line.
const Segment & getSegment () const
 Return the segment on which the line is built.
Mathematical operations.
Line_2 & operator+= (const Point &p)
 Translate the line by p.
Line_2 & operator-= (const Point &p)
 Translate the line by -p.
Number computeSignedDistance (const Point &p) const
 Distance to the line.
Number computeSignedDistanceAndClosestPoint (const Point &p, Point *cp) const
 Distance and closest point to the line.
void computeIntersection (Point p1, Point p2, Point *intersectionPoint) const
 Compute the point where the line through p1 and p2 intersects this line.

Related Functions

(Note that these are not member functions.)

const Line_2< T > & operator+ (const Line_2< T > &x)
 Unary positive operator.
Line_2< T > operator- (const Line_2< T > &x)
 Unary negative operator.
std::istream & operator>> (std::istream &in, Line_2< T > &x)
 Read a line.
std::ostream & operator<< (std::ostream &out, const Line_2< T > &x)
 Write a line.
bool operator== (const Line_2< T > &a, const Line_2< T > &b)
 Return true if the lines are equal.
bool operator!= (const Line_2< T > &a, const Line_2< T > &b)
 Return true if the lines are not equal.


Detailed Description

template<typename T = double>
class geom::Line_2< T >

A line in 2-D.

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


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