Description
Classes
class | MinSG::SVS::BudgetRenderer Budget rendering. |
class | MinSG::SVS::GeometryNodeCollector |
class | MinSG::SVS::PreprocessingContext State storage for Spherical Visibility Sampling preprocessing. |
class | MinSG::SVS::Renderer |
class | MinSG::SVS::SamplePoint |
class | MinSG::SVS::SphereVisualizationRenderer |
class | MinSG::SVS::Statistics Singleton holder object for SVS related counters. |
class | MinSG::SVS::VisibilitySphere |
Enumerations
enum | interpolation_type_t {INTERPOLATION_NEAREST, INTERPOLATION_MAX3, INTERPOLATION_MAXALL, INTERPOLATION_WEIGHTED3} Type of interpolation to create values for a query that lies between sample points. |
Functions
Documentation
enum
MinSG::SVS::interpolation_type_t
public |
enum interpolation_type_t |
Enumerator | Description | |
---|---|---|
Enumerator | Description | |
INTERPOLATION_NEAREST | Only use the nearest sample point. | |
INTERPOLATION_MAX3 | Take the maximum of the three nearest sample points. | |
INTERPOLATION_MAXALL | Take the maximum of all sample points. | |
INTERPOLATION_WEIGHTED3 | Weight the nearest three sample points by their distance to the query. |
Type of interpolation to create values for a query that lies between sample points.
Defined in MinSG/Ext/SVS/Definitions.h:19
function
MinSG::SVS::createSamplingCamera
public |
CameraNodeOrtho * createSamplingCamera( | const Geometry::Sphere_f & | sphere, |
const Geometry::Matrix4x4f & | worldMatrix, | |
int | resolution | |
) |
Create an orthographic camera, whose frustum fully contains the given sphere, and which uses the given resolution in pixels.
Parameters
- sphere
- Geometric representation of the sphere surface in local coordinates
- worldMatrix
- Transformation matrix to convert local to world coordinates
- resolution
- Width and height of the viewport in pixels
Returns
Orthographic camera
Defined in MinSG/Ext/SVS/Helper.h:48
function
MinSG::SVS::transformCamera
public |
void transformCamera( | AbstractCameraNode * | camera, |
const Geometry::Sphere_f & | sphere, | |
const Geometry::Matrix4x4f & | worldMatrix, | |
const Geometry::Vec3f & | position | |
) |
Transform the given camera so that it is located on the sphere surface at the given position looking at the center of the sphere.
Parameters
- camera
- Camera that will be transformed
- sphere
- Geometric representation of the sphere surface in local coordinates
- worldMatrix
- Transformation matrix to convert local to world coordinates
- position
- Position specified by a unit vector from the center to the surface of the unit sphere
Defined in MinSG/Ext/SVS/Helper.h:58
function
MinSG::SVS::createColorTexture
public |
Rendering::Texture * createColorTexture( | uint32_t | width, |
uint32_t | height, | |
const VisibilitySphere & | visibilitySphere, | |
interpolation_type_t | interpolation | |
) |
Create a color texture from the sample values of the given visibility sphere. The values will be scaled to the range [0, 255] and encoded into the green channel of the texture.
Parameters
- width
- Width in pixels of the texture
- height
- Height in pixels of the texture
- visibilitySphere
- Sampling sphere containing sample values
- interpolation
- Type of interpolation to use when requesting values between sample positions
Returns
Color texture containing the encoded values
Defined in MinSG/Ext/SVS/Helper.h:70
function
MinSG::SVS::preprocessNode
public |
void preprocessNode( | PreprocessingContext & | preprocessingContext, |
GroupNode * | node | |
) |
Perform the preprocessing for the given node. First it is checked if the node already has a visibility sphere. If that visibility sphere is valid, the preprocessing is skipped for the node. If it is invalid, the visibility sphere is removed. Then, if the node is without a visibility sphere, a new one is created. When the function returns, the node has a valid visibility sphere.
Parameters
- preprocessingContext
- Context object holding required data (e.g. scene manager, frame context, resolution, sample positions)
- node
- Node to do the sampling for
Defined in MinSG/Ext/SVS/Helper.h:84
function
MinSG::SVS::createVisibilitySphere
public |
void createVisibilitySphere( | PreprocessingContext & | preprocessingContext, |
GroupNode * | node | |
) |
Calculate a sphere for the given node, and do a sampling run for the given positions. A VisibilitySphere is created, and stored as attribute at the given node.
Parameters
- preprocessingContext
- Context object holding required data (e.g. scene manager, frame context, resolution, sample positions)
- node
- Node to do the sampling for
Defined in MinSG/Ext/SVS/Helper.h:95
function
MinSG::SVS::isVisibilitySphereValid
public |
bool isVisibilitySphereValid( | GroupNode * | node, |
const VisibilitySphere & | visibilitySphere | |
) |
Check if the given visibility sphere is valid. An invalid visibility sphere contains no samples, contains samples without, or has been cloned.
Parameters
- node
- Root node of the subtree that the visibility sphere is stored at
- visibilitySphere
- Sampling sphere to check
Returns
true
if the visibility sphere is valid,false
otherwise
Defined in MinSG/Ext/SVS/Helper.h:106
function
MinSG::SVS::hasVisibilitySphere
public |
bool hasVisibilitySphere( | GroupNode * | node ) |
Check if a visibility sphere is stored at the node.
Parameters
- node
- Inner node of a tree structure
Returns
true
if there is a visibility sphere,false
otherwise
Defined in MinSG/Ext/SVS/Helper.h:114
function
MinSG::SVS::retrieveVisibilitySphere
public |
const VisibilitySphere & retrieveVisibilitySphere( | GroupNode * | node ) |
Retrieve a visibility sphere from a node.
Parameters
- node
- Inner node of a tree structure
Returns
Sampling sphere stored at the given node
Exceptions
- std::logic_error
- If the attribute was not found, or has wrong type
Defined in MinSG/Ext/SVS/Helper.h:123
function
MinSG::SVS::storeVisibilitySphere
public |
void storeVisibilitySphere( | GroupNode * | node, |
VisibilitySphere && | visibilitySphere | |
) |
Store a visibility sphere at a node.
Parameters
- node
- Inner node of a tree structure
- visibilitySphere
- Sampling sphere that will be stored at the given node
Exceptions
- std::logic_error
- If the attribute did already exist
Defined in MinSG/Ext/SVS/Helper.h:132
function
MinSG::SVS::removeVisibilitySphereUpwards
public |
void removeVisibilitySphereUpwards( | GroupNode * | node ) |
Remove all visibility spheres stored at nodes on the path from the given node to the root.
Parameters
- node
- Beginning of the path
Defined in MinSG/Ext/SVS/Helper.h:139
function
MinSG::SVS::transformSpheresFromWorldToLocal
public |
void transformSpheresFromWorldToLocal( | GroupNode * | rootNode ) |
Change the coordinate system from world coordinates to local coordinates for all spheres in the given subtree.
Parameters
- rootNode
- Root node of the subtree
Exceptions
- std::logic_error
- In case of an error
Defined in MinSG/Ext/SVS/Helper.h:148
function
MinSG::SVS::transformSphere
public |
template< typename number_t > | ||
Geometry::_Sphere < number_t > transformSphere( | const Geometry::_Sphere < number_t > & | sphere, |
const Geometry::_Matrix4x4 < number_t > & | matrix | |
) |
Transform the center and radius of a sphere.
Parameters
- sphere
- Sphere that is transformed
- matrix
- Matrix specifying the transformation
Returns
Transformed sphere
Note: To receive valid results, the transformation should be a combination of translation, rotation, and scaling only. Other transformations, e.g. shearing, might lead to invalid results, because the transformed sphere is no sphere anymore.
Defined in MinSG/Ext/SVS/Helper.h:162
function
MinSG::SVS::interpolationFromUInt
public |
interpolation_type_t interpolationFromUInt( | uint32_t | number ) |
Convert the value of an integer to an enumerator.
Parameters
- number
- Value that can be converted to an enumerator
Exceptions
- std::invalid_argument
- If the conversion of an unknown value is detected
Returns
Interpolation type enumerator
Defined in MinSG/Ext/SVS/Helper.h:177
function
MinSG::SVS::interpolationToString
public |
std::string interpolationToString( | interpolation_type_t | interpolation ) |
Convert the value of an enumerator to a string.
Parameters
- interpolation
- Value that will be converted to a string
Exceptions
- std::invalid_argument
- If the conversion of an unknown value is detected
Returns
Human-readable string
Defined in MinSG/Ext/SVS/Helper.h:186
function
MinSG::SVS::interpolationFromString
public |
interpolation_type_t interpolationFromString( | const std::string & | str ) |
Convert the value of a string to an enumerator.
Parameters
- str
- Value that can be converted to an enumerator
Exceptions
- std::invalid_argument
- If the conversion of an unknown value is detected
Returns
Interpolation type enumerator
Defined in MinSG/Ext/SVS/Helper.h:195