|
User Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
The class Line3dPPC 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.
Typedefs:
- typedef StdTypeC::RealT DistanceT;
-
Euclidian distance of objects.
Variables:
Methods:
- Line3dPPC()
-
Creates the non-existing line ([0,0,0]; [0,0,0]);
- Line3dPPC(const Point3dC & first,const Point3dC & second)
-
Creates the line segment connecting the point 'first' with the
point 'second'.
- Line3dPPC(const Point3dC & a,const Vector3dC & v)
-
Creates the line segment connecting the point 'a' and the point
a+v.
- Line3dPPC(const Line3dPPC & line)
-
Copy constructor.
- const Line3dPPC & operator=(const Line3dPPC & l)
-
Assigment.
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
-
Returns the start point of the line segment. 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 IndexT i) const
-
Returns the ith point.
- Point3dC & operator[](const IndexT 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.
- Line3dPPC & SetP1(const Point3dC & p)
-
Changes the start point of the line segment to be the point 'p'.
- Line3dPPC & SetP2(const Point3dC & p)
-
Changes the end point of the line segment to be the point 'p'.
- DistanceT Length() const
-
Returns the Euclidian distance of the start and end points.
- void Swap()
-
Swaps the end points of this
- Line3dPPC const Swapped()
-
Returns a line with swapped endpoints
Geometrical computations.
-------------------------
- Line3dPPC operator+(const Vector3dC & v) const
-
Returns the line segment translated into the new position.
- Line3dPPC & operator+=(const Vector3dC & v)
-
Moves the line segment into the new position.
The operator is equivalent to the member function Translate().
- Line3dPPC & Translate(const Vector3dC & v)
-
Moves the line segment into the new position.
The member function is equivalent to the operator+=.
- Line3dPPC & FixStart(const Point3dC & p)
-
Translates the line segment to start in the point 'p'.
- Line3dPPC & FixEnd(const Point3dC & p)
-
Translates the line segment to end in the point 'p'.
- DistanceT Distance(const Line3dPPC & line)
-
Returns the distance of the lines represented by this line segment
and the segment 'line'.
- DistanceT Distance(const Point3dC & p) const
-
Returns the distance between the point 'p' and the line represented
by this line segment.
- Line3dPPC ShortestLine(const Line3dPPC & line)
-
Returns the shortest line segment connecting the lines
represented by this line segment and the segment '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).
|
Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001
|