]> git.tdb.fi Git - libs/gl.git/blob - source/box.h
7e4b3e5e54dc7884ae7d2404a28b4c3684bbda3e
[libs/gl.git] / source / box.h
1 /* $Id$
2
3 This file is part of libmspgl
4 Copyright © 2011  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_GL_BOX_H_
9 #define MSP_GL_BOX_H_
10
11 #include "geometrybuilder.h"
12 #include "vector.h"
13
14 namespace Msp {
15 namespace GL {
16
17 class BoxBuilder: public GeometryBuilder
18 {
19 private:
20         Vector3 origin;
21         Vector3 span;
22
23 public:
24         BoxBuilder(float, float, float);
25         BoxBuilder(const Vector3 &, const Vector3 &);
26
27         virtual void build(PrimitiveBuilder &) const;
28 private:
29         void build_face(PrimitiveBuilder &, const Vector3 &, const Vector3 &, const Vector3 &) const;
30 };
31
32 } // namespace GL
33 } // namespace Msp
34
35 #endif