Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

IMG_Line Class Reference

A line from a start to an end point. More...

#include <IMG_Line.h>

List of all members.

Public Methods

 IMG_Line (TInt32 xs=0,TInt32 ys=0,TInt32 xe=0,TInt32 ye=0)
 Constructs a line with the given values. More...

 IMG_Line (const IMG_Line &l)
 Copy constructor. More...

virtual ~IMG_Line ()
 Destructor.

virtual float getLength ()const
 Access to line length. More...

virtual void set (TInt32 xs,TInt32 ys,TInt32 xe,TInt32 ye)
 Sets all members of the line. More...

virtual bool isEmpty ()const
 Returns whether this line is empty. More...

virtual void getPoint (float t,TInt32 &x,TInt32 &y)const
 Returns point at given value for line parameter. More...


Public Attributes

TInt32 m_xs
 Start point x-coordinate.

TInt32 m_ys
 Start point y-coordinate.

TInt32 m_xe
 End point x-coordinate.

TInt32 m_ye
 End point y-coordinate.


Detailed Description

A line from a start to an end point.

Used for drawing lines in images.

Author(s):
Maarten Gribnau
Date:
March 6, 2001


Constructor & Destructor Documentation

IMG_Line::IMG_Line ( TInt32 xs = 0,
TInt32 ys = 0,
TInt32 xe = 0,
TInt32 ye = 0 ) [inline]
 

Constructs a line with the given values.

Parameters:
xs   start point x-coordinate
ys   start point y-coordinate
xe   end point x-coordinate
ye   end point y-coordinate

IMG_Line::IMG_Line ( const IMG_Line & l ) [inline]
 

Copy constructor.

Parameters:
l   line to copy


Member Function Documentation

float IMG_Line::getLength ( ) const [inline, virtual]
 

Access to line length.

Returns:
length of the line.

void IMG_Line::getPoint ( float t,
TInt32 & x,
TInt32 & y ) const [inline, virtual]
 

Returns point at given value for line parameter.

Calculates the coordinates of a point on the line.

Parameters:
t   line parameter value (0<=t<=1) of the point requested.
x   x-coordinate of the point.
y   y-coordinate of the point.

bool IMG_Line::isEmpty ( ) const [inline, virtual]
 

Returns whether this line is empty.

Empty line are lines that have length==0.

Returns:
boolean value (true==empty line)

void IMG_Line::set ( TInt32 xs,
TInt32 ys,
TInt32 xe,
TInt32 ye ) [inline, virtual]
 

Sets all members of the line.

Parameters:
xs   start point x-coordinate
ys   start point y-coordinate
xe   end point x-coordinate
ye   end point y-coordinate


The documentation for this class was generated from the following file:
Generated at Thu May 3 17:29:38 2001 for ImgLib by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000