34 #include <cugar/basic/numbers.h> 35 #include <cugar/linalg/vector.h> 49 template <
typename Vector3>
55 CUGAR_HOST_DEVICE
float sh(
const int32 l,
const int32 m,
const Vector3& v);
62 template <
int32 l,
typename Vector3>
63 CUGAR_HOST_DEVICE
float sh(
const int32 m,
const Vector3& v);
69 template <
int32 l,
int32 m,
typename Vector3>
70 CUGAR_HOST_DEVICE
float sh(
const Vector3& v);
78 template <
typename ZHVector,
typename SHVector,
typename Vector3>
79 CUGAR_HOST_DEVICE
void rotate_ZH(
const int32 L,
const ZHVector& zh_coeff,
const Vector3& d, SHVector& sh_coeff);
87 template <
int32 L,
typename ZHVector,
typename SHVector,
typename Vector3>
88 CUGAR_HOST_DEVICE
void rotate_ZH(
const ZHVector& zh_coeff,
const Vector3& d, SHVector& sh_coeff);
95 template <
int32 l,
int32 m,
typename Vector3>
96 CUGAR_HOST_DEVICE
float rotate_ZH(
const float zh_l,
const Vector3& d);
104 static const int32 ORDER = L;
105 static const int32 COEFFS = L*L;
111 template <
typename Vector3>
112 static CUGAR_HOST_DEVICE
float eval(
const int32 i,
const Vector3& d);
126 static CUGAR_HOST_DEVICE
void constant(
float k,
float* coeffs);
130 static CUGAR_HOST_DEVICE
float integral(
const float* coeffs) {
return coeffs[0]; }
134 template <
typename Vector_type>
135 static CUGAR_HOST_DEVICE
float integral(
const Vector_type& coeffs) {
return coeffs[0]; }
140 static CUGAR_HOST_DEVICE
void solve(
float* coeffs) {}
145 CUGAR_FORCEINLINE CUGAR_HOST_DEVICE
158 template <
typename OutputIterator>
179 #include <cugar/spherical/sh_inline.h> CUGAR_HOST_DEVICE float sh(const int32 l, const int32 m, const Vector3 &v)
Definition: sh_inline.h:114
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float sh_legendre_polynomial(const uint32 l, const uint32 m, const float x, const float y)
Definition: sh_inline.h:351
Defines a function to project spherical functions on a given basis.
static CUGAR_HOST_DEVICE void solve(float *coeffs)
Definition: sh.h:140
static CUGAR_HOST_DEVICE float eval(const int32 i, const Vector3 &d)
Definition: sh_inline.h:302
static CUGAR_HOST_DEVICE float integral(const Vector_type &coeffs)
Definition: sh.h:135
Defines some general purpose functors.
CUGAR_HOST_DEVICE void rotate_ZH(const int32 L, const ZHVector &zh_coeff, const Vector3 &d, SHVector &sh_coeff)
Definition: sh_inline.h:37
static CUGAR_HOST_DEVICE float integral(const float *coeffs)
Definition: sh.h:130
CUGAR_HOST_DEVICE float sh_polar_integral(const int32 m, const float phi)
Definition: sh_inline.h:434
Define a vector_view POD type and plain_view() for std::vector.
Definition: diff.h:38
static CUGAR_HOST_DEVICE void clamped_cosine(const Vector3f &normal, const float w, float *coeffs)
Definition: sh_inline.h:321
static CUGAR_HOST_DEVICE void constant(float k, float *coeffs)
Definition: sh_inline.h:341
CUGAR_HOST_DEVICE void sh_legendre_integrals(const uint32 n, const float x, OutputIterator r)
Definition: sh_inline.h:393