Rev | Line | |
---|
[372] | 1 | #ifndef _Polytope_h__
|
---|
| 2 | #define _Polytope_h__
|
---|
| 3 |
|
---|
| 4 | #include "Containers.h"
|
---|
| 5 |
|
---|
[860] | 6 | namespace GtpVisibilityPreprocessor {
|
---|
| 7 |
|
---|
[372] | 8 | class Hyperplane;
|
---|
| 9 |
|
---|
| 10 | /** Contains a list of hyperplanes
|
---|
| 11 | */
|
---|
| 12 | typedef vector<Hyperplane *> HyperplaneContainer;
|
---|
| 13 |
|
---|
| 14 | /** Class representing a polyhedron in 5d projected space.
|
---|
| 15 | */
|
---|
| 16 | class Polyhedron
|
---|
| 17 | {
|
---|
| 18 | public:
|
---|
| 19 | Polyhedron() {}
|
---|
| 20 |
|
---|
| 21 | /** Adds plane to polyhedron equations
|
---|
| 22 | */
|
---|
| 23 | void AddPlane(Hyperplane *plane) {mHyperPlanes.push_back(plane);}
|
---|
| 24 | /** Returns true if polyhedron is bounded.
|
---|
| 25 | */
|
---|
| 26 | virtual bool IsBounded();
|
---|
| 27 |
|
---|
| 28 | protected:
|
---|
| 29 |
|
---|
| 30 | /// the hyperplanes define the polyhedron
|
---|
| 31 | HyperplaneContainer mHyperPlanes;
|
---|
| 32 | };
|
---|
| 33 |
|
---|
| 34 | /** Class representing a polytope (i.e., a bounded polyhedron) in 5d projected space.
|
---|
| 35 | */
|
---|
| 36 | class Polytope: public Polyhedron
|
---|
| 37 | {
|
---|
| 38 | public:
|
---|
| 39 | Polytope(const Polyhedron &boundedPoly);
|
---|
| 40 |
|
---|
| 41 | /** Split polytope into 2 polytopes front and back.
|
---|
| 42 | @param plane the split plane
|
---|
| 43 | */
|
---|
| 44 | void Split(Hyperplane *plane, Polytope *front, Polytope *back);
|
---|
| 45 |
|
---|
| 46 | virtual bool IsBounded() {return true;}
|
---|
| 47 | };
|
---|
| 48 |
|
---|
[860] | 49 | }
|
---|
| 50 |
|
---|
[372] | 51 | #endif // Polytope
|
---|
Note: See
TracBrowser
for help on using the repository browser.