#include <DiffuseBRDF.h>
Inheritance diagram for DiffuseBRDF:
Public Types | |
enum | RetVal { NONZERO_CONTRIB = 1, BAD_PARAMS = 2, NL_NEGATIVE = 3, NV_NEGATIVE = 4, NL_OR_NV_NEGATIVE = 5, ZERO_CONTRIB = 6 } |
Public Member Functions | |
DiffuseBRDF (bool isotropic) | |
virtual RetVal | reflectance (const MatVisitor &visitor, const Vector3 *L, const Vector3 *V, const Vector3 *N, Vector3 &color)=0 |
virtual RetVal | reflectanceVNL (const MatVisitor &visitor, const Vector3 *L, const Vector3 *V, const Vector3 *N, double NV, double NL, Vector3 &color)=0 |
virtual RetVal | reflectanceNL (const MatVisitor &visitor, const Vector3 *L, const Vector3 *V, const Vector3 *N, double NL, Vector3 &color)=0 |
virtual BRDF * | clone () const =0 |
virtual double | albedo (const MatVisitor &visitor, const Vector3 &N, const Vector3 *V) const =0 |
virtual void | importanceSample (const MatVisitor &visitor, const Vector3 &D, double r1, double r2, Vector3 &dir, double *pPDFVal)=0 |
virtual Vector2 | dir2uv (const MatVisitor &visitor, const Vector3 &N, const Vector3 &D) const =0 |
_isIsotropic (isotropic) | |
bool | diffuse (void) const |
bool | specular (void) const |
bool | isotropic (void) const |
bool | anisotropic (void) const |
Public Attributes | |
__pad0__: _isDiffuse(diffuse) | |
Protected Member Functions | |
virtual void | _duplicate_attributes (const BRDF &src) |
Protected Attributes | |
bool | _isDiffuse |
bool | _isIsotropic |
Definition at line 16 of file DiffuseBRDF.h.
|
|
Contructor
Definition at line 29 of file DiffuseBRDF.h. |
|
Reimplemented from BRDF. Reimplemented in LambertianBRDF. Definition at line 18 of file DiffuseBRDF.h. References BRDF::_duplicate_attributes(). Referenced by LambertianBRDF::_duplicate_attributes(). |
|
|
|
Albedo for importance sampling strategies.
Implements BRDF. Implemented in LambertianBRDF. |
|
|
|
Duplicates the BRDF Implements BRDF. Implemented in LambertianBRDF. |
|
|
|
Gets direction in global coords and returns its generating "random" numbers (i.e. the inverse function to importanceSample())
Implements BRDF. Implemented in LambertianBRDF. |
|
Point sampling interface - importance sampling. This method gets two random numbers and preffered direction of random sample and selects amd returns random direction. Energy contribution gained from such random directions should be laer devided by average spectral reflectance (e.g. visitor.avgDiffuse() or visitor.avgSpecular()) in order to account for the fact that the reflectance should have used different values for individual spectrums (e.g. RGB)
Implements BRDF. Implemented in LambertianBRDF. |
|
|
|
Computes and returns actual reflectance.
Implements BRDF. Implemented in LambertianBRDF. |
|
Computes and returns actual reflectance. This variant speeds up the computation using given precomputed dot-product of N and L
Implements BRDF. Implemented in LambertianBRDF. |
|
Computes and returns actual reflectance. This variant speeds up the computation using given precomputed dot-products of N, V and L
Implements BRDF. Implemented in LambertianBRDF. |
|
|
|
Contructor
|
|
Definition at line 32 of file BRDF.h. Referenced by BRDF::_duplicate_attributes(). |
|
Definition at line 33 of file BRDF.h. Referenced by BRDF::_duplicate_attributes(). |