Main Page   Modules   Class Hierarchy   Compound List   Compound Members  

GAUGE3D::GLine Class Reference

Represents a line in 3D space. More...

#include <gauge3d/3dmath/line.h>

List of all members.

Public Methods

 GLine ()
 GLine (const GVector &position,const GVector &direction)
bool FindIntersection (GVector *result,const GLine &other)const
 Find intersection between two lines. More...

bool Contains (const GVector &point)const
 test if a point is on the line. More...

GCoordinate FindDistance (const GVector &point)const
 Finds the shortest distance between the line and a point.

GCoordinate FindSquareDistance (const GVector &point)const
 Finds the square of the shortest distance between the line and a point (faster). More...

GCoordinate FindDistance (const GLine &other)const
 Finds the shortest distance between two lines.

GCoordinate FindSquareDistance (const GLine &point)const
 Finds the square of the shortest distance between two lines (faster). More...

const GLine& operator+= (const GVector &other)
 Moves the line.

const GLine& operator-= (const GVector &other)
 Moves the line.


Public Attributes

Coordinates
Plücker coordinates for the line.

GVector u
GVector v


Detailed Description

Represents a line in 3D space.

The line is represented using Plücker coordinates. A line is represented by two vectors U and V. U is the direction of the line, and the cross product of U and any point on the line is equal to V.


Member Function Documentation

bool GAUGE3D::GLine::FindIntersection ( GVector * result,
const GLine & other ) const
 

Find intersection between two lines.

Parameters:
result   Pointer to a vector which should be overwritten with the point of intersection. If NULL, it will not be overwritten.
other   The line with which to test for intersection.
Returns:
True if a point of intersection was found, or false if the lines did not intersect or if they were equal.

bool GAUGE3D::GLine::Contains ( const GVector & point ) const [inline]
 

test if a point is on the line.

Returns:
True if the given point was on the line or false otherwise.

GCoordinate GAUGE3D::GLine::FindSquareDistance ( const GVector & point ) const
 

Finds the square of the shortest distance between the line and a point (faster).

This is faster because no square root needs to be performed.

GCoordinate GAUGE3D::GLine::FindSquareDistance ( const GLine & point ) const
 

Finds the square of the shortest distance between two lines (faster).

This is faster because no square root needs to be performed.


The documentation for this class was generated from the following file:
Generated at Tue Jan 30 17:07:34 2001 for gauge3d by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000