wfmath  1.0.3
A math library for the Worldforge system.
WFMath::Polygon< dim > Class Template Reference

A polygon, all of whose points lie in a plane, embedded in dim dimensions. More...

#include <polygon.h>

Public Member Functions

 Polygon (const Polygon &p)
 
Polygonoperator= (const Polygon &p)
 
bool isEqualTo (const Polygon &p2, CoordType epsilon=numeric_constants< CoordType >::epsilon()) const
 
bool operator== (const Polygon &p) const
 
bool operator!= (const Polygon &p) const
 
bool isValid () const
 
size_t numCorners () const
 
Point< dim > getCorner (size_t i) const
 
Point< dim > getCenter () const
 
bool addCorner (size_t i, const Point< dim > &p, CoordType epsilon=numeric_constants< CoordType >::epsilon())
 
void removeCorner (size_t i)
 
bool moveCorner (size_t i, const Point< dim > &p, CoordType epsilon=numeric_constants< CoordType >::epsilon())
 
void clear ()
 
Polygonshift (const Vector< dim > &v)
 
PolygonmoveCornerTo (const Point< dim > &p, size_t corner)
 
PolygonmoveCenterTo (const Point< dim > &p)
 
PolygonrotateCorner (const RotMatrix< dim > &m, size_t corner)
 
PolygonrotateCenter (const RotMatrix< dim > &m)
 
PolygonrotatePoint (const RotMatrix< dim > &m, const Point< dim > &p)
 
Polygon< 3 > & rotateCorner (const Quaternion &q, size_t corner)
 
Polygon< 3 > & rotateCenter (const Quaternion &q)
 
Polygon< 3 > & rotatePoint (const Quaternion &q, const Point< 3 > &p)
 
AxisBox< dim > boundingBox () const
 
Ball< dim > boundingSphere () const
 
Ball< dim > boundingSphereSloppy () const
 
Polygon toParentCoords (const Point< dim > &origin, const RotMatrix< dim > &rotation=RotMatrix< dim >().identity()) const
 
Polygon toParentCoords (const AxisBox< dim > &coords) const
 
Polygon toParentCoords (const RotBox< dim > &coords) const
 
Polygon toLocalCoords (const Point< dim > &origin, const RotMatrix< dim > &rotation=RotMatrix< dim >().identity()) const
 
Polygon toLocalCoords (const AxisBox< dim > &coords) const
 
Polygon toLocalCoords (const RotBox< dim > &coords) const
 
Polygon< 3 > toParentCoords (const Point< 3 > &origin, const Quaternion &rotation) const
 
Polygon< 3 > toLocalCoords (const Point< 3 > &origin, const Quaternion &rotation) const
 

Friends

std::ostream & operator (std::ostream &os, const Polygon &p)
 
std::istream & operator>> (std::istream &is, Polygon &p)
 
bool Intersect (const Polygon &r, const Point< dim > &p, bool proper)
 
bool Contains (const Point< dim > &p, const Polygon &r, bool proper)
 
bool Intersect (const Polygon &p, const AxisBox< dim > &b, bool proper)
 
bool Contains (const Polygon &p, const AxisBox< dim > &b, bool proper)
 
bool Contains (const AxisBox< dim > &b, const Polygon &p, bool proper)
 
bool Intersect (const Polygon &p, const Ball< dim > &b, bool proper)
 
bool Contains (const Polygon &p, const Ball< dim > &b, bool proper)
 
bool Contains (const Ball< dim > &b, const Polygon &p, bool proper)
 
bool Intersect (const Polygon &p, const Segment< dim > &s, bool proper)
 
bool Contains (const Polygon &p, const Segment< dim > &s, bool proper)
 
bool Contains (const Segment< dim > &s, const Polygon &p, bool proper)
 
bool Intersect (const Polygon &p, const RotBox< dim > &r, bool proper)
 
bool Contains (const Polygon &p, const RotBox< dim > &r, bool proper)
 
bool Contains (const RotBox< dim > &r, const Polygon &p, bool proper)
 
bool Intersect (const Polygon &p1, const Polygon &p2, bool proper)
 
bool Contains (const Polygon &outer, const Polygon &inner, bool proper)
 

Detailed Description

template<int dim = 3>
class WFMath::Polygon< dim >

A polygon, all of whose points lie in a plane, embedded in dim dimensions.

Definition at line 305 of file polygon.h.


The documentation for this class was generated from the following files: