Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::ManifoldPerturbation Class Reference

Specular manifold perturbation strategy. More...

#include <mitsuba/bidir/mut_manifold.h>

+ Inheritance diagram for mitsuba::ManifoldPerturbation:

Public Member Functions

 ManifoldPerturbation (const Scene *scene, Sampler *sampler, MemoryPool &pool, Float probFactor, bool enableOffsetManifolds, bool enableSpecularMedia, Float avgAngleChangeSurface=0, Float avgAngleChangeMedium=0)
 Construct a new specular manifold perturbation strategy. More...
 
virtual const ClassgetClass () const
 Retrieve this object's class. More...
 
Implementation of the Mutator interface
EMutationType getType () const
 What kind of mutations does this mutator perform? More...
 
Float suitability (const Path &path) const
 Determine the general "suitability" of this mutator for a given kind of path. More...
 
bool sampleMutation (Path &source, Path &proposal, MutationRecord &muRec, const MutationRecord &sourceMuRec)
 Given a path, this function produces a new proposal according to the internally implemented mutation strategy. More...
 
Float Q (const Path &source, const Path &proposal, const MutationRecord &muRec) const
 For a pair of paths, this function computes the inverse transition probability (matching the Q term in [Veach 97]) More...
 
void accept (const MutationRecord &muRec)
 Record an accepted mutation. 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...
 
virtual std::string toString () const
 Return a human-readable string representation of the object's contents. More...
 

Static Public Attributes

static Classm_theClass
 
- Static Public Attributes inherited from mitsuba::MutatorBase
static Classm_theClass
 
- Static Public Attributes inherited from mitsuba::Mutator
static Classm_theClass
 
- Static Public Attributes inherited from Object
static Classm_theClass
 Pointer to the object's class descriptor. More...
 

Protected Member Functions

virtual ~ManifoldPerturbation ()
 Virtual destructor. More...
 
bool sampleMutationRecord (const Path &source, int &a, int &b, int &c, int &step)
 Helper function for choosing mutation strategies. More...
 
Float nonspecularProbSurface (Float alpha) const
 
Float nonspecularProbMedium (Float g) const
 
Float nonspecularProb (const PathVertex *vertex) const
 
Float specularProb (const PathVertex *vertex) const
 
int getSpecularChainEnd (const Path &path, int pos, int step)
 
- Protected Member Functions inherited from mitsuba::MutatorBase
 MutatorBase ()
 Protected constructor. More...
 
virtual ~MutatorBase ()
 Virtual destructor. More...
 
Float perturbMediumDistance (Sampler *sampler, const PathVertex *vertex)
 Perturb a distance within a medium. More...
 
Float pdfMediumPerturbation (const PathVertex *oldVertex, const PathEdge *oldEdge, const PathEdge *newEdge) const
 Density function of perturbMediumDistance. More...
 
- Protected Member Functions inherited from mitsuba::Mutator
virtual ~Mutator ()
 Virtual destructor. More...
 
- Protected Member Functions inherited from Object
virtual ~Object ()
 Virtual private deconstructor. (Will only be called by ref) More...
 

Protected Attributes

ref< const Scenem_scene
 
ref< Samplerm_sampler
 
ref< SpecularManifoldm_manifold
 
MemoryPoolm_pool
 
Float m_probFactor
 
Float m_probFactor2
 
bool m_enableOffsetManifolds
 
bool m_enableSpecularMedia
 
- Protected Attributes inherited from mitsuba::MutatorBase
Float m_mediumDensityMultiplier
 

Static Protected Attributes

static Float m_thetaDiffSurface
 
static Float m_thetaDiffMedium
 
static int m_thetaDiffSurfaceSamples
 
static int m_thetaDiffMediumSamples
 
static Mutexm_thetaDiffMutex
 

Additional Inherited Members

- Public Types inherited from mitsuba::Mutator
enum  EMutationType {
  EBidirectionalMutation = 0, ELensPerturbation, ELensSubpathMutation, EIndependentMutation,
  ECausticPerturbation, EMultiChainPerturbation, EManifoldPerturbation, EMutationTypeCount
}
 Specifies the type of mutation implemented by the mutator. More...
 
- 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...
 

Detailed Description

Specular manifold perturbation strategy.

Author
Wenzel Jakob

Constructor & Destructor Documentation

