#ifndef _Polytope_h__ #define _Polytope_h__ #include "Containers.h" namespace GtpVisibilityPreprocessor { class Hyperplane; /** Contains a list of hyperplanes */ typedef vector HyperplaneContainer; /** Class representing a polyhedron in 5d projected space. */ class Polyhedron { public: Polyhedron() {} /** Adds plane to polyhedron equations */ void AddPlane(Hyperplane *plane) {mHyperPlanes.push_back(plane);} /** Returns true if polyhedron is bounded. */ virtual bool IsBounded(); protected: /// the hyperplanes define the polyhedron HyperplaneContainer mHyperPlanes; }; /** Class representing a polytope (i.e., a bounded polyhedron) in 5d projected space. */ class Polytope: public Polyhedron { public: Polytope(const Polyhedron &boundedPoly); /** Split polytope into 2 polytopes front and back. @param plane the split plane */ void Split(Hyperplane *plane, Polytope *front, Polytope *back); virtual bool IsBounded() {return true;} }; } #endif // Polytope