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

gfx::TriangleDesc Class Reference

Inheritance diagram for gfx::TriangleDesc:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TriangleDesc (const Triangle3 &t, const Plane &p)
bool pointInTri (const Vector3 &P) const
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)
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

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

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

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

Public Attributes

Int i1
Int i2

Protected Member Functions

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

Protected Attributes

Point3 _p1
Point3 _p2
Point3 _p3

Constructor & Destructor Documentation

gfx::TriangleDesc::TriangleDesc const Triangle3 t,
const Plane p
[inline]
 

Definition at line 648 of file Triangle3.cpp.

References i1, i2, gfx::Plane::normal, base::Vector3::x, base::Vector3::y, and base::Vector3::z.


Member Function Documentation

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

Definition at line 70 of file Triangle3.

References gfx::Triangle3::e(), and base::Point3.

Referenced by operator[]().

bool gfx::Triangle3::contact const Triangle3 t,
Contact contact
const [inherited]
 

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

Definition at line 136 of file Triangle3.

References gfx::Triangle3::distanceTo(), and base::Point3.

Real gfx::Triangle3::distanceTo const Triangle3 t  )  const [inherited]
 

shortest distance between this triangle and the triangle t

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

shortest distance between this triangle and the segment s

Definition at line 147 of file Triangle3.

References gfx::Triangle3::shortestSegmentBetween().

Real gfx::Triangle3::distanceTo const Point3 p  )  const [inherited]
 

shortest distance between triangle and p

Referenced by gfx::Triangle3::contains().

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

Definition at line 61 of file Triangle3.

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

Referenced by gfx::Triangle3::at(), gfx::Triangle3::operator()(), and gfx::Triangle3::operator[]().

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

Definition at line 95 of file Triangle3.

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

bool gfx::Triangle3::intersect const Triangle3 t  )  const [inherited]
 

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

Definition at line 103 of file Triangle3.

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

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

Definition at line 118 of file Triangle3.

References gfx::Triangle3::_p1, gfx::Triangle3::_p2, and gfx::Triangle3::_p3.

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

Definition at line 51 of file Triangle3.

References gfx::Triangle3::e(), and base::Point3.

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

Definition at line 112 of file Triangle3.

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

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

Definition at line 115 of file Triangle3.

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

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

Definition at line 119 of file Triangle3.

References gfx::Triangle3::_p1, gfx::Triangle3::_p2, and gfx::Triangle3::_p3.

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

Definition at line 88 of file Triangle3.

References gfx::Triangle3::p1(), gfx::Triangle3::p2(), and gfx::Triangle3::p3().

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

Reimplemented from gfx::Triangle3.

Definition at line 689 of file Triangle3.cpp.

References gfx::Triangle3::at(), and base::Point3.

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

Definition at line 53 of file Triangle3.

References gfx::Triangle3::_p1, and base::Point3.

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

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

Definition at line 54 of file Triangle3.

References gfx::Triangle3::_p2, and base::Point3.

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

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

Definition at line 55 of file Triangle3.

References gfx::Triangle3::_p3, and base::Point3.

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

Point3 gfx::Triangle3::pointClosestTo const Point3 p  )  const [inherited]
 

find point on triangle that is closest to p

bool gfx::TriangleDesc::pointInTri const Vector3 P  )  const [inline]
 

Definition at line 663 of file Triangle3.cpp.

References i1, i2, base::Point3, base::Vector3::x, base::Vector3::y, and base::Vector3::z.

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

Definition at line 56 of file Triangle3.

References gfx::Triangle3::_p1, and base::Point3.

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

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

Definition at line 57 of file Triangle3.

References gfx::Triangle3::_p2, and base::Point3.

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

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

Definition at line 58 of file Triangle3.

References gfx::Triangle3::_p3, and base::Point3.

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

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

Segment3 gfx::Triangle3::shortestSegmentBetween const Triangle3 t  )  const [inherited]
 

return the shortest segment between this triangle and the triangle t

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

return the shortest segment between this triangle and the segment s

Definition at line 140 of file Triangle3.

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

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

Definition at line 122 of file Triangle3.

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


Member Data Documentation

Point3 gfx::Triangle3::_p1 [protected, inherited]
 

Definition at line 176 of file Triangle3.

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

Point3 gfx::Triangle3::_p2 [protected, inherited]
 

Definition at line 176 of file Triangle3.

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

Point3 gfx::Triangle3::_p3 [protected, inherited]
 

Definition at line 176 of file Triangle3.

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

Int gfx::TriangleDesc::i1
 

Definition at line 703 of file Triangle3.cpp.

Referenced by pointInTri(), and TriangleDesc().

Int gfx::TriangleDesc::i2
 

Definition at line 703 of file Triangle3.cpp.

Referenced by pointInTri(), and TriangleDesc().


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