From 3765096290cd1080bee588995e8544ee188e146f Mon Sep 17 00:00:00 2001 From: cnr-isti-vclab Date: Fri, 8 Jan 2010 10:36:09 +0000 Subject: [PATCH] Added the possibility to wrap an existing coefficient vector --- vcg/math/spherical_harmonics.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vcg/math/spherical_harmonics.h b/vcg/math/spherical_harmonics.h index e9211c80..4251dec1 100644 --- a/vcg/math/spherical_harmonics.h +++ b/vcg/math/spherical_harmonics.h @@ -167,6 +167,13 @@ public : return sph; } + static SphericalHarmonics Wrap(ScalarType * _coefficients) + { + SphericalHarmonics sph; + for(i = 0; i < (int) MAX_BAND * MAX_BAND; ++i) sph.coefficients[i] = _coefficients[i]; + return sph; + } + ScalarType operator()(ScalarType theta, ScalarType phi) { ScalarType f = 0;