Abstract phase function. More...
#include <mitsuba/render/phase.h>
Public Types | |
enum | EPhaseFunctionType { EIsotropic = 0x01, EAngleDependence = 0x04, EAnisotropic = 0x02, ENonSymmetric = 0x08 } |
Public Member Functions | |
unsigned int | getType () const |
Return information flags of this phase function, combined binary OR. More... | |
virtual void | configure () |
Configure the material (called after construction by the XML parser) More... | |
virtual Float | eval (const PhaseFunctionSamplingRecord &pRec) const =0 |
Evaluate the phase function for an outward-pointing pair of directions (wi, wo) More... | |
virtual Float | sample (PhaseFunctionSamplingRecord &pRec, Sampler *sampler) const =0 |
Sample the phase function and return the importance weight (i.e. the value of the phase function divided by the probability density of the sample). More... | |
virtual Float | sample (PhaseFunctionSamplingRecord &pRec, Float &pdf, Sampler *sampler) const =0 |
Sample the phase function and return the probability density and the importance weight of the sample (i.e. the value of the phase function divided by the probability density) More... | |
virtual Float | pdf (const PhaseFunctionSamplingRecord &pRec) const |
Calculate the probability of sampling wo (given wi). More... | |
virtual bool | needsDirectionallyVaryingCoefficients () const |
Does this phase function require directionally varying scattering and extinction coefficients? More... | |
virtual Float | sigmaDir (Float cosTheta) const |
For anisotropic media: evaluate the directionally varying component of the scattering and absorption coefficients. More... | |
virtual Float | sigmaDirMax () const |
Returns the maximum value take on on by sigmaDirMax(). This is useful when implementing Woodcock tracking. More... | |
virtual Float | getMeanCosine () const |
Returns the mean cosine (often referred to by the constant "g") of this phase function. More... | |
virtual std::string | toString () const =0 |
Return a string representation. More... | |
virtual const Class * | getClass () const |
Retrieve this object's class. More... | |
Public Member Functions inherited from mitsuba::ConfigurableObject | |
virtual void | setParent (ConfigurableObject *parent) |
Notify the ConfigurableObject instance about its parent object. More... | |
virtual void | addChild (const std::string &name, ConfigurableObject *child) |
Add a child (default implementation throws an error) More... | |
void | addChild (ConfigurableObject *child) |
Add an unnamed child. More... | |
virtual void | serialize (Stream *stream, InstanceManager *manager) const |
Serialize this object to a binary data stream. More... | |
const std::string & | getID () const |
Return the identifier associated with this instance (or "unnamed") More... | |
void | setID (const std::string &name) |
Set the identifier associated with this instance. More... | |
const Properties & | getProperties () const |
Return the properties object that was originally used to create this instance. More... | |
Public Member Functions inherited from mitsuba::SerializableObject | |
SerializableObject (Stream *stream, InstanceManager *manager) | |
Unserialize a serializable object. More... | |
Public Member Functions inherited from Object | |
Object () | |
Construct a new object. More... | |
int | getRefCount () const |
Return the current reference count. More... | |
void | incRef () const |
Increase the reference count of the object by one. More... | |
void | decRef (bool autoDeallocate=true) const |
Decrease the reference count of the object and possibly deallocate it. More... | |
Static Public Attributes | |
static Class * | m_theClass |
Static Public Attributes inherited from mitsuba::ConfigurableObject | |
static Class * | m_theClass |
Static Public Attributes inherited from mitsuba::SerializableObject | |
static Class * | m_theClass |
Static Public Attributes inherited from Object | |
static Class * | m_theClass |
Pointer to the object's class descriptor. More... | |
Protected Member Functions | |
PhaseFunction (const Properties &props) | |
Create a new phase function instance. More... | |
PhaseFunction (Stream *stream, InstanceManager *manager) | |
Unserialize a phase function. More... | |
virtual | ~PhaseFunction () |
Virtual destructor. More... | |
Protected Member Functions inherited from mitsuba::ConfigurableObject | |
virtual | ~ConfigurableObject () |
Virtual destructor. More... | |
ConfigurableObject (const Properties &props) | |
Construct a configurable object. More... | |
ConfigurableObject (Stream *stream, InstanceManager *manager) | |
Unserialize a configurable object. More... | |
Protected Member Functions inherited from mitsuba::SerializableObject | |
SerializableObject () | |
Construct a serializable object. More... | |
virtual | ~SerializableObject () |
Virtual deconstructor. More... | |
Protected Member Functions inherited from Object | |
virtual | ~Object () |
Virtual private deconstructor. (Will only be called by ref) More... | |
Protected Attributes | |
unsigned int | m_type |
Protected Attributes inherited from mitsuba::ConfigurableObject | |
Properties | m_properties |
Additional Inherited Members | |
Static Public Member Functions inherited from Object | |
static void | staticInitialization () |
Initializes the built-in reference count debugger (if enabled) More... | |
static void | staticShutdown () |
Free the memory taken by staticInitialization() More... | |
Abstract phase function.
Enumerator | |
---|---|
EIsotropic |
Completely isotropic 1/(4 pi) phase function. |
EAngleDependence |
The phase function only depends on |
EAnisotropic |
The opposite of EAngleDependence (there is an arbitrary dependence) |
ENonSymmetric |
The phase function is non symmetric, i.e. eval(wi,wo) != eval(wo, wi) |
|
inlineprotected |
Create a new phase function instance.
|
inlineprotected |
Unserialize a phase function.
|
inlineprotectedvirtual |
Virtual destructor.
|
virtual |
Configure the material (called after construction by the XML parser)
Reimplemented from mitsuba::ConfigurableObject.
|
pure virtual |
Evaluate the phase function for an outward-pointing pair of directions (wi, wo)
|
virtual |
Retrieve this object's class.
Reimplemented from mitsuba::ConfigurableObject.
|
virtual |
Returns the mean cosine (often referred to by the constant "g") of this phase function.
The default implementation throws an exception
|
inline |
Return information flags of this phase function, combined binary OR.
|
virtual |
Does this phase function require directionally varying scattering and extinction coefficients?
This is used to implement rendering of media that have an anisotropic structure (cf. "A radiative transfer framework for rendering materials with anisotropic structure" by Wenzel Jakob, Adam Arbree, Jonathan T. Moon, Kavita Bala, and Steve Marschner, SIGGRAPH 2010)
|
virtual |
Calculate the probability of sampling wo (given wi).
Assuming that the phase function can be sampled exactly, the default implementation just evaluates eval()
|
pure virtual |
Sample the phase function and return the importance weight (i.e. the value of the phase function divided by the probability density of the sample).
When the probability density is not explicitly required, this function should be preferred, since it is potentially faster by making use of cancellations during the division.
pRec | A phase function query record |
sampler | A sample generator |
|
pure virtual |
Sample the phase function and return the probability density and the importance weight of the sample (i.e. the value of the phase function divided by the probability density)
pRec | A phase function query record |
sampler | A sample generator |
Will record the probability with respect to solid angles |
For anisotropic media: evaluate the directionally varying component of the scattering and absorption coefficients.
cosTheta | Angle between the axis of rotational symmetry and the direction of propagation |
|
virtual |
Returns the maximum value take on on by sigmaDirMax(). This is useful when implementing Woodcock tracking.
|
pure virtual |
Return a string representation.
Reimplemented from Object.
|
static |
|
protected |