public

Inheritance Graph

graph BT
	AdaptiveGlobalVisibilitySampling
	click AdaptiveGlobalVisibilitySampling "classMinSG_1_1AGVS_1_1AdaptiveGlobalVisibilitySampling"

Description

Implementation of Adaptive Global Visibility Sampling.

Based on the article: Jiri Bittner, Oliver Mattausch, Peter Wonka, Vlastimil Havran, Michael Wimmer: Adaptive global visibility sampling. ACM Transactions on Graphics, 28, 3, article 94, 2009.

Note: This implementation is based on the article only. No existing code was used for this implementation.

Author: Benjamin Eikel

Date: 2013-02-22

Classes

   
struct MinSG::AGVS::AdaptiveGlobalVisibilitySampling::Implementation

Public Functions

   
   
  AdaptiveGlobalVisibilitySampling( GroupNode * scene, ValuatedRegionNode * viewSpaceSubdivision)
   
  ~AdaptiveGlobalVisibilitySampling()
Standard destructor: Free resources.
   
bool performSampling(uint32_t numSamples)
   
Rendering::Mesh * createMeshFromSamples() const
   
ValuatedRegionNode * getViewCellHierarchy() const
Return the root of the view cell hierarchy.

Documentation

function
MinSG::AGVS::AdaptiveGlobalVisibilitySampling::AdaptiveGlobalVisibilitySampling

public
     
     
AdaptiveGlobalVisibilitySampling( GroupNode * scene,
  ValuatedRegionNode * viewSpaceSubdivision
)    

Create a new preprocessing instance for the given scene

Parameters

scene
Scene that will be used to perform the global visibility sampling in.
viewSpaceSubdivision
Root node of the view cell hierarchy

Defined in MinSG/Ext/AdaptiveGlobalVisibilitySampling/AdaptiveGlobalVisibilitySampling.h:53


function
MinSG::AGVS::AdaptiveGlobalVisibilitySampling::~AdaptiveGlobalVisibilitySampling

public
   
   
~AdaptiveGlobalVisibilitySampling( )

Standard destructor: Free resources.

Defined in MinSG/Ext/AdaptiveGlobalVisibilitySampling/AdaptiveGlobalVisibilitySampling.h:57


function
MinSG::AGVS::AdaptiveGlobalVisibilitySampling::performSampling

public
     
     
bool performSampling( uint32_t numSamples )

Perform the sampling by creating the given number of samples. For every samples, two rays will be cast.

Parameters

numSamples
Number of samples to evaluate

Returns

Iftrue, the pixel error is small and the sampling can be terminated. Otherwise, the sampling should be continued.

Defined in MinSG/Ext/AdaptiveGlobalVisibilitySampling/AdaptiveGlobalVisibilitySampling.h:67


function
MinSG::AGVS::AdaptiveGlobalVisibilitySampling::createMeshFromSamples

public const
   
   
Rendering::Mesh * createMeshFromSamples( ) const

Create a mesh from the samples that can be used as visualization of the casted rays. For every sample that contributes at least one visible object, a line is created. Samples with contribution exactly one will be colored blue, samples with contribution two are colored cyan.

Returns

New mesh. The caller should store it in a Util::Reference .

Defined in MinSG/Ext/AdaptiveGlobalVisibilitySampling/AdaptiveGlobalVisibilitySampling.h:78


function
MinSG::AGVS::AdaptiveGlobalVisibilitySampling::getViewCellHierarchy

public const
   
   
ValuatedRegionNode * getViewCellHierarchy( ) const

Return the root of the view cell hierarchy.

Defined in MinSG/Ext/AdaptiveGlobalVisibilitySampling/AdaptiveGlobalVisibilitySampling.h:81