diff --git a/src/nvmath/SphericalHarmonic.cpp b/src/nvmath/SphericalHarmonic.cpp index 25832e7..d0d4423 100644 --- a/src/nvmath/SphericalHarmonic.cpp +++ b/src/nvmath/SphericalHarmonic.cpp @@ -1,6 +1,8 @@ // This code is in the public domain -- castanyo@yahoo.es -#include +#include "SphericalHarmonic.h" + +#include "Vector.h" using namespace nv; diff --git a/src/nvmath/SphericalHarmonic.h b/src/nvmath/SphericalHarmonic.h index 3847d57..b7f5774 100644 --- a/src/nvmath/SphericalHarmonic.h +++ b/src/nvmath/SphericalHarmonic.h @@ -3,20 +3,21 @@ #ifndef NV_MATH_SPHERICALHARMONIC_H #define NV_MATH_SPHERICALHARMONIC_H -#include "Vector.h" +#include "nvmath.h" #include // memcpy namespace nv { + class Vector3; class Matrix; NVMATH_API float legendrePolynomial( int l, int m, float x ) NV_CONST; NVMATH_API float shBasis( int l, int m, float theta, float phi ) NV_CONST; - NVMATH_API float shBasis( int l, int m, Vector3::Arg v ) NV_CONST; + NVMATH_API float shBasis( int l, int m, const Vector3 & v ) NV_CONST; NVMATH_API float hshBasis( int l, int m, float theta, float phi ) NV_CONST; - NVMATH_API float hshBasis( int l, int m, Vector3::Arg v ) NV_CONST; + NVMATH_API float hshBasis( int l, int m, const Vector3 & v ) NV_CONST; class Sh; float dot(const Sh & a, const Sh & b) NV_CONST; @@ -185,7 +186,7 @@ namespace nv }*/ /// Evaluate - void eval(Vector3::Arg dir) + void eval(const Vector3 & dir) { for(int l = 0; l <= m_order; l++) { for(int m = -l; m <= l; m++) { @@ -196,7 +197,7 @@ namespace nv /// Evaluate the spherical harmonic function. - float sample(Vector3::Arg dir) const + float sample(const Vector3 & dir) const { Sh sh(order()); sh.eval(dir);