

Classes | |
| struct | MDat_t |
Public Member Functions | |
| glossyMat_t (const color_t &col, const color_t &dcol, float reflect, float diff, float expo, bool as_diffuse) | |
| virtual void | initBSDF (const renderState_t &state, const surfacePoint_t &sp, BSDF_t &bsdfTypes) const |
| virtual color_t | eval (const renderState_t &state, const surfacePoint_t &sp, const vector3d_t &wo, const vector3d_t &wi, BSDF_t bsdfs) const |
| virtual color_t | sample (const renderState_t &state, const surfacePoint_t &sp, const vector3d_t &wo, vector3d_t &wi, sample_t &s) const |
| virtual float | pdf (const renderState_t &state, const surfacePoint_t &sp, const vector3d_t &wo, const vector3d_t &wi, BSDF_t bsdfs) const |
| virtual bool | scatterPhoton (const renderState_t &state, const surfacePoint_t &sp, const vector3d_t &wi, vector3d_t &wo, pSample_t &s) const |
Static Public Member Functions | |
| static material_t * | factory (paraMap_t &, std::list< paraMap_t > &, renderEnvironment_t &) |
Protected Attributes | |
| shaderNode_t * | diffuseS |
| shaderNode_t * | glossyS |
| shaderNode_t * | glossyRefS |
| shaderNode_t * | bumpS |
| color_t | gloss_color |
| color_t | diff_color |
| float | exponent |
| float | exp_u |
| float | exp_v |
| float | reflectivity |
| float | mDiffuse |
| bool | as_diffuse |
| bool | with_diffuse |
| bool | anisotropic |
Definition at line 30 of file glossy_mat.cc.
| glossyMat_t::glossyMat_t | ( | const color_t & | col, | |
| const color_t & | dcol, | |||
| float | reflect, | |||
| float | diff, | |||
| float | expo, | |||
| bool | as_diffuse | |||
| ) |
Definition at line 59 of file glossy_mat.cc.
| color_t glossyMat_t::eval | ( | const renderState_t & | state, | |
| const surfacePoint_t & | sp, | |||
| const vector3d_t & | wo, | |||
| const vector3d_t & | wl, | |||
| BSDF_t | types | |||
| ) | const [virtual] |
evaluate the BSDF for the given components.
| types | the types of BSDFs to be evaluated (e.g. diffuse only, or diffuse and glossy) |
Implements material_t.
Definition at line 89 of file glossy_mat.cc.
| material_t * glossyMat_t::factory | ( | paraMap_t & | params, | |
| std::list< paraMap_t > & | paramList, | |||
| renderEnvironment_t & | render | |||
| ) | [static] |
Definition at line 327 of file glossy_mat.cc.
| void glossyMat_t::initBSDF | ( | const renderState_t & | state, | |
| const surfacePoint_t & | sp, | |||
| BSDF_t & | bsdfTypes | |||
| ) | const [virtual] |
Initialize the BSDF of a material. You must call this with the current surface point first before any other methods (except isTransparent/getTransparency)! The renderstate holds a pointer to preallocated userdata to save data that only depends on the current sp, like texture lookups etc.
| bsdfTypes | returns flags for all bsdf components the material has |
Implements material_t.
Definition at line 74 of file glossy_mat.cc.
| float glossyMat_t::pdf | ( | const renderState_t & | state, | |
| const surfacePoint_t & | sp, | |||
| const vector3d_t & | wo, | |||
| const vector3d_t & | wi, | |||
| BSDF_t | bsdfs | |||
| ) | const [virtual] |
return the pdf for sampling the BSDF with wi and wo
Reimplemented from material_t.
Definition at line 261 of file glossy_mat.cc.
| color_t glossyMat_t::sample | ( | const renderState_t & | state, | |
| const surfacePoint_t & | sp, | |||
| const vector3d_t & | wo, | |||
| vector3d_t & | wi, | |||
| sample_t & | s | |||
| ) | const [virtual] |
take a sample from the BSDF, given a 2-dimensional sample value and the BSDF types to be sampled from
| s | s1, s2 and flags members give necessary information for creating the sample, pdf and sampledFlags need to be returned |
Implements material_t.
Definition at line 133 of file glossy_mat.cc.
| bool glossyMat_t::scatterPhoton | ( | const renderState_t & | state, | |
| const surfacePoint_t & | sp, | |||
| const vector3d_t & | wi, | |||
| vector3d_t & | wo, | |||
| pSample_t & | s | |||
| ) | const [virtual] |
specialized function for photon mapping. Default function uses the sample function, which will do fine for most materials unless there's a less expensive way or smarter scattering approach
Reimplemented from material_t.
Definition at line 308 of file glossy_mat.cc.
bool glossyMat_t::anisotropic [protected] |
Definition at line 56 of file glossy_mat.cc.
bool glossyMat_t::as_diffuse [protected] |
Definition at line 56 of file glossy_mat.cc.
shaderNode_t* glossyMat_t::bumpS [protected] |
Definition at line 51 of file glossy_mat.cc.
color_t glossyMat_t::diff_color [protected] |
Definition at line 52 of file glossy_mat.cc.
shaderNode_t* glossyMat_t::diffuseS [protected] |
Definition at line 48 of file glossy_mat.cc.
float glossyMat_t::exp_u [protected] |
Definition at line 53 of file glossy_mat.cc.
float glossyMat_t::exp_v [protected] |
Definition at line 53 of file glossy_mat.cc.
float glossyMat_t::exponent [protected] |
Definition at line 53 of file glossy_mat.cc.
color_t glossyMat_t::gloss_color [protected] |
Definition at line 52 of file glossy_mat.cc.
shaderNode_t* glossyMat_t::glossyRefS [protected] |
Definition at line 50 of file glossy_mat.cc.
shaderNode_t* glossyMat_t::glossyS [protected] |
Definition at line 49 of file glossy_mat.cc.
float glossyMat_t::mDiffuse [protected] |
Definition at line 55 of file glossy_mat.cc.
float glossyMat_t::reflectivity [protected] |
Definition at line 54 of file glossy_mat.cc.
bool glossyMat_t::with_diffuse [protected] |
Definition at line 56 of file glossy_mat.cc.
1.6.1