]> git.tdb.fi Git - libs/gl.git/blobdiff - source/capsule.h
Add classes for building some geometric shapes
[libs/gl.git] / source / capsule.h
diff --git a/source/capsule.h b/source/capsule.h
new file mode 100644 (file)
index 0000000..456a782
--- /dev/null
@@ -0,0 +1,33 @@
+/* $Id$
+
+This file is part of libmspgl
+Copyright © 2011  Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#ifndef MSP_GL_CAPSULE_H_
+#define MSP_GL_CAPSULE_H_
+
+#include <msp/gl/geometrybuilder.h>
+
+namespace Msp {
+namespace GL {
+
+class CapsuleBuilder: public GeometryBuilder
+{
+private:
+       float radius;
+       float length;
+       unsigned segments;
+       unsigned rings;
+
+public:
+       CapsuleBuilder(float, float, unsigned = 16, unsigned = 9);
+
+       virtual void build(PrimitiveBuilder &) const;
+};
+
+} // namepace GL
+} // namespace Msp
+
+#endif