KrisLibrary  1.0.0
Public Member Functions | Public Attributes | List of all members
Geometry::UnboundedPolytope2D Struct Reference

A representation of a possibly unbounded polytope in the 2d plane. More...

#include <UnboundedPolytope2D.h>

Inheritance diagram for Geometry::UnboundedPolytope2D:
SupportPolygon

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< PointRay2Dvertices
 Vertex representation of the polygon.
 
std::vector< Plane2Dplanes
 

Detailed Description

A representation of a possibly unbounded polytope in the 2d plane.

Contains both a vertex/ray representation and a halfplane representation.

Member Function Documentation

Real UnboundedPolytope2D::ClosestPoint ( const Vector2 x,
Vector2 cp 
) const

Returns the closest point inside the polytope if one exists (<0 means the polytope was found to be empty)

Member Data Documentation

std::vector<Plane2D> Geometry::UnboundedPolytope2D::planes

Halfplane representation of the polygon. Normals point outward.

Referenced by Geometry::PolytopeProjection2D::Create().


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