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

gfx::Segment3 Class Reference

Collaboration diagram for gfx::Segment3:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Segment3 ()
 Segment3 (const Vector3 &d)
 Segment3 (const Point3 &s, const Point3 &e)
 Segment3 (const Segment3 &seg)
 ~Segment3 ()
Segment3 & operator= (const Segment3 &seg)
bool operator== (const Segment3 &seg) const
bool operator!= (const Segment3 &seg) const
bool equals (const Segment3 &seg, Real epsilon=consts::epsilon) const
Point3 & operator[] (Int i)
const Point3 & operator[] (Int i) const
Segment3 & operator *= (Real s)
Segment3 & operator/= (Real s)
void transform (const base::Transform &t)
Real length () const
Real norm () const
Real magnitude () const
bool contains (const Point3 &p) const
 is point p on the segment?

Real distanceTo (const Point3 &p) const
 shortest distance between segment and p

Real distanceTo (const Segment3 &s2) const
 shortest distance between this segment and segment g2

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

Segment3 shortestSegmentBetween (const Segment3 &s2) const
 return the shortest segment between this segment and segment s2

Segment3 & swapEnds ()
 swap s & e


Public Attributes

Point3 s
Point3 e

Protected Member Functions

Segment3 shortestSegmentBetween (const Segment3 &s2, Real &ds) const

Friends

class Triangle3

Constructor & Destructor Documentation

gfx::Segment3::Segment3 (   )  [inline]
 

Definition at line 43 of file Segment3.

gfx::Segment3::Segment3 (  const Vector3 &  d  )  [inline]
 

Definition at line 44 of file Segment3.

References base::Point3.

gfx::Segment3::Segment3 (  const Point3 &  s,
const Point3 &  e
)  [inline]
 

Definition at line 46 of file Segment3.

References base::Point3.

gfx::Segment3::Segment3 (  const Segment3 &  seg  )  [inline]
 

Definition at line 48 of file Segment3.

gfx::Segment3::~Segment3 (   )  [inline]
 

Definition at line 50 of file Segment3.


Member Function Documentation

bool gfx::Segment3::contains (  const Point3 &  p  )  const
 

is point p on the segment?

Real gfx::Segment3::distanceTo (  const Segment3 &  s2  )  const [inline]
 

shortest distance between this segment and segment g2

Definition at line 105 of file Segment3.

References shortestSegmentBetween().

Real gfx::Segment3::distanceTo (  const Point3 &  p  )  const
 

shortest distance between segment and p

bool gfx::Segment3::equals (  const Segment3 &  seg,
Real  epsilon = consts::epsilon
)  const [inline]
 

Definition at line 72 of file Segment3.

References e, base::Vector3::equals(), and s.

Real gfx::Segment3::length (   )  const [inline]
 

Definition at line 91 of file Segment3.

Referenced by gfx::Line3::distanceTo().

Real gfx::Segment3::magnitude (   )  const [inline]
 

Definition at line 95 of file Segment3.

Real gfx::Segment3::norm (   )  const [inline]
 

Definition at line 93 of file Segment3.

Segment3& gfx::Segment3::operator *= (  Real  s  )  [inline]
 

Definition at line 82 of file Segment3.

bool gfx::Segment3::operator!= (  const Segment3 &  seg  )  const [inline]
 

Definition at line 66 of file Segment3.

References e, and s.

Segment3& gfx::Segment3::operator/= (  Real  s  )  [inline]
 

Definition at line 83 of file Segment3.

Segment3& gfx::Segment3::operator= (  const Segment3 &  seg  )  [inline]
 

Definition at line 52 of file Segment3.

References e, and s.

bool gfx::Segment3::operator== (  const Segment3 &  seg  )  const [inline]
 

Definition at line 60 of file Segment3.

References e, and s.

const Point3& gfx::Segment3::operator[] (  Int  i  )  const [inline]
 

Definition at line 80 of file Segment3.

References base::Point3.

Point3& gfx::Segment3::operator[] (  Int  i  )  [inline]
 

Definition at line 79 of file Segment3.

References base::Point3.

Point3 gfx::Segment3::pointClosestTo (  const Point3 &  p  )  const
 

find point on segment that is closest to p

Segment3 gfx::Segment3::shortestSegmentBetween (  const Segment3 &  s2,
Real &  ds
)  const [protected]
 

Segment3 gfx::Segment3::shortestSegmentBetween (  const Segment3 &  s2  )  const [inline]
 

return the shortest segment between this segment and segment s2

Definition at line 113 of file Segment3.

Referenced by distanceTo().

Segment3& gfx::Segment3::swapEnds (   )  [inline]
 

swap s & e

Definition at line 117 of file Segment3.

References base::Point3.

void gfx::Segment3::transform (  const base::Transform &  t  )  [inline]
 

Definition at line 85 of file Segment3.


Friends And Related Function Documentation

friend class Triangle3 [friend]
 

Definition at line 124 of file Segment3.


Member Data Documentation

Point3 gfx::Segment3::e
 

Definition at line 119 of file Segment3.

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

Point3 gfx::Segment3::s
 

Definition at line 119 of file Segment3.

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:53 2004 for OpenSim by doxygen 1.3.6