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

  PUBLIC
LineABC2dC::LineABC2dC(void)
LineABC2dC::LineABC2dC(RealT,RealT,RealT)
LineABC2dC::LineABC2dC(const LineABC2dC &)
LineABC2dC::LineABC2dC(const Point2dC &,const Point2dC &)
LineABC2dC::LineABC2dC(const Vector2dC &,const Point2dC &)
LineABC2dC::LineABC2dC(const Point2dC &,const Vector2dC &)
LineABC2dC::Normal(void) const
LineABC2dC::UnitNormal(void) const
LineABC2dC::Rho(void) const
LineABC2dC::A(void) const
LineABC2dC::B(void) const
LineABC2dC::C(void) const
LineABC2dC::ValueX(const RealT) const
LineABC2dC::ValueY(const RealT) const
LineABC2dC::Residuum(const Point2dC &) const
LineABC2dC::MakeUnitNormal(void)
LineABC2dC::AreParallel(const LineABC2dC &) const
LineABC2dC::Intersection(const LineABC2dC &) const
LineABC2dC::SqrEDistance(const Point2dC &) const
LineABC2dC::SDistance(const Point2dC &) const
LineABC2dC::Distance(const Point2dC &) const
LineABC2dC::Projection(const Point2dC &) const
LineABC2dC
 
Line in 2D space - equation Ax+By+C = 0
 
include "amma/Line2ABC.hh"
User Level:Default
Library:Mag2
Example:ex_kutta.cc
Section:Geometry.2-D
In Scope:std

Comments:
The class LineABC2dC represents a line embedded in the 2D plane. The line is represented by the equation aa*x+bb*y+cc = 0.

Derived Classes: Typedefs:
typedef StdTypeC::RealT RealT;
A general real parameter.

Variables:
Methods:
LineABC2dC()
Creates the non-existing line (0,0,0).

LineABC2dC(RealT aa,RealT bb,RealT cc)
Creates he line determined by the equation aa*x+bb*y+cc = 0.

LineABC2dC(const LineABC2dC & line)
Copy constructor.

LineABC2dC(const Point2dC & a,const Point2dC & b)
Creates the line passing through two points 'a' and 'b'.

LineABC2dC(const Vector2dC & n,const Point2dC & p)
Creates the line passing through 'p' with the normal 'n'.

LineABC2dC(const Point2dC & p,const Vector2dC & v)
Creates the line passing through 'p' with the direction 'v'
Access to the elements of the object. -------------------------------------

Vector2dC Normal() const
Returns the normal of the line.

Vector2dC UnitNormal() const
Returns the normal of the line normalized to have unit size.

RealT Rho() const
Returns the distance of the line from the origin of the coordinate system.

RealT A() const
Returns parameter a.

RealT B() const
Returns parameter b.

RealT C() const
Returns parameter c.

RealT ValueX(const RealT y) const
Returns the value of x coordinate if the y coordinate is known.
If the parameter A() is zero, the zero is returned.

RealT ValueY(const RealT x) const
Returns the value of y coordinate if the x coordinate is known.
If the parameter B() is zero, the zero is returned. Geometrical constructions. --------------------------

RealT Residuum(const Point2dC & p) const
Returns the value of the function A()*p.X()+B()*p.Y()+C() often used in geometrical computations.

LineABC2dC & MakeUnitNormal()
Normalizes the equation so that the normal vector is unit.

BooleanT AreParallel(const LineABC2dC & line) const
Returns TRUE if the lines are parallel.

Point2dC Intersection(const LineABC2dC & line) const
Returns the intersection of both lines.
If the intersection doesn't exist, the function returns Point2dC(0,0).

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 direction of the normal.

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'.


Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001