User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - Math - Geometry - 2D - Curve2dLineSegmentC
 

  PUBLIC
Curve2dLineSegmentC::Curve2dLineSegmentC(void)
Curve2dLineSegmentC::Curve2dLineSegmentC(const SArray1dC &)
Curve2dLineSegmentC::Curve2dLineSegmentC(const Curve2dLineSegmentC &)
Curve2dLineSegmentC::Curve2dLineSegmentC(const LineABC2dC &,Point2dC,Point2dC)
Curve2dLineSegmentC::Curve2dLineSegmentC(Point2dC,Point2dC)
Curve2dLineSegmentC::FitLSQ(const SArray1dC &)
Curve2dLineSegmentC::Fit(const SArray1dC &)
Curve2dLineSegmentC::Start(void) const
Curve2dLineSegmentC::End(void) const
Curve2dLineSegmentC::Start(void)
Curve2dLineSegmentC::End(void)
Curve2dLineSegmentC::StartPnt(void) const
Curve2dLineSegmentC::EndPnt(void) const
Curve2dLineSegmentC::MidPnt(void) const
Curve2dLineSegmentC::Length(void) const
Curve2dLineSegmentC::WriteGF(ostream &) const
Curve2dLineSegmentC::Compair(Curve2dLineSegmentC &)
Curve2dLineSegmentC::WriteGFHeader(ostream &)
Curve2dLineSegmentC::PointOnLine(RealT)
Curve2dLineC::FitLSQ(const SArray1dC &)
Curve2dLineC::Fit(const SArray1dC &)
Curve2dLineC::AssessFit(const SArray1dC &)
Curve2dLineC::Angle(void)
Curve2dLineC::operator =(const LineABC2dC &)
Curve2dLineC::Tangent(RealT) const
Curve2dLineC::UnitTangent(RealT) const
Curve2dLineC::UnitNormal(void) const
Curve2dLineC::Point(RealT) const
Curve2dLineC::Closest(Point2dC) const
Curve2dLineC::GetLimits(RealT &,RealT &,const IndexRange2dC &) const
Curve2dLineC::GetName(void) const
Curve2dLineC::CodeSize(void) const
Curve2dLineC::WriteGF(ostream &) const
Curve2dLineC::WriteGFHeader(ostream &)
Curve2dLineC::Print(ostream &) const
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

   Curve2dLineSegmentC   
 
Parametric line segement.
 
include "Ravl/Curve2dLineSegment.hh"
Created:26/08/98 
User Level:Normal
Library:RavlMath
In Scope:RavlN

Parent Classes: Variables:
Methods:
Curve2dLineSegmentC()
Default constructor.

Curve2dLineSegmentC(const SArray1dC<Point2dC> & Pnts)
Make a line that best fits the given points.

Curve2dLineSegmentC(const Curve2dLineSegmentC & Oth)
Copy constructor.

Curve2dLineSegmentC(const LineABC2dC & Line,Point2dC Start,Point2dC End)
From a line.

Curve2dLineSegmentC(Point2dC Start,Point2dC End)
From a pair of points.

RealT FitLSQ(const SArray1dC<Point2dC> & Pnts)
Make a line that fits points.

RealT Fit(const SArray1dC<Point2dC> & Pnts)
Default fitting method.

RealT Start() const
Get paramiter for start of line.

RealT End() const
Get paramiter for end of line.

RealT & Start()
Get paramiter for start of line.

RealT & End()
Get paramiter for end of line.

Point2dC StartPnt() const
Get start point of line.

Point2dC EndPnt() const
Get end point of line.

Point2dC MidPnt() const
Mid point of segment.

RealT Length() const
Length of segment.

bool WriteGF(ostream & Out) const
Write GF file.

RealT Compair(Curve2dLineSegmentC & oth)
This is designed to be used to match lines.
It returns the sum of the distances between the closest end points.

static bool WriteGFHeader(ostream & Out)
Write GF file.

Point2dC PointOnLine(RealT offset)
Get a point on the list a distance 'offset' from 'StartPnt.
End is in the positive direction and the distance is in the same units as the co-oridinate system (unlike the Point() method.)

#include "Ravl/Curve2dLine.hh"
RealT FitLSQ(const SArray1dC<Point2dC> & Pnts)
Make a line that fits points.

RealT Fit(const SArray1dC<Point2dC> & Pnts)
Default fitting method.

RealT AssessFit(const SArray1dC<Point2dC> & Pnts)
Measure error for fit.

AngleC Angle()

const Curve2dLineC & operator =(const LineABC2dC & It)
Assign from a plain LineABC.

Vector2dC Tangent(RealT) const
Tangent to curve at p

Vector2dC UnitTangent(RealT) const
Tangent to curve at p

Vector2dC UnitNormal() const
Get the unit normal.

Point2dC Point(RealT p) const
Localion of curve at p

RealT Closest(Point2dC Pnt) const
Parametric value of closest point on curve to Pnt.

void GetLimits(RealT & Low,RealT & High,const IndexRange2dC & Rect) const
Get limits of paramiter if shape is within Rect.

char * GetName() const
Name of primitive.

IntT CodeSize() const
Estimated bits to code primitive.

bool WriteGF(ostream & Out) const
Write GF file.

static bool WriteGFHeader(ostream & Out)
Write GF file.

void Print(ostream & out) const
Print to ostream.

Access to the elements of the object.

#include "Ravl/LineABC2d.hh"
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'.


Maintainer:Charles Galambos, Created: 26/08/98, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002