]> git.tdb.fi Git - libs/gl.git/blob - source/clipunit.h
Make ambient occlusion edge detection threshold adjustable
[libs/gl.git] / source / clipunit.h
1 #ifndef MSP_GL_CLIPUNIT_H_
2 #define MSP_GL_CLIPUNIT_H_
3
4 #include <vector>
5
6 namespace Msp {
7 namespace GL {
8
9 class ClipPlane;
10
11 class ClipUnit
12 {
13 private:
14         unsigned index;
15         const ClipPlane *plane;
16
17         static std::vector<ClipUnit> units;
18
19         ClipUnit();
20
21 public:
22         unsigned get_index() const { return index; }
23         bool set_plane(const ClipPlane *);
24         const ClipPlane *get_plane() const { return plane; } 
25
26         static unsigned get_n_units();
27         static ClipUnit &get_unit(unsigned);
28         static ClipUnit *find_unit(const ClipPlane *);
29 };
30
31 } // namespace GL
32 } // namespace Msp
33
34 #endif