X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fclipunit.h;fp=source%2Fclipunit.h;h=b4af96708dc5dcfdb046afc030e89fa63557dd3c;hb=9b685afdaac3952bab7a49410bdf7f6b3cf67c6f;hp=0000000000000000000000000000000000000000;hpb=aa4d7203c90083af7fbcbe8368e55ad2f29d5ff1;p=libs%2Fgl.git diff --git a/source/clipunit.h b/source/clipunit.h new file mode 100644 index 00000000..b4af9670 --- /dev/null +++ b/source/clipunit.h @@ -0,0 +1,34 @@ +#ifndef MSP_GL_CLIPUNIT_H_ +#define MSP_GL_CLIPUNIT_H_ + +#include + +namespace Msp { +namespace GL { + +class ClipPlane; + +class ClipUnit +{ +private: + unsigned index; + const ClipPlane *plane; + + static std::vector units; + + ClipUnit(); + +public: + unsigned get_index() const { return index; } + bool set_plane(const ClipPlane *); + const ClipPlane *get_plane() const { return plane; } + + static unsigned get_n_units(); + static ClipUnit &get_unit(unsigned); + static ClipUnit *find_unit(const ClipPlane *); +}; + +} // namespace GL +} // namespace Msp + +#endif