ALTA  alpha
Public Member Functions | Protected Member Functions | List of all members
WalterSmith Class Reference

Detailed Description

This approximation is the correct one and users shoud NOT use the one introduced by Schlick, which is available in alta in the nonlinear_shadowing_schlick plugin

This plugin implements Equations (26) and (27) of the paper "Microfacet Models for Refraction" from Walter et al. (EGSR 2007) Walter introduces the correct rational approximation of the Smith term

This plugingimplements the shadowing Term \( G(view,light,half)\) as follows:

\(G(view,light,half) = G_1(view,half) * G_1(light, half) \) where G_1 is approximated by the following rational functions:

\(G_1( k, half) = \chi\Big( \frac{k \cdot half}{k \cdot normal} \Big) \)

Author
Romain Pacanowski romai.nosp@m.n.pa.nosp@m.canow.nosp@m.ski@.nosp@m.insti.nosp@m.tuto.nosp@m.ptiqu.nosp@m.e.fr
Todo:
Finish implementation and documentation

#include <function.hpp>

Collaboration diagram for WalterSmith:
Collaboration graph
[legend]

Public Member Functions

 WalterSmith (const alta::parameters &)
 
virtual bool load (std::istream &in)
 Load function specific files.
 
virtual void save_call (std::ostream &out, const arguments &args) const
 default non_linear export. It will dump the parameters in order but won't assign names for the function nor parameters.
 
virtual void save_body (std::ostream &out, const arguments &args) const
 save function specific data. This has no use for ALTA exportbut allows to factorize the code in the C++ or matlab export by defining function calls that are common to all the plugins. More...
 
- Public Member Functions inherited from alta::nonlinear_function
 nonlinear_function (const parameters &params)
 
virtual void bootstrap (const ptr< data >, const arguments &args)
 Provide a first rough fit of the function. More...
 
virtual vec getParametersMax () const
 get the maximum value for all the parameters in a vector format. The maximum vector and the parameter vector have the same indexing.
 
- Public Member Functions inherited from alta::function
 function (const parameters &params)
 
virtual ~function ()
 Destructor function needed when using shared_ptr.
 
virtual void save (const std::string &filename, const arguments &args) const
 Save the current function to a specific file type, args can be used to differenciate the type of export. More...
 
virtual void save_header (std::ostream &out, const arguments &args) const
 save the header of the output function file. The header should store general information about the fit such as the command line used the dimension of the fit. L2 and L_inf distance could be added here.
 
double L2_distance (const ptr< data > &d) const
 L2 norm to data. More...
 
double Linf_distance (const ptr< data > &d) const
 Linf norm to data. More...
 
virtual void setMin (const vec &min)
 
virtual void setMax (const vec &max)
 
virtual vec min () const
 
virtual vec max () const
 
const parametersparametrization () const
 
void setParametrization (const parameters &p)
 

Protected Member Functions

virtual vec operator() (const vec &x) const
 
virtual vec value (const vec &x) const
 
virtual int nbParameters () const
 Number of parameters to this non-linear function.
 
virtual vec parameters () const
 Get the vector of parameters for the function.
 
virtual void setParameters (const vec &p)
 Update the vector of parameters for the function.
 
virtual vec getParametersMin () const
 Get the vector of min parameters for the function.
 
virtual vec parametersJacobian (const vec &x) const
 Obtain the derivatives of the function with respect to the parameters.
 
virtual void bootstrap (const ptr< data > d, const arguments &args)
 Boostrap the function by defining the diffuse term.
 

Additional Inherited Members

- Protected Attributes inherited from alta::function
parameters _parameters
 
vec _min
 
vec _max
 

Member Function Documentation

void WalterSmith::save_body ( std::ostream &  out,
const arguments args 
) const
virtual

save function specific data. This has no use for ALTA export but allows to factorize the code in the C++ or matlab export by defining function calls that are common to all the plugins.

Reimplemented from alta::function.


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