KrisLibrary
1.0.0
|
A representation of a possibly unbounded polytope in the 2d plane. More...
#include <UnboundedPolytope2D.h>
Public Member Functions | |
void | CalcPlanes () |
Converts the vertex representation in vertices to planes. | |
void | CalcVertices () |
Converts the plane representation to vertices. | |
bool | Contains (const Vector2 &x) const |
Returns true if the point is within the polytope. | |
Real | Margin (const Vector2 &x) const |
Returns the orthogonal distance to the nearest plane (<0 means outside) | |
Real | ClosestPoint (const Vector2 &x, Vector2 &cp) const |
Public Attributes | |
std::vector< PointRay2D > | vertices |
Vertex representation of the polygon. | |
std::vector< Plane2D > | planes |
A representation of a possibly unbounded polytope in the 2d plane.
Contains both a vertex/ray representation and a halfplane representation.
Returns the closest point inside the polytope if one exists (<0 means the polytope was found to be empty)
std::vector<Plane2D> Geometry::UnboundedPolytope2D::planes |
Halfplane representation of the polygon. Normals point outward.
Referenced by Geometry::PolytopeProjection2D::Create().