]> git.tdb.fi Git - libs/gl.git/blob - source/core/clipplane.h
Use default member initializers for simple types
[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 = { 0.0f, 0.0f, 0.0f, 1.0f };
15         unsigned generation = 0;
16
17 public:
18         ClipPlane() = default;
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