]> git.tdb.fi Git - libs/gl.git/blob - source/clip.cpp
Drop Id tags and copyright notices from files
[libs/gl.git] / source / clip.cpp
1 #include "clip.h"
2 #include "gl.h"
3
4 namespace Msp {
5 namespace GL {
6
7 ClipPlane::ClipPlane(double a, double b, double c, double d)
8 {
9         eq[0] = a;
10         eq[1] = b;
11         eq[2] = c;
12         eq[3] = d;
13 }
14
15 void ClipPlane::apply_to(unsigned n)
16 {
17         glClipPlane(GL_CLIP_PLANE0+n, eq);
18         glEnable(GL_CLIP_PLANE0+n);
19 }
20
21 void ClipPlane::disable(unsigned n)
22 {
23         glDisable(GL_CLIP_PLANE0+n);
24 }
25
26 } // namespace GL
27 } // namespace Msp