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

gfx::Triangle3 Class Reference

Inheritance diagram for gfx::Triangle3:

Inheritance graph
[legend]
Collaboration diagram for gfx::Triangle3:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Triangle3 ()
 Triangle3 (const Triangle3 &t)
 Triangle3 (const Point3 &p1, const Point3 &p2, const Point3 &p3)
virtual ~Triangle3 ()
const Point3operator[] (Int i) const throw ()
const Point3operator() (Int i) const throw ()
virtual const Point3p1 () const
virtual const Point3p2 () const
virtual const Point3p3 () const
virtual void setp1 (const Point3 &p)
virtual void setp2 (const Point3 &p)
virtual void setp3 (const Point3 &p)
virtual const Point3e (Int i) const throw ()
const Point3at (Int i) const throw (std::out_of_range)
Triangle3operator= (const Triangle3 &src) throw ()
bool operator== (const Triangle3 &t) const throw ()
bool equals (const Triangle3 &t) const throw ()
Vector3 normal () const throw ()
Triangle3operator+= (const Vector3 &v)
Triangle3operator-= (const Vector3 &v)
Triangle3operator *= (Real s)
Triangle3operator/= (Real s)
void transform (const base::Transform &t)
Real distanceTo (const Point3 &p) const
 shortest distance between triangle and p

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

bool contains (const Point3 &p) const
Segment3 shortestSegmentBetween (const Segment3 &s) const
 return the shortest segment between this triangle and the segment s

Segment3 shortestSegmentBetween (const Triangle3 &t) const
 return the shortest segment between this triangle and the triangle t

Real distanceTo (const Segment3 &s) const
 shortest distance between this triangle and the segment s

Real distanceTo (const Triangle3 &t) const
 shortest distance between this triangle and the triangle t

bool intersect (const Triangle3 &t) const
bool contact (const Triangle3 &t, Contact &contact) const

Protected Member Functions

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

Protected Attributes

Point3 _p1
Point3 _p2
Point3 _p3

Constructor & Destructor Documentation

gfx::Triangle3::Triangle3  )  [inline]
 

Definition at line 43 of file Triangle3.

gfx::Triangle3::Triangle3 const Triangle3 t  )  [inline]
 

Definition at line 44 of file Triangle3.

References _p1, _p2, and _p3.

gfx::Triangle3::Triangle3 const Point3 p1,
const Point3 p2,
const Point3 p3
[inline]
 

Definition at line 45 of file Triangle3.

References _p1, _p2, _p3, and base::Point3.

virtual gfx::Triangle3::~Triangle3  )  [inline, virtual]
 

Definition at line 48 of file Triangle3.


Member Function Documentation

const Point3& gfx::Triangle3::at Int  i  )  const throw (std::out_of_range) [inline]
 

Definition at line 70 of file Triangle3.

References e(), and base::Point3.

Referenced by gfx::TriangleDesc::operator[]().

bool gfx::Triangle3::contact const Triangle3 t,
Contact contact
const
 

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

Definition at line 136 of file Triangle3.

References distanceTo(), and base::Point3.

Real gfx::Triangle3::distanceTo const Triangle3 t  )  const
 

shortest distance between this triangle and the triangle t

Real gfx::Triangle3::distanceTo const Segment3 s  )  const [inline]
 

shortest distance between this triangle and the segment s

Definition at line 147 of file Triangle3.

References shortestSegmentBetween().

Real gfx::Triangle3::distanceTo const Point3 p  )  const
 

shortest distance between triangle and p

Referenced by contains().

virtual const Point3& gfx::Triangle3::e Int  i  )  const throw () [inline, virtual]
 

Definition at line 61 of file Triangle3.

References _p1, _p2, _p3, and base::Point3.

Referenced by at(), operator()(), and operator[]().

bool gfx::Triangle3::equals const Triangle3 t  )  const throw () [inline]
 

Definition at line 95 of file Triangle3.

References base::Vector3::equals(), p1(), p2(), and p3().

bool gfx::Triangle3::intersect const Triangle3 t  )  const
 

Vector3 gfx::Triangle3::normal  )  const throw () [inline]
 

Definition at line 103 of file Triangle3.

References base::Vector3::normalize(), p1(), p2(), and p3().

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

