source: obsolete/trunk/VUT/GtpVisibilityPreprocessor/src/Polytope.h @ 372

Revision 372, 1010 bytes checked in by bittner, 19 years ago (diff)

preparation for vss preprocessor. converted all .cpp and .h to dos new line format

Line 
1#ifndef _Polytope_h__
2#define _Polytope_h__
3
4#include "Containers.h"
5
6class Hyperplane;
7
8/** Contains a list of hyperplanes
9*/
10typedef vector<Hyperplane *> HyperplaneContainer;
11
12/** Class representing a polyhedron in 5d projected space.
13*/
14class Polyhedron
15{
16public:
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
26protected:
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*/
34class Polytope: public Polyhedron
35{
36public:
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.