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

Detailed description

Implements a Lambertian edf.

#include <lambert_edf.h>

Inheritance diagram for cugar::LambertEdf:
Edf

Public Methods

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE LambertEdf (const Vector3f _color)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector3f f (const DifferentialGeometry &geometry, const Vector3f in, const Vector3f out) const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector3f f_over_p (const DifferentialGeometry &geometry, const Vector3f in, const Vector3f out) const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float p (const DifferentialGeometry &geometry, const Vector3f in, const Vector3f out, const SphericalMeasure measure=kProjectedSolidAngle) const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void sample (const Vector2f u, const DifferentialGeometry &geometry, const Vector3f in, Vector3f &out, Vector3f &g, float &p, float &p_proj) const
 
template<typename RandomGeneratorT >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool invert (const DifferentialGeometry &geometry, const Vector3f V, const Vector3f L, RandomGeneratorT &random, Vector3f &z, float &p, float &p_proj) const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void inverse_pdf (const DifferentialGeometry &geometry, const Vector3f V, const Vector3f L, const Vector3f u, float &p, float &p_proj) const
 

Public Members

Vector3f color
 

Member Function Documentation

◆ f()

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector3f cugar::LambertEdf::f ( const DifferentialGeometry geometry,
const Vector3f  in,
const Vector3f  out 
) const
inline

evaluate the EDF f(in,out)

◆ f_over_p()

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector3f cugar::LambertEdf::f_over_p ( const DifferentialGeometry geometry,
const Vector3f  in,
const Vector3f  out 
) const
inline

evaluate the EDF/pdf ratio f(in,out)/p(in,out) wrt projected solid angle

◆ inverse_pdf()

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::LambertEdf::inverse_pdf ( const DifferentialGeometry geometry,
const Vector3f  V,
const Vector3f  L,
const Vector3f  u,
float &  p,
float &  p_proj 
) const
inline

given V and L and u, compute the probability of sampling u by inversion of V and L

◆ invert()

template<typename RandomGeneratorT >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool cugar::LambertEdf::invert ( const DifferentialGeometry geometry,
const Vector3f  V,
const Vector3f  L,
RandomGeneratorT &  random,
Vector3f z,
float &  p,
float &  p_proj 
) const
inline

given V and L, invert the sampling functions used to generate L from V

◆ p()

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float cugar::LambertEdf::p ( const DifferentialGeometry geometry,
const Vector3f  in,
const Vector3f  out,
const SphericalMeasure  measure = kProjectedSolidAngle 
) const
inline

evaluate the pdf of sampling L given V, p(L|V) = p(V,L)

◆ sample()

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::LambertEdf::sample ( const Vector2f  u,
const DifferentialGeometry geometry,
const Vector3f  in,
Vector3f out,
Vector3f g,
float &  p,
float &  p_proj 
) const
inline

sample out given in and return both the pdf p and the value g = f/p, wrt projected solid angle


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