KrisLibrary  1.0.0
Public Member Functions | Public Attributes | List of all members
SupportPolygon Class Reference

Calculation of the support polygon given a number of contacts. More...

#include <Stability.h>

Inheritance diagram for SupportPolygon:
Geometry::UnboundedPolytope2D

Public Member Functions

bool Set (const std::vector< ContactPoint > &contacts, const Vector3 &fext, int numFCEdges, int maxExpandDepth=6)
 
bool Set (const std::vector< CustomContactPoint > &contacts, const Vector3 &fext, int maxExpandDepth=6)
 
bool Set (const CustomContactFormation &contacts, const Vector3 &fext, int maxExpandDepth=6)
 
bool Empty () const
 
bool TestCOM (const Vector3 &com) const
 
Real COMMargin (const Vector3 &com) const
 
- Public Member Functions inherited from Geometry::UnboundedPolytope2D
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

Vector3 fext
 
int numFCEdges
 
std::vector< ContactPointcontacts
 
- Public Attributes inherited from Geometry::UnboundedPolytope2D
std::vector< PointRay2Dvertices
 Vertex representation of the polygon.
 
std::vector< Plane2Dplanes
 

Detailed Description

Calculation of the support polygon given a number of contacts.

To test stability call the Set() method, then call the TestCOM() method. This first computes the entire support polygon, and the second tests for inclusion in the polygon. This is faster than the static TestCOMEquilibrium() method if you need to test a large number of COMs.

In the future, the incremental, adaptive algorithm of Bretl 2006 may be implemented.

Notes:


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