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

  PUBLIC
LinePP3dC::LinePP3dC(void)
LinePP3dC::LinePP3dC(const Point3dC &,const Point3dC &)
LinePP3dC::LinePP3dC(const Point3dC &,const Vector3dC &)
LinePP3dC::FirstPoint(void) const
LinePP3dC::SecondPoint(void) const
LinePP3dC::FirstPoint(void)
LinePP3dC::SecondPoint(void)
LinePP3dC::P1(void) const
LinePP3dC::P2(void) const
LinePP3dC::P1(void)
LinePP3dC::P2(void)
LinePP3dC::operator [](const IndexC) const
LinePP3dC::operator [](const IndexC)
LinePP3dC::Vector(void) const
LinePP3dC::LinePV(void) const
LinePP3dC::Length(void) const
LinePP3dC::Swap(void)
LinePP3dC::Swapped(void) const
LinePP3dC::operator +(const Vector3dC &) const
LinePP3dC::operator +=(const Vector3dC &)
LinePP3dC::Translate(const Vector3dC &)
LinePP3dC::FixStart(const Point3dC &)
LinePP3dC::FixEnd(const Point3dC &)
LinePP3dC::Distance(const LinePP3dC &)
LinePP3dC::Distance(const Point3dC &) const
LinePP3dC::ShortestLine(const LinePP3dC &)
LinePP3dC::Point(const RealT) const
LinePP3dC::Perpendicular(const Point3dC &) const

   LinePP3dC   
 
Line determined by two points in 3D space
 
include "Ravl/LinePP3d.hh"
Created:26/10/1992 
User Level:Normal
Library:RavlMath
In Scope:RavlN

Comments:
The class LinePP3dC represents an oriented line segment in 3 dimensional Euclidian space. Furthermore, it has the same features as any line in Euclidian space. A line is represented by 2 points.

Variables:
Methods:
LinePP3dC()
Creates the non-existing line ([0,0,0]; [0,0,0]);

LinePP3dC(const Point3dC & first,const Point3dC & second)
Creates the line segment connecting the point 'first' with the point 'second'.

LinePP3dC(const Point3dC & a,const Vector3dC & v)
Creates the line segment connecting the point 'a' and the point a+v.

Access to elements of the line segment.

const Point3dC & FirstPoint() const
Returns the start point of the line segment.

const Point3dC & SecondPoint() const
Returns the end point of the line segment.

Point3dC & FirstPoint()
Returns the start point of the line segment.

Point3dC & SecondPoint()
Returns the end point of the line segment.

const Point3dC & P1() const
Returns the start point of the line segment.
It is equivalent to the function FirstPoint().

const Point3dC & P2() const
It is equivalent to the function SecondPoint().

Point3dC & P1()
Returns the start point of the line segment.
It is equivalent to the function FirstPoint().

Point3dC & P2()
Returns the start point of the line segment.
It is equivalent to the function SecondPoint().

const Point3dC & operator [](const IndexC i) const
Returns the ith point.

Point3dC & operator [](const IndexC i)
Returns the ith point.

Vector3dC Vector() const
Returns the line segment as a free vector.

Line3dPVC LinePV() const
Returns the line represented by the start point and the vector.
The start point is equal to the start point of this line segment. The vector of the returned line is determined by the start point and the end point of this line segment.

RealT Length() const
Returns the Euclidian distance of the start and end points.

void Swap()
Swaps the end points of this

LinePP3dC Swapped() const
Returns a line with swapped endpoints
Geometrical computations. -------------------------

LinePP3dC operator +(const Vector3dC & v) const
Returns the line segment translated into the new position.

LinePP3dC & operator +=(const Vector3dC & v)
Moves the line segment into the new position.
The operator is equivalent to the member function Translate().

LinePP3dC & Translate(const Vector3dC & v)
Moves the line segment into the new position.
The member function is equivalent to the operator+=.

LinePP3dC & FixStart(const Point3dC & p)
Translates the line segment to start in the point 'p'.

LinePP3dC & FixEnd(const Point3dC & p)
Translates the line segment to end in the point 'p'.

RealT Distance(const LinePP3dC & line)
Returns the distance of the lines represented by this line segment and the segment 'line'.

RealT Distance(const Point3dC & p) const
Returns the distance between the point 'p' and the line represented by this line segment.

LinePP3dC ShortestLine(const LinePP3dC & line)
Returns the shortest line connecting this to 'line'.
The returned line has the first point on this line and the second point on the 'line'.

Point3dC Point(const RealT t) const
Returns the point of the line: FirstPoint() + t * Vector().

Vector3dC Perpendicular(const Point3dC & p) const
Returns the vector that is perpendicular to the plane containing the line segment and the point 'p'.
The direction of the return vector is determined by the cross product (P2-P1) % (p-P1) which is equivalent to (P1-p) % (P2-p).


Maintainer:Radek Marik, Created: 26/10/1992, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002