Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

mlib::PIXELline Class Reference
["PIXEL" Coordinate System]

A line in pixel coordinates. More...

#include <points.H>

Inheritance diagram for mlib::PIXELline:

Inheritance graph
[legend]
Collaboration diagram for mlib::PIXELline:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Line ()
 Default constructor. Creates a line with the results of the default constructors for the point and vector classes used.
 Line (const PIXEL &p, const VEXEL &v)
 Constructor that creates a line containing the point p and moving along the direction of vector v. Alternately creates a line segment with p as one endpoint and ( p + v ) as the other endpoint.
 Line (const PIXEL &p1, const PIXEL &p2)
 Constructor that creates the line going through points p1 and p2. Alternately creates a line segment with endpoints p1 and p2.
const PIXELpoint () const
PIXELpoint ()
const VEXELvector () const
VEXELvector ()
bool is_valid () const
 Is the line valid (i.e. has a vector with non-zero length).
PIXEL endpt () const
 Returns the second endpoint of the line when treated as a line segment.
PIXEL midpt () const
 Returns the midpoint of the line when treated as a line segment.
double length () const
 Returns the length of the line when treated as a line segment.
bool operator== (const Line< PIXELline, PIXEL, VEXEL > &l) const
 Are the two line's points and vectors exactly equal?
double dist (const PIXEL &p) const
 Returns the distance from the point to the line.
PIXEL project (const PIXEL &p) const
 Returns closest point on line to given point p.
PIXEL project_to_seg (const PIXEL &p) const
 Finds the nearest point on this line segment to the given point.
PIXEL project_to_seg (const PIXELline &l) const
 Finds the nearest point on this line segment to the given line.
PIXEL reflection (const PIXEL &p) const
PIXEL intersect (const PIXELline &l) const
 Returns the closest point on this line to the given line l.
bool intersect_segs (const PIXELline &l, PIXEL &inter) const
 Returns true if this line, treated as a segment, intersects the given line, also treated as a segment.
bool intersect_segs (const PIXELline &l) const
 Same as Line<L,P,V>::intersect_segLine(const L& l, P& inter) except without the argument to return the intersection point.
bool intersect_seg_line (const PIXELline &l, PIXEL &inter) const
 Returns true if this line, treated as a segment, intersects the given line, also treated as a line.
Constructors
 PIXELline ()
 PIXELline (CPIXEL &p, CVEXEL &v)
 PIXELline (CPIXEL &p1, CPIXEL &p2)

Protected Attributes

PIXEL _point
VEXEL _vector

Detailed Description

A line in pixel coordinates.

Definition at line 1158 of file points.H.


Constructor & Destructor Documentation

mlib::PIXELline::PIXELline  )  [inline]
 

Definition at line 1165 of file points.H.

mlib::PIXELline::PIXELline CPIXEL p,
CVEXEL v
[inline]
 

Definition at line 1166 of file points.H.

mlib::PIXELline::PIXELline CPIXEL p1,
CPIXEL p2
[inline]
 

Definition at line 1167 of file points.H.


Member Function Documentation

double mlib::Line< PIXELline , PIXEL , VEXEL >::dist const PIXEL p  )  const [inline, inherited]
 

Returns the distance from the point to the line.

If vector is null (line is not valid) returns distance to _point.

Definition at line 104 of file line.H.

PIXEL mlib::Line< PIXELline , PIXEL , VEXEL >::endpt  )  const [inline, inherited]
 

Returns the second endpoint of the line when treated as a line segment.

Definition at line 77 of file line.H.

PIXEL mlib::Line< PIXELline , PIXEL , VEXEL >::intersect const PIXELline l  )  const [inline, inherited]
 

Returns the closest point on this line to the given line l.

For 3D lines it's rare that the 2 lines actually intersect, so this is not really named well.

Definition at line 162 of file line.H.

bool mlib::Line< PIXELline , PIXEL , VEXEL >::intersect_seg_line const PIXELline l,
PIXEL inter
const [inline, inherited]
 

Returns true if this line, treated as a segment, intersects the given line, also treated as a line.

On success, also fills in the intersection point.

Definition at line 210 of file line.H.

bool mlib::Line< PIXELline , PIXEL , VEXEL >::intersect_segs const PIXELline l  )  const [inline, inherited]
 

