Abstract participating medium. More...
#include <mitsuba/render/medium.h>
Inheritance diagram for mitsuba::Medium:Public Member Functions | |
| virtual const Class * | getClass () const |
| Retrieve this object's class. More... | |
Medium sampling strategy | |
| virtual bool | sampleDistance (const Ray &ray, MediumSamplingRecord &mRec, Sampler *sampler) const =0 |
| Sample a distance along the ray segment [mint, maxt]. More... | |
| virtual void | eval (const Ray &ray, MediumSamplingRecord &mRec) const =0 |
| Compute the 1D density of sampling distance ray.maxt along the ray using the sampling strategy implemented by sampleDistance. More... | |
Functions for querying the medium | |
| virtual Spectrum | evalTransmittance (const Ray &ray, Sampler *sampler=NULL) const =0 |
| Compute the transmittance along a ray segment. More... | |
| const PhaseFunction * | getPhaseFunction () const |
| Return the phase function of this medium. More... | |
| virtual bool | isHomogeneous () const =0 |
| Determine whether the medium is homogeneous. More... | |
| const Spectrum & | getSigmaA () const |
| For homogeneous media: return the absorption coefficient. More... | |
| const Spectrum & | getSigmaS () const |
| For homogeneous media: return the scattering coefficient. More... | |
| const Spectrum & | getSigmaT () const |
| For homogeneous media: return the extinction coefficient. More... | |
Miscellaneous | |
| virtual void | configure () |
| Configure the object (called once after construction and addition of all child ConfigurableObject instances). More... | |
| virtual void | serialize (Stream *stream, InstanceManager *manager) const |
| Serialize this medium to a stream. More... | |
| virtual void | addChild (const std::string &name, ConfigurableObject *child) |
| Add a child ConfigurableObject. More... | |
| void | addChild (ConfigurableObject *child) |
| Add an unnamed child. More... | |
| virtual std::string | toString () const =0 |
| Return a string representation. More... | |
Public Member Functions inherited from mitsuba::NetworkedObject | |
| virtual void | bindUsedResources (ParallelProcess *proc) const |
| Bind any used resources to the process proc. More... | |
| virtual void | wakeup (ConfigurableObject *parent, std::map< std::string, SerializableObject * > ¶ms) |
| Retrieve any required resources. More... | |
Public Member Functions inherited from mitsuba::ConfigurableObject | |
| virtual void | setParent (ConfigurableObject *parent) |
| Notify the ConfigurableObject instance about its parent object. More... | |
| void | addChild (ConfigurableObject *child) |
| Add an unnamed child. 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::NetworkedObject | |
| 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 | |
| Medium (const Properties &props) | |
| Create a new participating medium instance. More... | |
| Medium (Stream *stream, InstanceManager *manager) | |
| Unserialize a participating medium. More... | |
| virtual | ~Medium () |
| Virtual destructor. More... | |
Protected Member Functions inherited from mitsuba::NetworkedObject | |
| virtual | ~NetworkedObject () |
| Virtual destructor. More... | |
| NetworkedObject (const Properties &props) | |
| Constructor. More... | |
| NetworkedObject (Stream *stream, InstanceManager *manager) | |
| Unserialize a configurable object. 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 | |
| ref< PhaseFunction > | m_phaseFunction |
| Spectrum | m_sigmaA |
| Spectrum | m_sigmaS |
| Spectrum | m_sigmaT |
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 participating medium.
|
protected |
Create a new participating medium instance.
|
protected |
Unserialize a participating medium.
|
inlineprotectedvirtual |
Virtual destructor.
|
virtual |
Add a child ConfigurableObject.
Reimplemented from mitsuba::ConfigurableObject.
|
inline |
Add an unnamed child.
|
virtual |
Configure the object (called once after construction and addition of all child ConfigurableObject instances).
Reimplemented from mitsuba::ConfigurableObject.
|
pure virtual |
Compute the 1D density of sampling distance ray.maxt along the ray using the sampling strategy implemented by sampleDistance.
The function computes the continuous densities in the case of a successful sampleDistance() invocation (in both directions), as well as the Dirac delta density associated with a failure. For convenience, it also stores the transmittance along the supplied ray segment within mRec.
|
pure virtual |
Compute the transmittance along a ray segment.
Computes the transmittance along a ray segment [mint, maxt] associated with the ray. It is assumed that the ray has a normalized direction value.
|
virtual |
Retrieve this object's class.
Reimplemented from mitsuba::NetworkedObject.
|
inline |
Return the phase function of this medium.
|
inline |
For homogeneous media: return the absorption coefficient.
|
inline |
For homogeneous media: return the scattering coefficient.
|
inline |
For homogeneous media: return the extinction coefficient.
|
pure virtual |
Determine whether the medium is homogeneous.
|
pure virtual |
Sample a distance along the ray segment [mint, maxt].
Should ideally importance sample with respect to the transmittance. It is assumed that the ray has a normalized direction value.
| ray | Ray, along which a distance should be sampled |
| mRec | Medium sampling record to be filled with the result |
false if the maximum distance was exceeded, or if no interaction inside the medium could be sampled.
|
virtual |
Serialize this medium to a stream.
Reimplemented from mitsuba::NetworkedObject.
|
pure virtual |
Return a string representation.
Reimplemented from Object.
|
protected |
|
protected |
|
protected |
|
protected |
|
static |