KrisLibrary  1.0.0
UnboundedPolytope2D.h
1 #ifndef GEOMETRY_UNBOUNDED_POLYTOPE_H
2 #define GEOMETRY_UNBOUNDED_POLYTOPE_H
3 
4 #include <KrisLibrary/math3d/geometry2d.h>
5 #include "rayprimitives.h"
6 #include <vector>
7 
8 namespace Geometry {
9 
10  using namespace Math3D;
11 
18 {
20  void CalcPlanes();
22  void CalcVertices();
24  bool Contains(const Vector2& x) const;
26  Real Margin(const Vector2& x) const;
29  Real ClosestPoint(const Vector2& x,Vector2& cp) const;
30 
32  std::vector<PointRay2D> vertices;
33 
36  std::vector<Plane2D> planes;
37 };
38 
39 } //namespace Geometry
40 
41 #endif
Contains primitives that allow rays to be represented as points at infinity.
std::vector< PointRay2D > vertices
Vertex representation of the polygon.
Definition: UnboundedPolytope2D.h:32
A representation of a possibly unbounded polytope in the 2d plane.
Definition: UnboundedPolytope2D.h:17
Contains all the definitions in the Math3D package.
Definition: AnyGeometry.h:12
std::vector< Plane2D > planes
Definition: UnboundedPolytope2D.h:36
A 2D vector class.
Definition: math3d/primitives.h:41
Contains all definitions in the Geometry package.
Definition: AnyGeometry.h:11
int ClosestPoint(const CollisionMesh &mesh, const Vector3 &p, Vector3 &cp)
Finds the closest point pt to p on m and returns the triangle index. cp is given in the mesh&#39;s local ...
Definition: CollisionMesh.cpp:1304