Browse Source

GCC 4.4 compatibility: lambda functions aren't supported yet.

Vladimír Vondruš 14 years ago
parent
commit
fa55d91d2f
  1. 10
      src/Primitives/Icosphere.h

10
src/Primitives/Icosphere.h

@ -52,13 +52,17 @@ template<size_t subdivisions> 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
};
}}

Loading…
Cancel
Save