]> git.tdb.fi Git - libs/gl.git/blobdiff - source/sphere.h
Fix shadowing warnings from older gcc versions
[libs/gl.git] / source / sphere.h
index b69c4083ba4159c1066824b9247cc2a8945c68de..b20ff5413954ce80048c03bdf2982d22957b18c8 100644 (file)
@@ -20,6 +20,31 @@ public:
        virtual void build(PrimitiveBuilder &) const;
 };
 
+
+class IcoSphereBuilder: public GeometryBuilder
+{
+private:
+       float radius;
+       unsigned subdivision;
+
+       static float base_vertices[];
+       static unsigned base_triangles[];
+       static unsigned base_edges[];
+       static unsigned base_tri_edges[];
+
+public:
+       IcoSphereBuilder(float, unsigned);
+private:
+       static void initialize_edges();
+
+public:
+       using GeometryBuilder::build;
+       virtual void build(PrimitiveBuilder &) const;
+
+private:
+       unsigned edge_vertex(unsigned, unsigned) const;
+};
+
 } // namespace GL
 } // namespace Msp