Definition at line 118 of file Triangle3.

References _p1, _p2, and _p3.

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

Definition at line 51 of file Triangle3.

References e(), and base::Point3.

Triangle3& gfx::Triangle3::operator+= const Vector3 v  )  [inline]
 

Definition at line 112 of file Triangle3.

References p1(), p2(), p3(), setp1(), setp2(), and setp3().

Triangle3& gfx::Triangle3::operator-= const Vector3 v  )  [inline]
 

Definition at line 115 of file Triangle3.

References p1(), p2(), p3(), setp1(), setp2(), and setp3().

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

Definition at line 119 of file Triangle3.

References _p1, _p2, and _p3.

Triangle3& gfx::Triangle3::operator= const Triangle3 src  )  throw () [inline]
 

Definition at line 79 of file Triangle3.

References setp1(), setp2(), and setp3().

bool gfx::Triangle3::operator== const Triangle3 t  )  const throw () [inline]
 

Definition at line 88 of file Triangle3.

References p1(), p2(), and p3().

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

Reimplemented in gfx::TriangleDesc.

Definition at line 50 of file Triangle3.

References e(), and base::Point3.

virtual const Point3& gfx::Triangle3::p1  )  const [inline, virtual]
 

Definition at line 53 of file Triangle3.

References _p1, and base::Point3.

Referenced by equals(), normal(), operator+=(), operator-=(), gfx::operator<<(), operator==(), gfx::Plane::Plane(), and transform().

virtual const Point3& gfx::Triangle3::p2  )  const [inline, virtual]
 

Definition at line 54 of file Triangle3.

References _p2, and base::Point3.

Referenced by equals(), normal(), operator+=(), operator-=(), gfx::operator<<(), operator==(), gfx::Plane::Plane(), and transform().

virtual const Point3& gfx::Triangle3::p3  )  const [inline, virtual]
 

Definition at line 55 of file Triangle3.

References _p3, and base::Point3.

Referenced by equals(), normal(), operator+=(), operator-=(), gfx::operator<<(), operator==(), gfx::Plane::Plane(), and transform().

Point3 gfx::Triangle3::pointClosestTo const Point3 p  )  const
 

find point on triangle that is closest to p

virtual void gfx::Triangle3::setp1 const Point3 p  )  [inline, virtual]
 

Definition at line 56 of file Triangle3.

References _p1, and base::Point3.

Referenced by operator+=(), operator-=(), operator=(), and transform().

virtual void gfx::Triangle3::setp2 const Point3 p  )  [inline, virtual]
 

Definition at line 57 of file Triangle3.

References _p2, and base::Point3.

Referenced by operator+=(), operator-=(), operator=(), and transform().

virtual void gfx::Triangle3::setp3 const Point3 p  )  [inline, virtual]
 

Definition at line 58 of file Triangle3.

References _p3, and base::Point3.

Referenced by operator+=(), operator-=(), operator=(), and transform().

Segment3 gfx::Triangle3::shortestSegmentBetween const Segment3 seg,
Real &  ds
const [protected]
 

Segment3 gfx::Triangle3::shortestSegmentBetween const Triangle3 t  )  const
 

return the shortest segment between this triangle and the triangle t

Segment3 gfx::Triangle3::shortestSegmentBetween const Segment3 s  )  const [inline]
 

return the shortest segment between this triangle and the segment s

Definition at line 140 of file Triangle3.

Referenced by distanceTo().

void gfx::Triangle3::transform const base::Transform t  )  [inline]
 

Definition at line 122 of file Triangle3.

References p1(), p2(), p3(), setp1(), setp2(), and setp3().


Member Data Documentation

Point3 gfx::Triangle3::_p1 [protected]
 

Definition at line 176 of file Triangle3.

Referenced by e(), operator *=(), operator/=(), p1(), setp1(), and Triangle3().

Point3 gfx::Triangle3::_p2 [protected]
 

Definition at line 176 of file Triangle3.

Referenced by e(), operator *=(), operator/=(), p2(), setp2(), and Triangle3().

Point3 gfx::Triangle3::_p3 [protected]
 

Definition at line 176 of file Triangle3.

Referenced by e(), operator *=(), operator/=(), p3(), setp3(), and Triangle3().


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