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