diff --git a/src/Primitives/Icosphere.cpp b/src/Primitives/Icosphere.cpp index 6e2d5aeaa..05fe33200 100644 --- a/src/Primitives/Icosphere.cpp +++ b/src/Primitives/Icosphere.cpp @@ -17,13 +17,7 @@ namespace Magnum { namespace Primitives { -/** - * @todo Use own computed (and more precise) icosahedron data, not these stolen - * from Blender. - */ - -#ifndef DOXYGEN_GENERATING_OUTPUT -const Vector4 _AbstractIcosphere::initialVertices[] = { +const Vector4 Icosahedron::vertices[] = { Vector4(0, -0.525731f, 0.850651f), Vector4(0.850651f, 0, 0.525731f), Vector4(0.850651f, 0, -0.525731f), @@ -37,7 +31,7 @@ const Vector4 _AbstractIcosphere::initialVertices[] = { Vector4(0, 0.525731f, -0.850651f), Vector4(0, 0.525731f, 0.850651f), }; -const GLubyte _AbstractIcosphere::initialIndices[] = { +const GLubyte Icosahedron::indices[] = { 1, 2, 6, 1, 7, 2, 3, 4, 5, @@ -59,6 +53,5 @@ const GLubyte _AbstractIcosphere::initialIndices[] = { 3, 9, 8, 4, 8, 0 }; -#endif }} diff --git a/src/Primitives/Icosphere.h b/src/Primitives/Icosphere.h index c1d8fcbf9..caffa23c8 100644 --- a/src/Primitives/Icosphere.h +++ b/src/Primitives/Icosphere.h @@ -25,22 +25,23 @@ namespace Magnum { namespace Primitives { -#ifndef DOXYGEN_GENERATING_OUTPUT -class _AbstractIcosphere { - public: - ~_AbstractIcosphere() {} +/** +@brief Icosahedron - protected: - static const Vector4 initialVertices[]; - static const GLubyte initialIndices[]; +@todo Use own computed (and more precise) icosahedron data, not these stolen +from Blender. +*/ +class Icosahedron { + public: + static const Vector4 vertices[]; /**< @brief Vertices */ + static const GLubyte indices[]; /**< @brief Indices */ }; -#endif /** * @brief %Icosphere primitive * @tparam subdivisions Number of subdivisions */ -template class Icosphere: public AbstractPrimitive::value*20*3>::value>::SizeType>, _AbstractIcosphere { +template class Icosphere: public AbstractPrimitive::value*20*3>::value>::SizeType> { public: Icosphere() { if(vertexCount() == 0) subdivide(); @@ -63,7 +64,7 @@ template class Icosphere: public AbstractPrimitivesetData(initialVertices, initialIndices, 12, 60); + builder()->setData(Icosahedron::vertices, Icosahedron::indices, 12, 60); for(size_t i = 0; i != subdivisions; ++i) builder()->subdivide([](const Vector4& a, const Vector4& b) {