]> git.tdb.fi Git - libs/gl.git/blobdiff - source/cylinder.h
Add capsule and grid builders
[libs/gl.git] / source / cylinder.h
diff --git a/source/cylinder.h b/source/cylinder.h
new file mode 100644 (file)
index 0000000..c671bfe
--- /dev/null
@@ -0,0 +1,32 @@
+/* $Id$
+
+This file is part of libmspgl
+Copyright © 2011  Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#ifndef CYLINDER_H_
+#define CYLINDER_H_
+
+#include "geometrybuilder.h"
+
+namespace Msp {
+namespace GL {
+
+class CylinderBuilder: public GeometryBuilder
+{
+private:
+       float radius;
+       float length;
+       unsigned segments;
+
+public:
+       CylinderBuilder(float, float, unsigned = 16);
+
+       virtual void build(PrimitiveBuilder &) const;
+};
+
+} // namespace GL
+} // namespace Msp
+
+#endif