]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/clipplane.h
Use default member initializers for simple types
[libs/gl.git] / source / core / clipplane.h
index 98c633b70fd7933bedf39824aa0abe851b2f6412..a2b5625521f1f48463e22c9f06d7f5f5572782f5 100644 (file)
@@ -1,27 +1,29 @@
-#ifndef MSP_GL_CLIP_H_
-#define MSP_GL_CLIP_H_
+#ifndef MSP_GL_CLIPPLANE_H_
+#define MSP_GL_CLIPPLANE_H_
 
 #include "vector.h"
 
 namespace Msp {
 namespace GL {
 
-class Matrix;
 class ProgramData;
 
 class ClipPlane
 {
 private:
-       Vector4 eq;
+       Vector4 eq = { 0.0f, 0.0f, 0.0f, 1.0f };
+       unsigned generation = 0;
 
 public:
-       ClipPlane();
+       ClipPlane() = default;
        ClipPlane(const Vector4 &);
        ClipPlane(const Vector3 &, const Vector3 &);
 
        void set_equation(const Vector4 &);
        void set_plane(const Vector3 &, const Vector3 &);
-       void update_shader_data(ProgramData &, const Matrix &, unsigned) const;
+       void update_shader_data(ProgramData &, unsigned) const;
+
+       unsigned get_generation() const { return generation; }
 };
 
 } // namespace GL