Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Math - Geometry - 2D - LineABC2dC
 

  PUBLIC
LineABC2dC::LineABC2dC(void)
LineABC2dC::LineABC2dC(RealT,RealT,RealT)
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 &,Point2dC &) const
LineABC2dC::Intersection(const LineABC2dC &) const
LineABC2dC::SqrEuclidDistance(const Point2dC &) const
LineABC2dC::SignedDistance(const Point2dC &) const
LineABC2dC::Distance(const Point2dC &) const
LineABC2dC::Projection(const Point2dC &) const
LineABC2dC::operator >>(istream &,LineABC2dC &)

   LineABC2dC   
 
Line in 2D space - equation Ax+By+C = 0
 
include "Ravl/LineABC2d.hh"
Created:26.06.1994 
Source file:Ravl/Math/Geometry/Euclidean/2D/LineABC2d.hh
User Level:Normal
Library:RavlMath
In Scope:RavlN

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: Variables:
Vector2dC normal;
The normal of the line.

RealT d;
The distance of the line from the origin of the coordinate system multiplied by the size of the normal vector of the line.

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

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

bool Intersection(const LineABC2dC & line,Point2dC & here) const
Find the intersection of two lines.
If the intersection doesn't exist, the function returns false. The intersection is assigned to 'here'.

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 SqrEuclidDistance(const Point2dC & point) const
Returns the squared Euclidian distance of the 'point' from the line.

RealT SignedDistance(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'.

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


Maintainer:Radek Marik, Created: 26.06.1994, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002