Developer Documentation
Centre for Vision, Speech & Signal Processing
USER IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
Line2dPPC::Line2dPPC(void)
Line2dPPC::Line2dPPC(const Point2dC &,const Point2dC &)
Line2dPPC::Line2dPPC(const Point2dC &,const Vector2dC &)
Line2dPPC::Line2dPPC(const Line2dPPC &)
Line2dPPC::FirstPoint(void) const
Line2dPPC::SecondPoint(void) const
Line2dPPC::FirstPoint(void)
Line2dPPC::SecondPoint(void)
Line2dPPC::operator[](const IndexT) const
Line2dPPC::operator[](const IndexT)
Line2dPPC::Vector(void) const
Line2dPPC::Normal(void) const
Line2dPPC::GetX(RealT) const
Line2dPPC::GetY(RealT) const
Line2dPPC::PointT(RealT) const
Line2dPPC::Swap(void)
Line2dPPC::Swapped(void) const
Line2dPPC::operator*(const RealT &) const
Line2dPPC::Length(void) const
Line2dPPC::ParIntersection(const Line2dPPC &) const
Line2dPPC::HasInnerIntersection(const Line2dPPC &) const
Line2dPPC::Intersection(const Line2dPPC &) const
Line2dPPC::SqrEDistance(const Point2dC &) const
Line2dPPC::SDistance(const Point2dC &) const
Line2dPPC::Distance(const Point2dC &) const
Line2dPPC::Projection(const Point2dC &) const
Line2dPPC::operator>>(istream &,Line2dPPC &)
Line2dPPC
 
Line in 2D space - represented by 2 points
 
include "amma/Line2dPP.hh"
User Level:Default
Library:Mag2
Example:ex_kutta.cc
Section:Geometry.2-D
In Scope:std

Comments:
The class Line2dPPC represents a oriented line segment in 2d Euclidian space. The line segment is determined by two distinct points. The line segment has got all properties of the line passing through the end points.

Derived Classes: Variables:
Point2dC pointA;
The start point.

Point2dC pointB;
The end point.

Methods:
Line2dPPC()
Creates a default non-existing line. It must be used only for initialization of arrays.

Line2dPPC(const Point2dC & a,const Point2dC & b)
The line which is determined by the start point 'a' and the end point 'b'.

Line2dPPC(const Point2dC & a,const Vector2dC & v)
The line, which is determined by the start point 'a' and the vector 'v'.

Line2dPPC(const Line2dPPC & line)
Copy constructor. Access to the elements of the object. -------------------------------------

const Point2dC & FirstPoint() const
Returns the start point.

const Point2dC & SecondPoint() const
Returns the end point.

Point2dC & FirstPoint()
Returns the start point.

Point2dC & SecondPoint()
Returns the end point.

const Point2dC & operator[](const IndexT i) const
Returns the ith point.

Point2dC & operator[](const IndexT i)
Returns the ith point.

Vector2dC Vector() const
Returns the vector from the start point to the end point.

Vector2dC Normal() const
Returns the vector perpendicular to the direction of this line. The normal vector is counter-clockwise rotated about PI/2 according to the direction of the line.

RealT GetX(RealT y) const
Returns the x coordinate of the point on the line if the y coordinate is known.

RealT GetY(RealT x) const
Returns the y coordinate of the point on the line if the x coordinate is known.

Point2dC PointT(RealT t) const
Returns the point of the line which is determined as A+(B-A) * t, where A is the start point of the line and B is the end point of the line.

void Swap()
Swaps the end points of this

Line2dPPC Swapped() const
Returns a line with swapped endpoints

Line2dPPC operator*(const RealT & x) const
Returns line whose endpoint coordinates are scaled by x

RealT Length() const
Returns the length of the line (i.e. Euclidean distance between endpoints) Geometrical constructions. --------------------------

RealT ParIntersection(const Line2dPPC & l) const
Returns the parameter of the intersection according to this line. If the parameter is equal to 0, the intersection is the starting point of this line, if the parameter is 1, the intersection is the end point. If the parameter is between 0 and 1 the intersection is inside of this line segment.

BooleanT HasInnerIntersection(const Line2dPPC & l) const
Returns TRUE if the intersection of this line segment and the line 'l' is either inside of this line segment or one of the end points.

Point2dC Intersection(const Line2dPPC & line) const
Returns the intersection of 2 lines.

RealT SqrEDistance(const Point2dC & point) const
Returns the squared Euclidian distance of the 'point' from the line.

RealT SDistance(const Point2dC & point) const
Returns the signed distance of the 'point' from the line. The return value is greater than 0 if the point is on the left side of the line. The left side of the line is determined by the vector of the line.

RealT Distance(const Point2dC & point) const
Returns the distance of the 'point' from the line.

Point2dC Projection(const Point2dC & point) const
Returns the point which is the orthogonal projection of the 'point' to the line. It is the same as intersection of this line with the perpendicular line passing through the 'point'.

istream & operator>>(istream & inS,Line2dPPC & line)


Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001