public |
Inheritance Graph
graph BT
RandomizedSampleTree
RandomizedSampleTree --> Octree
click RandomizedSampleTree "classMinSG_1_1TriangleTrees_1_1RandomizedSampleTree"
click Octree "classMinSG_1_1TriangleTrees_1_1Octree"
Description
Randomized Sample Tree as presented in Klein, J.; Krokowski, J.; Fischer, M.; Wand, M.; Wanka, R.; Meyer auf der Heide, F.: The randomized sample tree: a data structure for interactive walkthroughs in externally stored virtual environments. In: VRST ‘02: Proceedings of the ACM symposium on Virtual reality software and technology, ACM, 2002, pages 137-146.
Author: Benjamin Eikel
Date: 2011-08-01
Public Functions
RandomizedSampleTree( Rendering::Mesh * mesh) | |
~RandomizedSampleTree() Empty destructor. |
|
void | createSample() |
void | createSample(const std::function< double(const TriangleAccessor &)> & calcTriangleWeight) |
Protected Functions
RandomizedSampleTree(const Geometry::Box & childBound, const Octree & parent) | |
RandomizedSampleTree * | createChild(const Geometry::Box & childBound, const Octree & parent) const Return a child node. Needed for polymorphism. |
double | calcSampleSize(double sumTriangleAreas) const |
Documentation
function
MinSG::TriangleTrees::RandomizedSampleTree::RandomizedSampleTree
public | inline | explicit |
RandomizedSampleTree( | Rendering::Mesh * | mesh ) |
Create an RandomizedSampleTree root node with TriangleAccessors to all given triangles.
Parameters
- mesh
- Mesh containing the triangles.
Defined in MinSG/Ext/TriangleTrees/RandomizedSampleTree.h:44
function
MinSG::TriangleTrees::RandomizedSampleTree::~RandomizedSampleTree
public | inline | virtual |
~RandomizedSampleTree( | ) |
Empty destructor.
Defined in MinSG/Ext/TriangleTrees/RandomizedSampleTree.h:48
function
MinSG::TriangleTrees::RandomizedSampleTree::createSample
public |
void createSample( | ) |
Perform the sampling process. This function has to be called for the root node of the tree. Traverse the whole tree and pull up triangles by random sampling.
See also: Figure 3 of the original article
Defined in MinSG/Ext/TriangleTrees/RandomizedSampleTree.h:58
function
MinSG::TriangleTrees::RandomizedSampleTree::createSample
public |
void createSample( | const std::function< double(const TriangleAccessor &)> & | calcTriangleWeight ) |
Defined in MinSG/Ext/TriangleTrees/RandomizedSampleTree.h:60
function
MinSG::TriangleTrees::RandomizedSampleTree::RandomizedSampleTree
protected | inline | explicit |
RandomizedSampleTree( | const Geometry::Box & | childBound, |
const Octree & | parent | |
) |
Create a new RandomizedSampleTree node. This is used to create child nodes. The creating node has to assign the triangles to the node.
Parameters
- childBound
- Axis-aligned bounding box for the child.
- parent
- Parent node which is used to copy the parameters from.
Defined in MinSG/Ext/TriangleTrees/RandomizedSampleTree.h:71
function
MinSG::TriangleTrees::RandomizedSampleTree::createChild
protected | const | inline | virtual |
RandomizedSampleTree * createChild( | const Geometry::Box & | childBound, |
const Octree & | parent | |
) const |
Return a child node. Needed for polymorphism.
Defined in MinSG/Ext/TriangleTrees/RandomizedSampleTree.h:75
function
MinSG::TriangleTrees::RandomizedSampleTree::calcSampleSize
protected | const |
double calcSampleSize( | double | sumTriangleAreas ) const |
Calculate the sample size for this node.
See also: m_u in Theorem 1 of the original article
Parameters
- sumTriangleAreas
- Sum of triangle areas
Returns
Sample size
Defined in MinSG/Ext/TriangleTrees/RandomizedSampleTree.h:86