]> git.tdb.fi Git - libs/gl.git/blobdiff - source/sphere.h
Add geometry builder for sphere
[libs/gl.git] / source / sphere.h
diff --git a/source/sphere.h b/source/sphere.h
new file mode 100644 (file)
index 0000000..b69c408
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef MSP_GL_SPHERE_H_
+#define MSP_GL_SPHERE_H_
+
+#include "geometrybuilder.h"
+
+namespace Msp {
+namespace GL {
+
+class UvSphereBuilder: public GeometryBuilder
+{
+private:
+       float radius;
+       unsigned segments;
+       unsigned rings;
+
+public:
+       UvSphereBuilder(float, unsigned, unsigned = 0);
+
+       using GeometryBuilder::build;
+       virtual void build(PrimitiveBuilder &) const;
+};
+
+} // namespace GL
+} // namespace Msp
+
+#endif