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

Detailed description

An octahedral basis: the basis functions correspond to the characteristic functions of the intersection of the octants and the sphere, and do not overlap.

#include <oct.h>

Static Public Methods

CUGAR_HOST static CUGAR_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 void solve (float *coeffs)
 

Static Public Members

static const int32 COEFFS = 8
 

Member Function Documentation

◆ clamped_cosine()

void cugar::Oct_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_basis::constant ( float  k,
float *  coeffs 
)
inlinestatic

return the basis expansion of a constant

Parameters
kinput constant
coeffsoutput coefficients

◆ eval()

CUGAR_HOST static CUGAR_DEVICE float cugar::Oct_basis::eval ( const int32  i,
const Vector3f d 
)
inlinestatic

evaluate the i-th octahedral function

Parameters
ifunction index
dinput direction vector

◆ integral() [1/2]

static float cugar::Oct_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_basis::integral ( const Vector_type &  coeffs)
inlinestatic

return the integral of a spherical hamonics function

◆ solve()

static void cugar::Oct_basis::solve ( float *  coeffs)
inlinestatic

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: