public

Inheritance Graph

graph BT
	PreprocessingContext
	click PreprocessingContext "classMinSG_1_1SVS_1_1PreprocessingContext"

Description

State storage for Spherical Visibility Sampling preprocessing.

This helper class stores the state of the Spherical Visibility Sampling preprocessing and thereby enables to perform the preprocessing step by step with intermediate interruptions.

Author: Benjamin Eikel

Date: 2013-01-29

Public Functions

   
   
  PreprocessingContext( SceneManagement::SceneManager & sceneManager, FrameContext & frameContext, GroupNode * rootNode, const std::vector< Geometry::Vec3f > & positions, uint32_t resolution, bool useExistingVisibilityResults, bool computeTightInnerBoundingSpheres)
   
  ~PreprocessingContext()
Destroy the preprocessing context.
   
void preprocessSingleNode()
   
bool isFinished() const
   
std::size_t getNumRemainingNodes() const
   
SceneManagement::SceneManager & getSceneManager()
Access the scene manager.
   
FrameContext & getFrameContext()
Access the frame context.
   
const std::vector< Geometry::Vec3f > & getPositions() const
Read the sample positions.
   
uint32_t getResolution() const
Read the image resolution.
   
bool getUseExistingVisibilityResults() const
Read if existing results are to be used.
   
bool getComputeTightInnerBoundingSpheres() const
Read if tight bounding spheres for inner nodes are to be computed.

Documentation

function
MinSG::SVS::PreprocessingContext::PreprocessingContext

public
     
     
PreprocessingContext( SceneManagement::SceneManager & sceneManager,
  FrameContext & frameContext,
  GroupNode * rootNode,
  const std::vector< Geometry::Vec3f > & positions,
  uint32_t resolution,
  bool useExistingVisibilityResults,
  bool computeTightInnerBoundingSpheres
)    

Create a context for the Spherical Visibility Sampling preprocessing. The context is directly initialized with the required objects and settings. To execute the preprocessing,* preprocessSingleNode() has to be called until isFinished() *returnstrue.

Parameters

sceneManager
SceneManager used by the visibility vectors
frameContext
Frame context required for rendering
rootNode
Root node of the tree to do the preprocessing for
positions
Positions on the unit sphere specifying the viewing directions
resolution
Image resolution in pixels
useExistingVisibilityResults
Iftrue, visibility results from child nodes that have been computed earlier will be used for visibility tests in inner nodes
computeTightInnerBoundingSpheres
Iftrue, the bounding sphere for an inner nodes will be computed based on all meshes’ vertices in the subtree. Iffalse, the bounding spheres of the child nodes will be combined to compute the bounding sphere of the inner node.

Defined in MinSG/Ext/SVS/PreprocessingContext.h:78


function
MinSG::SVS::PreprocessingContext::~PreprocessingContext

public
   
   
~PreprocessingContext( )

Destroy the preprocessing context.

Defined in MinSG/Ext/SVS/PreprocessingContext.h:87


function
MinSG::SVS::PreprocessingContext::preprocessSingleNode

public
   
   
void preprocessSingleNode( )

Preprocess a single node. If the preprocessing is already finished, do nothing.

Defined in MinSG/Ext/SVS/PreprocessingContext.h:93


function
MinSG::SVS::PreprocessingContext::isFinished

public const
   
   
bool isFinished( ) const

Check the state of the preprocessing.

Returns

trueif and only if the preprocessing is finished

Defined in MinSG/Ext/SVS/PreprocessingContext.h:100


function
MinSG::SVS::PreprocessingContext::getNumRemainingNodes

public const
   
   
std::size_t getNumRemainingNodes( ) const

Return the number of nodes that wait to be preprocessed.

Returns

Current number of nodes

Defined in MinSG/Ext/SVS/PreprocessingContext.h:107


function
MinSG::SVS::PreprocessingContext::getSceneManager

public
   
   
SceneManagement::SceneManager & getSceneManager( )

Access the scene manager.

Defined in MinSG/Ext/SVS/PreprocessingContext.h:110


function
MinSG::SVS::PreprocessingContext::getFrameContext

public
   
   
FrameContext & getFrameContext( )

Access the frame context.

Defined in MinSG/Ext/SVS/PreprocessingContext.h:113


function
MinSG::SVS::PreprocessingContext::getPositions

public const
   
   
const std::vector< Geometry::Vec3f > & getPositions( ) const

Read the sample positions.

Defined in MinSG/Ext/SVS/PreprocessingContext.h:116


function
MinSG::SVS::PreprocessingContext::getResolution

public const
   
   
uint32_t getResolution( ) const

Read the image resolution.

Defined in MinSG/Ext/SVS/PreprocessingContext.h:119


function
MinSG::SVS::PreprocessingContext::getUseExistingVisibilityResults

public const
   
   
bool getUseExistingVisibilityResults( ) const

Read if existing results are to be used.

Defined in MinSG/Ext/SVS/PreprocessingContext.h:122


function
MinSG::SVS::PreprocessingContext::getComputeTightInnerBoundingSpheres

public const
   
   
bool getComputeTightInnerBoundingSpheres( ) const

Read if tight bounding spheres for inner nodes are to be computed.

Defined in MinSG/Ext/SVS/PreprocessingContext.h:125