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

rdLine Class Reference

A class for representing a straight line. More...

#include <rdLine.h>

Inheritance diagram for rdLine:

rdObject List of all members.

Public Member Functions

 rdLine (double aP0X, double aP0Y, double aP0Z, double aP2X, double aP2Y, double aP2Z)
 Construct a line from two points (P and P2).

 rdLine (double aPX, double aPY, double aPZ, const double aDirection[3])
 Construct a line from a point and a direction.

virtual ~rdLine ()
 Destructor.

void setPoint (double aPX, double aPY, double aPZ)
 Set the point that the line passes through.

void getPoint (double rPoint[3]) const
 Get the point that the line passes through.

void setDirection (const double aDirection[3])
 Set the direction of the line.

void getDirection (double rDirection[3]) const
 Get the direction of the line.

void evaluate (double aDistance, double rLineValue[3]) const
 Evaluate the line at a specified distance away from the specified point of the line:.


Private Member Functions

void setNull ()
 Set NULL values for all member variables.


Private Attributes

double _point [3]
 Point through which the line passes.

double _direction [3]
 Unit vector specifying the direction of the line.


Detailed Description

A class for representing a straight line.


Constructor & Destructor Documentation

rdLine::rdLine double  aP0X,
double  aP0Y,
double  aP0Z,
double  aP2X,
double  aP2Y,
double  aP2Z
 

Construct a line from two points (P and P2).

Point P is kept as the point through which the line passes, and P2 is used to compute the direction of the line. The direction of the line points from P to P2.

Parameters:
aPX X component of a point through which the line passes.
aPY Y component of a point through which the line passes.
aPZ Z component of a point through which the line passes.
aP2X X component of a second point through which the line passes.
aP2Y Y component of a second point through which the line passes.
aP2Z Z component of a second point through which the line passes.
aDirection Direction of the line specified as a unit vector.

rdLine::rdLine double  aPX,
double  aPY,
double  aPZ,
const double  aDirection[3]
 

Construct a line from a point and a direction.

Parameters:
aPX X component of a point through which the line passes.
aPY Y component of a point through which the line passes.
aPZ Z component of a point through which the line passes.
aDirection Direction of the line specified as a unit vector.


Member Function Documentation

void rdLine::evaluate double  aDistance,
double  rLineValue[3]
const
 

Evaluate the line at a specified distance away from the specified point of the line:.

value = point + distance * direction

Parameters:
aDistance Distance away from the specified point of this line (see setPoint()). aDistance may be positive or negative.
aValue Point value of the line at distance aDistance.

void rdLine::getDirection double  rDirection[3]  )  const
 

Get the direction of the line.

Parameters:
aDirection Direction of the line.

void rdLine::getPoint double  rPoint[3]  )  const
 

Get the point that the line passes through.

Parameters:
rPoint Point that the line passes through.

void rdLine::setDirection const double  aDirection[3]  ) 
 

Set the direction of the line.

Parameters:
aDirection Direction of the line.

void rdLine::setPoint double  aPX,
double  aPY,
double  aPZ
 

Set the point that the line passes through.

Parameters:
aPX X component of a point through which the line passes.
aPY Y component of a point through which the line passes.
aPZ Z component of a point through which the line passes.


The documentation for this class was generated from the following files:
Generated on Wed Aug 20 02:17:11 2003 for Simulation Software by doxygen1.3