diff --git a/src/Primitives/Icosphere.h b/src/Primitives/Icosphere.h index 7ce808846..e81bf8c78 100644 --- a/src/Primitives/Icosphere.h +++ b/src/Primitives/Icosphere.h @@ -52,13 +52,17 @@ template class Icosphere { /** @brief Constructor */ Icosphere() { for(size_t i = 0; i != subdivisions; ++i) - MeshTools::subdivide(*indices(), *normals(0), [](const Vector3& a, const Vector3& b) { - return (a+b).normalized(); - }); + MeshTools::subdivide(*indices(), *normals(0), interpolator); MeshTools::clean(*indices(), *normals(0)); vertices(0)->assign(normals(0)->begin(), normals(0)->end()); } + + #ifndef DOXYGEN_GENERATING_OUTPUT + static Vector3 interpolator(const Vector3& a, const Vector3& b) { + return (a+b).normalized(); + } + #endif }; }}