Same as Line<L,P,V>::intersect_segLine(const L& l, P& inter) except without the argument to return the intersection point.

Definition at line 229 of file line.H.

bool mlib::Line< PIXELline , PIXEL , VEXEL >::intersect_segs const PIXELline l,
PIXEL inter
const [inline, inherited]
 

Returns true if this line, treated as a segment, intersects the given line, also treated as a segment.

On success, also fills in the intersection point.

Definition at line 187 of file line.H.

bool mlib::Line< PIXELline , PIXEL , VEXEL >::is_valid  )  const [inline, inherited]
 

Is the line valid (i.e. has a vector with non-zero length).

Definition at line 73 of file line.H.

double mlib::Line< PIXELline , PIXEL , VEXEL >::length  )  const [inline, inherited]
 

Returns the length of the line when treated as a line segment.

Definition at line 84 of file line.H.

mlib::Line< PIXELline , PIXEL , VEXEL >::Line const PIXEL p1,
const PIXEL p2
[inline, inherited]
 

Constructor that creates the line going through points p1 and p2. Alternately creates a line segment with endpoints p1 and p2.

Definition at line 55 of file line.H.

mlib::Line< PIXELline , PIXEL , VEXEL >::Line const PIXEL p,
const VEXEL v
[inline, inherited]
 

Constructor that creates a line containing the point p and moving along the direction of vector v. Alternately creates a line segment with p as one endpoint and ( p + v ) as the other endpoint.

Definition at line 50 of file line.H.

mlib::Line< PIXELline , PIXEL , VEXEL >::Line  )  [inline, inherited]
 

Default constructor. Creates a line with the results of the default constructors for the point and vector classes used.

This most likely creates an invalid line (i.e. has a zero length vector) at the origin.

Definition at line 44 of file line.H.

PIXEL mlib::Line< PIXELline , PIXEL , VEXEL >::midpt  )  const [inline, inherited]
 

Returns the midpoint of the line when treated as a line segment.

Definition at line 81 of file line.H.

bool mlib::Line< PIXELline , PIXEL , VEXEL >::operator== const Line< PIXELline , PIXEL , VEXEL > &  l  )  const [inline, inherited]
 

Are the two line's points and vectors exactly equal?

Definition at line 92 of file line.H.

PIXEL & mlib::Line< PIXELline , PIXEL , VEXEL >::point  )  [inline, inherited]
 

Definition at line 63 of file line.H.

const PIXEL & mlib::Line< PIXELline , PIXEL , VEXEL >::point  )  const [inline, inherited]
 

Definition at line 62 of file line.H.

PIXEL mlib::Line< PIXELline , PIXEL , VEXEL >::project const PIXEL p  )  const [inline, inherited]
 

Returns closest point on line to given point p.

If vector is null (line is not valid) returns _point.

Definition at line 116 of file line.H.

PIXEL mlib::Line< PIXELline , PIXEL , VEXEL >::project_to_seg const PIXELline l  )  const [inline, inherited]
 

Finds the nearest point on this line segment to the given line.

If this line is invalid, returns first endpoint.

Definition at line 134 of file line.H.

PIXEL mlib::Line< PIXELline , PIXEL , VEXEL >::project_to_seg const PIXEL p  )  const [inline, inherited]
 

Finds the nearest point on this line segment to the given point.

If this line is invalid, returns first endpoint.

Definition at line 124 of file line.H.

PIXEL mlib::Line< PIXELline , PIXEL , VEXEL >::reflection const PIXEL p  )  const [inline, inherited]
 

Definition at line 144 of file line.H.

VEXEL & mlib::Line< PIXELline , PIXEL , VEXEL >::vector  )  [inline, inherited]
 

Definition at line 65 of file line.H.

const VEXEL & mlib::Line< PIXELline , PIXEL , VEXEL >::vector  )  const [inline, inherited]
 

Definition at line 64 of file line.H.


Member Data Documentation

PIXEL mlib::Line< PIXELline , PIXEL , VEXEL >::_point [protected, inherited]
 

Definition at line 238 of file line.H.

VEXEL mlib::Line< PIXELline , PIXEL , VEXEL >::_vector [protected, inherited]
 

Definition at line 239 of file line.H.


The documentation for this class was generated from the following file:
Generated on Mon Sep 18 11:48:22 2006 for jot by  doxygen 1.4.4