]> git.tdb.fi Git - libs/gl.git/blob - source/core/clipplane.h
2cf9b18bcde6b14d8975fa252222fe91ca4b8c39
[libs/gl.git] / source / core / clipplane.h
1 #ifndef MSP_GL_CLIPPLANE_H_
2 #define MSP_GL_CLIPPLANE_H_
3
4 #include "vector.h"
5
6 namespace Msp {
7 namespace GL {
8
9 class ProgramData;
10
11 class ClipPlane
12 {
13 private:
14         Vector4 eq;
15         unsigned generation;
16
17 public:
18         ClipPlane();
19         ClipPlane(const Vector4 &);
20         ClipPlane(const Vector3 &, const Vector3 &);
21
22         void set_equation(const Vector4 &);
23         void set_plane(const Vector3 &, const Vector3 &);
24         void update_shader_data(ProgramData &, unsigned) const;
25
26         unsigned get_generation() const { return generation; }
27 };
28
29 } // namespace GL
30 } // namespace Msp
31
32 #endif