From 0f0ac756e47b803905446fc10889cf1f7d585635 Mon Sep 17 00:00:00 2001 From: cnr-isti-vclab Date: Mon, 15 Dec 2008 13:16:00 +0000 Subject: [PATCH] Polar Functor is now templatized --- vcg/math/spherical_harmonics.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vcg/math/spherical_harmonics.h b/vcg/math/spherical_harmonics.h index e7e30f02..42495ff6 100644 --- a/vcg/math/spherical_harmonics.h +++ b/vcg/math/spherical_harmonics.h @@ -35,9 +35,9 @@ namespace vcg{ namespace math{ template -class PolarFunctor{ +class DummyPolarFunctor{ public: - virtual ScalarType operator()(ScalarType theta, ScalarType phi) = 0; + inline ScalarType operator()(ScalarType theta, ScalarType phi) {return ScalarType(0);} }; /** @@ -88,7 +88,8 @@ public : else return SQRT_TWO * complex_spherical_harmonic_im(l, -m, theta, phi); } - static SphericalHarmonics Project(PolarFunctor * fun, unsigned n_samples) + template + static SphericalHarmonics Project(PolarFunctor * fun, unsigned n_samples) { const ScalarType weight = 4 * M_PI;