Lightmetrica  0.0.1.50dbee3 (yosakoi)
 All Classes Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Public Attributes | List of all members
BPTSubpath Class Reference

#include <bpt.subpath.h>

Public Member Functions

LM_PUBLIC_API BPTSubpath (TransportDirection transportDir)
 
LM_PUBLIC_API void Clear ()
 
LM_PUBLIC_API void DebugPrint () const
 
LM_PUBLIC_API void DebugPrint (size_t n) const
 
LM_PUBLIC_API void Sample (const Scene &scene, Sampler &sampler, BPTPathVertexPool &pool, int rrDepth, int maxPathVertices)
 
Math::Vec3 EvaluateSubpathAlpha (int vs, Math::Vec2 &rasterPosition) const
 
Math::Float SubpathSelectionProbability (int vs) const
 
LM_PUBLIC_API int NumVertices () const
 
LM_PUBLIC_API BPTPathVertexVertex (int i) const
 

Public Attributes

TransportDirection transportDir
 
std::vector< BPTPathVertex * > vertices
 

Detailed Description

BPT sub-path. Represents a light sub-path or eye sub-path.

Member Function Documentation

void BPTSubpath::Clear ( )

Clear. Clears sampled sub-path.

void BPTSubpath::DebugPrint ( ) const

Debug print. Prints contents of the sub-path.

void BPTSubpath::DebugPrint ( size_t  n) const

Debug print (by # of vertices). Print #n vertices.

Parameters
nNumber of vertices.
Math::Vec3 BPTSubpath::EvaluateSubpathAlpha ( int  vs,
Math::Vec2 &  rasterPosition 
) const

Evaluate alpha of subpaths. The function is called from #EvaluateUnweightContribution.

Parameters
vsNumber of vertices in subpath (#s or #t).
rasterPositionRaster position.
Returns
Evaluated value.
int BPTSubpath::NumVertices ( ) const

Get number of vertices. This function is used for testing.

Returns
Number of vertices.
void BPTSubpath::Sample ( const Scene scene,
Sampler sampler,
BPTPathVertexPool pool,
int  rrDepth,
int  maxPathVertices 
)

Sample a subpath. Sample eye subpath or light subpath according to #transportDir.

Parameters
sceneScene.
samplerSampler.
poolMemory pool for path vertex.
rrDepthDepth to begin Russian roulette.
maxPathVerticesMaximum number of vertex of subpath.
Math::Float BPTSubpath::SubpathSelectionProbability ( int  vs) const

Evalaute subpath selection pribability.

Parameters
vsNumber of vertices in subpath (#s or #t).
Returns
Evaluated probability.
BPTPathVertex * BPTSubpath::Vertex ( int  i) const

Get i-th vertex. This function is used for testing.

Parameters
iIndex.
Returns
Vertex.

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