Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

toxic::IBDF Class Reference

Bidirectional Distribution Function (BDF). More...

#include <ibdf.h>

Inheritance diagram for toxic::IBDF:

sheep::IClonable< IBDF > toxic::BSDF toxic::IBRDF toxic::IBTDF toxic::LambertianBRDF toxic::PerfectSpecularBRDF List of all members.

Public Member Functions

virtual ~IBDF ()
virtual bool IsDiffuse () const
virtual bool IsSpecular () const
virtual sheep::Real Evaluate (const Context &context, const sheep::Vector3 &incoming, const sheep::Vector3 &outgoing) const=0
virtual sheep::Real EvaluateSpecular (const Context &context, const sheep::Vector3 &incoming, sheep::Vector3 *outgoing) const
virtual void Sample (const Context &context, const sheep::Vector3 &incoming, sheep::Vector3 *outgoing, sheep::Real *prob, sheep::Real *value) const
virtual sheep::Real ComputeScatteringProbability (const sheep::Vector3 &incoming, const sheep::Vector3 &outgoing) const
virtual sheep::Real ComputeReflectance (const Context &context) const
virtual sheep::Real ComputeReflectance (const Context &context, const sheep::Vector3 &incoming) const

Detailed Description

Bidirectional Distribution Function (BDF).

Incoming and outgoing directions are both always expressed in the upper part of the unit hemisphere, and they are always unit-length.

Definition at line 42 of file ibdf.h.


Constructor & Destructor Documentation

virtual toxic::IBDF::~IBDF  )  [inline, virtual]
 

Definition at line 44 of file ibdf.h.


Member Function Documentation

Real IBDF::ComputeReflectance const Context context,
const sheep::Vector3 incoming
const [virtual]
 

Computes and returns the directional hemispherical reflectance. The incoming direction is expressed in local space. Note: this method must be overridden if the IsSpecular() method is defined to return true.

Todo:
Implement.

Reimplemented in toxic::BSDF, toxic::LambertianBRDF, and toxic::PerfectSpecularBRDF.

Definition at line 37 of file ibdf.cpp.

References IsSpecular(), sheep::Vector3::IsUnitLength(), and sheep::Vector3::m_y.

Real IBDF::ComputeReflectance const Context context  )  const [virtual]
 

Computes and returns the hemispherical hemispherical reflectance. Note: this method must be overridden if the IsSpecular() method is defined to return true.

Todo:
Implement.

Reimplemented in toxic::BSDF, toxic::LambertianBRDF, and toxic::PerfectSpecularBRDF.

Definition at line 30 of file ibdf.cpp.

References IsSpecular().

sheep::Real IBDF::ComputeScatteringProbability const sheep::Vector3 incoming,
const sheep::Vector3 outgoing
const [inline, virtual]
 

Computes the probability of scattering from 'incoming' direction to 'outgoing' direction. Both incoming and outgoing directions are expressed in local space. Notes: (1) this method must be overridden if the Sample() method is overridden, (2) this method must return 0.0 if the IsSpecular() method is defined to return true.

Reimplemented in toxic::BSDF, and toxic::PerfectSpecularBRDF.

Definition at line 171 of file ibdf.h.

virtual sheep::Real toxic::IBDF::Evaluate const Context context,
const sheep::Vector3 incoming,
const sheep::Vector3 outgoing
const [pure virtual]
 

Evaluates the function. Both the incoming and outgoing directions are expressed in local space.

Implemented in toxic::BSDF, toxic::LambertianBRDF, and toxic::PerfectSpecularBRDF.

Referenced by toxic::Renderer::compute_direct_illumination(), and toxic::PhotonMap::ComputeRadiance().

sheep::Real IBDF::EvaluateSpecular const Context context,
const sheep::Vector3 incoming,
sheep::Vector3 outgoing
const [inline, virtual]
 

Reimplemented in toxic::BSDF, and toxic::PerfectSpecularBRDF.

Definition at line 138 of file ibdf.h.

Referenced by toxic::Renderer::compute_specular_reflections(), and toxic::BSDF::EvaluateSpecular().

virtual bool toxic::IBDF::IsDiffuse  )  const [inline, virtual]
 

Reimplemented in toxic::BSDF, and toxic::PerfectSpecularBRDF.

Definition at line 46 of file ibdf.h.

Referenced by toxic::Renderer::compute_caustics(), toxic::Renderer::compute_direct_illumination(), toxic::GlobalPhotonTracer::trace_photon(), and toxic::CausticsPhotonTracer::trace_photon().

virtual bool toxic::IBDF::IsSpecular  )  const [inline, virtual]
 

Reimplemented in toxic::BSDF, and toxic::PerfectSpecularBRDF.

Definition at line 47 of file ibdf.h.

Referenced by toxic::Renderer::compute_specular_reflections(), ComputeReflectance(), toxic::BSDF::Insert(), and toxic::CausticsPhotonTracer::trace_photon().

void IBDF::Sample const Context context,
const sheep::Vector3 incoming,
sheep::Vector3 outgoing,
sheep::Real prob,
sheep::Real value
const [inline, virtual]
 

Samples the function in order to obtain an outgoing direction, given an incoming direction. The probability with which the direction has been chosen is also computed. Both incoming and outgoing directions are expressed in local space. Note: this method must be overridden if the IsSpecular() method is defined to return true.

Reimplemented in toxic::BSDF, and toxic::PerfectSpecularBRDF.

Definition at line 146 of file ibdf.h.

Referenced by toxic::BSDF::Sample(), toxic::GlobalPhotonTracer::trace_photon(), and toxic::CausticsPhotonTracer::trace_photon().


The documentation for this class was generated from the following files:
Generated on Tue May 11 01:31:57 2004 for toxic by doxygen 1.3.6