Fermat
|
A smoothed octahedral basis: the basis functions overlap and are not orthogonal. As a consequence, projection requires solving a least squares problem.
#include <oct.h>
Static Public Methods | |
static CUGAR_HOST_DEVICE float | eval (const int32 i, const Vector3f &d) |
static CUGAR_API void | clamped_cosine (const Vector3f &normal, const float w, float *coeffs) |
static void | constant (float k, float *coeffs) |
static float | integral (const float *coeffs) |
template<typename Vector_type > | |
static float | integral (const Vector_type &coeffs) |
static float | G (const int32 i, const int32 j) |
static CUGAR_API void | solve (float *coeffs) |
Static Public Members | |
static const int32 | COEFFS = 8 |
|
static |
add a weighted basis expansion of a clamped cosine lobe to a given set of coefficients
normal | input normal |
w | scalar weight |
coeffs | input/output coefficients |
|
inlinestatic |
return the basis expansion of a constant
k | input constant |
coeffs | output coefficients |
|
inlinestatic |
evaluate the i-th octahedral function
i | function index |
d | input direction vector |
|
inlinestatic |
return the dot product of the i-th and j-th basis functions
i | first function index |
j | second functio index |
|
inlinestatic |
return the integral of a spherical hamonics function
|
inlinestatic |
return the integral of a spherical hamonics function
|
static |
solve the linear least squares projection for a set of coefficients
coeffs | input projection coefficients |