mitsuba::ManifoldPerturbation::ManifoldPerturbation ( const Scene scene,
Sampler sampler,
MemoryPool pool,
Float  probFactor,
bool  enableOffsetManifolds,
bool  enableSpecularMedia,
Float  avgAngleChangeSurface = 0,
Float  avgAngleChangeMedium = 0 
)

Construct a new specular manifold perturbation strategy.

Parameters
sceneA pointer to the underlying scene
samplerA sample generator
poolA memory pool used to allocate new path vertices and edges
virtual mitsuba::ManifoldPerturbation::~ManifoldPerturbation ( )
protectedvirtual

Virtual destructor.

Member Function Documentation

void mitsuba::ManifoldPerturbation::accept ( const MutationRecord muRec)
virtual

Record an accepted mutation.

This function exists to allow mutators to track their acceptance rate and other statistics.

Implements mitsuba::Mutator.

virtual const Class* mitsuba::ManifoldPerturbation::getClass ( ) const
virtual

Retrieve this object's class.

Reimplemented from mitsuba::MutatorBase.

int mitsuba::ManifoldPerturbation::getSpecularChainEnd ( const Path path,
int  pos,
int  step 
)
protected
EMutationType mitsuba::ManifoldPerturbation::getType ( ) const
virtual

What kind of mutations does this mutator perform?

Implements mitsuba::Mutator.

Float mitsuba::ManifoldPerturbation::nonspecularProb ( const PathVertex vertex) const
protected
Float mitsuba::ManifoldPerturbation::nonspecularProbMedium ( Float  g) const
protected
Float mitsuba::ManifoldPerturbation::nonspecularProbSurface ( Float  alpha) const
protected
Float mitsuba::ManifoldPerturbation::Q ( const Path source,
const Path proposal,
const MutationRecord muRec 
) const
virtual

For a pair of paths, this function computes the inverse transition probability (matching the Q term in [Veach 97])

Parameters
sourceA path data structure containing the original path
proposalA path data structure containing the proposed mutated path
muRecData record that describes the mutation strategy, which transformed source to proposal.

Implements mitsuba::Mutator.

bool mitsuba::ManifoldPerturbation::sampleMutation ( Path source,
Path proposal,
MutationRecord muRec,
const MutationRecord sourceMuRec 
)
virtual

Given a path, this function produces a new proposal according to the internally implemented mutation strategy.

Parameters
sourceThe sampling strategy implemented by the mutator will condition on this path.
proposalPath data structure to be filled with the proposed mutated path
muRecData record that describes the sampled mutation strategy
sourceMuRecData record that describes the last successful mutation strategy (for the source path)
Returns
true upon success. When the sampling step is unsuccessful (this could happen due to various reasons), the function returns false.

Implements mitsuba::Mutator.

bool mitsuba::ManifoldPerturbation::sampleMutationRecord ( const Path source,
int &  a,
int &  b,
int &  c,
int &  step 
)
protected

Helper function for choosing mutation strategies.

Float mitsuba::ManifoldPerturbation::specularProb ( const PathVertex vertex) const
inlineprotected
Float mitsuba::ManifoldPerturbation::suitability ( const Path path) const
virtual

Determine the general "suitability" of this mutator for a given kind of path.

Implements mitsuba::Mutator.

Member Data Documentation

bool mitsuba::ManifoldPerturbation::m_enableOffsetManifolds
protected
bool mitsuba::ManifoldPerturbation::m_enableSpecularMedia
protected
ref<SpecularManifold> mitsuba::ManifoldPerturbation::m_manifold
mutableprotected
MemoryPool& mitsuba::ManifoldPerturbation::m_pool
protected
Float mitsuba::ManifoldPerturbation::m_probFactor
protected
Float mitsuba::ManifoldPerturbation::m_probFactor2
protected
ref<Sampler> mitsuba::ManifoldPerturbation::m_sampler
protected
ref<const Scene> mitsuba::ManifoldPerturbation::m_scene
protected
Class* mitsuba::ManifoldPerturbation::m_theClass
static
Float mitsuba::ManifoldPerturbation::m_thetaDiffMedium
staticprotected
int mitsuba::ManifoldPerturbation::m_thetaDiffMediumSamples
staticprotected
Mutex* mitsuba::ManifoldPerturbation::m_thetaDiffMutex
staticprotected
Float mitsuba::ManifoldPerturbation::m_thetaDiffSurface
staticprotected
int mitsuba::ManifoldPerturbation::m_thetaDiffSurfaceSamples
staticprotected

The documentation for this class was generated from the following file: