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

gfx::Line3 Class Reference

Collaboration diagram for gfx::Line3:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Line3 ()
 Line3 (const Point3 &origin, const Vector3 &direction)
 Line3 (const Segment3 &seg)
 Line3 (const Line3 &l)
 ~Line3 ()
Line3operator= (const Line3 &l)
bool operator== (const Line3 &l) const
bool operator!= (const Line3 &l) const
bool equals (const Line3 &l, Real epsilon=consts::epsilon) const
Real distanceTo (const Point3 &p) const
 shortest distance between line and p

Real distanceTo (const Line3 &l2) const
 shortest distance between line and line l2

Point3 pointClosestTo (const Point3 &p) const
 find point on the line that is closest to p

bool contains (const Point3 &p) const
 is point p on the line?

Segment3 shortestSegmentBetween (const Line3 &l2) const
 return shortest segment between this line and line l2


Public Attributes

Point3 o
 origin

Vector3 d
 direction


Constructor & Destructor Documentation

gfx::Line3::Line3  )  [inline]
 

Definition at line 43 of file Line3.

gfx::Line3::Line3 const Point3 origin,
const Vector3 direction
[inline]
 

Definition at line 44 of file Line3.

References base::Vector3::normalize(), and base::Point3.

gfx::Line3::Line3 const Segment3 seg  )  [inline]
 

Definition at line 46 of file Line3.

References base::Vector3::normalize().

gfx::Line3::Line3 const Line3 l  )  [inline]
 

Definition at line 48 of file Line3.

gfx::Line3::~Line3  )  [inline]
 

Definition at line 50 of file Line3.


Member Function Documentation

bool gfx::Line3::contains const Point3 p  )  const [inline]
 

is point p on the line?

Definition at line 98 of file Line3.

References base::Vector3::equals(), and base::Point3.

Real gfx::Line3::distanceTo const Line3 l2  )  const [inline]
 

shortest distance between line and line l2

Definition at line 87 of file Line3.

References gfx::Segment3::length(), and shortestSegmentBetween().

Real gfx::Line3::distanceTo const Point3 p  )  const [inline]
 

shortest distance between line and p

Definition at line 80 of file Line3.

References base::Vector3::length(), and base::Point3.

bool gfx::Line3::equals const Line3 l,
Real  epsilon = consts::epsilon
const [inline]
 

Definition at line 73 of file Line3.

References d, base::Vector3::equals(), and o.

bool gfx::Line3::operator!= const Line3 l  )  const [inline]
 

Definition at line 67 of file Line3.

References d, and o.

Line3& gfx::Line3::operator= const Line3 l  )  [inline]
 

Definition at line 52 of file Line3.

References d, base::Vector3::normalize(), and o.

bool gfx::Line3::operator== const Line3 l  )  const [inline]
 

Definition at line 61 of file Line3.

References d, and o.

Point3 gfx::Line3::pointClosestTo const Point3 p  )  const [inline]
 

find point on the line that is closest to p

Definition at line 91 of file Line3.

References base::Point3.

Segment3 gfx::Line3::shortestSegmentBetween const Line3 l2  )  const
 

return shortest segment between this line and line l2

Referenced by distanceTo().


Member Data Documentation

Vector3 gfx::Line3::d
 

direction

Definition at line 112 of file Line3.

Referenced by equals(), operator!=(), gfx::operator<<(), operator=(), and operator==().

Point3 gfx::Line3::o
 

origin

Definition at line 111 of file Line3.

Referenced by equals(), operator!=(), gfx::operator<<(), operator=(), and operator==().


The documentation for this class was generated from the following file:
Generated on Thu Jul 29 16:39:51 2004 for OpenSim by doxygen 1.3.6