Fermat
Classes | Static Public Methods | Static Public Members | List of all members
cugar::Oct_smooth_basis Struct Reference

Detailed description

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
 

Member Function Documentation

◆ clamped_cosine()

void cugar::Oct_smooth_basis::clamped_cosine ( const Vector3f normal,
const float  w,
float *  coeffs 
)
static

add a weighted basis expansion of a clamped cosine lobe to a given set of coefficients

Parameters
normalinput normal
wscalar weight
coeffsinput/output coefficients

◆ constant()

static void cugar::Oct_smooth_basis::constant ( float  k,
float *  coeffs 
)
inlinestatic

return the basis expansion of a constant

Parameters
kinput constant
coeffsoutput coefficients

◆ eval()

static CUGAR_HOST_DEVICE float cugar::Oct_smooth_basis::eval ( const int32  i,
const Vector3f d 
)
inlinestatic

evaluate the i-th octahedral function

Parameters
ifunction index
dinput direction vector

◆ G()

static float cugar::Oct_smooth_basis::G ( const int32  i,
const int32  j 
)
inlinestatic

return the dot product of the i-th and j-th basis functions

Parameters
ifirst function index
jsecond functio index

◆ integral() [1/2]

static float cugar::Oct_smooth_basis::integral ( const float *  coeffs)
inlinestatic

return the integral of a spherical hamonics function

◆ integral() [2/2]

template<typename Vector_type >
static float cugar::Oct_smooth_basis::integral ( const Vector_type &  coeffs)
inlinestatic

return the integral of a spherical hamonics function

◆ solve()

void cugar::Oct_smooth_basis::solve ( float *  coeffs)
static

solve the linear least squares projection for a set of coefficients

Parameters
coeffsinput projection coefficients

The documentation for this struct was generated from the following files: