Added the possibility to wrap an existing coefficient vector

This commit is contained in:
Paolo Cignoni 2010-01-08 10:36:09 +00:00
parent 796c2f0b56
commit 3765096290
1 changed files with 7 additions and 0 deletions

View File

@ -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;