RobWorkProject
23.9.11-
|
factory for creating bounding volume trees. More...
#include <BVTreeFactory.hpp>
Classes | |
struct | BVShellSplitterStrategy |
Interface for bounding volume splitting strategy for objects with analytical surfaces. More... | |
struct | BVSplitterStrategy |
interface of bounding volume splitting strategy More... | |
class | OBVMeanSplitter |
Spatial Median splitting strategy. The median of the bounding volume projection extends are used as splitting point. More... | |
struct | OBVMedianSplitter |
Object median splitting strategy using axis of largest variance. Splits the mesh in the median on the axis with largest variance. More... | |
struct | OBVShellMedianSplitter |
Spatial Median splitting strategy for shell of analytical surfaces. More... | |
struct | OBVSpatialMedianSplitter |
Spatial Median splitting strategy. The median of the bounding volume projection extends are used as splitting point. More... | |
struct | ShellAccessor |
Access GenericFace primitive of Shell. More... | |
struct | TriMeshAccessor |
Public Member Functions | |
template<class OBV > | |
rw::core::Ptr< BVSplitterStrategy< OBV > > | makeOBVMedianSplitter () |
creates a splitter strategy for OBB tree construction using an object median splitting strategy. More... | |
template<class OBV > | |
rw::core::Ptr< BVShellSplitterStrategy< OBV > > | makeOBVShellMedianSplitter () |
Creates a splitter strategy for OBB tree construction using an object median splitting strategy. More... | |
template<class OBV > | |
rw::core::Ptr< BVSplitterStrategy< OBV > > | makeOBVSpatialMedianSplitter () |
creates a splitter strategy for OBB tree construction using a spatial median splitting strategy. More... | |
template<class OBV > | |
rw::core::Ptr< BVTreeFactory::BVSplitterStrategy< OBV > > | makeOBVMeanSplitter () |
creates a splitter strategy for obb tree construction using mean splitting strategy. More... | |
template<class T > | |
rw::core::Ptr< geometry::BVFactory< rw::geometry::OBB< T > > > | makeOBBCovarFactory () |
creates an OBB factory that fits obb's to triangle meshes by calculating the covariance of the triangle mesh and use the eigen vectors of the covariance as the axes of the OBB. More... | |
template<class BVTREE > | |
BVTREE * | makeTopDownOBBTreeCovarMedian (rw::geometry::TriMesh::Ptr mesh, int maxTrisInLeaf=1) |
creates an OBB tree using a covariance OBB factory and a object median splitting strategy. More... | |
template<class BVTREE > | |
BVTREE * | makeTopDownOBBTreeMedian (rw::geometry::Shell::CPtr shell, int maxTrisInLeaf=1) |
Creates an OBB tree using a object median splitting strategy. More... | |
template<class BVTREE > | |
BVTREE * | makeTopDownOBBTreeCovarSpatialMedian (rw::geometry::TriMesh::Ptr mesh, int maxTrisInLeaf=1) |
template<class BVTREE > | |
BVTREE * | makeTopDownOBBTreeCovarMean (rw::geometry::TriMesh::Ptr mesh, int maxTrisInLeaf=1) |
template<class BVTREE > | |
BVTREE * | makeTopDownOBBIdxTreeCovarMedian (rw::geometry::TriMesh::Ptr mesh, int maxTrisInLeaf=1) |
Static Public Member Functions | |
template<class BVTREE > | |
static BVTREE * | makeTopDownTree (rw::geometry::TriMesh::Ptr mesh, geometry::BVFactory< typename Traits< BVTREE >::BVType > &bvFactory, const BVSplitterStrategy< typename Traits< BVTREE >::BVType > &splitter, int maxTrisInLeaf=1) |
general function for constructing a binary bounding volume tree in a top down fashion. More... | |
template<class BVTREE > | |
static BVTREE * | makeTopDownTree (rw::geometry::Shell::CPtr shell, geometry::BVFactory< typename Traits< BVTREE >::BVType > &bvFactory, const BVShellSplitterStrategy< typename Traits< BVTREE >::BVType > &splitter, int maxTrisInLeaf=1) |
Top-down construction of a bounding volume tree. More... | |
template<class BVTREE > | |
static void | recursiveTopDownTree (BVTree< BVTREE > *tree, typename Traits< BVTREE >::NodeIterator &node, rw::geometry::IndexedTriArray<> mesh, rw::geometry::BVFactory< typename Traits< BVTREE >::BVType > &bvFactory, const BVSplitterStrategy< typename Traits< BVTREE >::BVType > &splitter, size_t maxTrisInLeaf) |
recursive top down construction of a bounding volume tree More... | |
template<class BVTREE > | |
static void | recursiveTopDownTree (BVTree< BVTREE > *tree, typename Traits< BVTREE >::NodeIterator &node, rw::geometry::IndexedFaceArray shell, rw::geometry::BVFactory< typename Traits< BVTREE >::BVType > &bvFactory, const BVShellSplitterStrategy< typename Traits< BVTREE >::BVType > &splitter, const size_t maxTrisInLeaf) |
Recursive top-down construction of a bounding volume tree. More... | |
template<class T > | |
static int | evaluateSplitAxis (rw::geometry::IndexedTriArray<> &mesh, int splitAxis, double splitValue, const rw::math::Transform3D< T > &t3d) |
computes a score of a specific splitting axis. Basically each triangle in the mesh is visited and all vertices are tested for being on either left or right side of the splitting value. The score is then the total number of triangles being completely on either left or right side. Which means that a score=mesh.size() is the best score where the split value completely splits the triangles into two volumes. score=0 is the worst where all triangles has vertices on both sides on the split value. More... | |
static int | evaluateSplitAxis (const rw::geometry::IndexedFaceArray &shell, const double splitValue) |
Evaluate the quality of a split axis. More... | |
factory for creating bounding volume trees.
|
inlinestatic |
Evaluate the quality of a split axis.
A good split axis divides the object such that the number of faces lying completely to the left or right of the axis is maximized.
shell | [in] the shell where each IndexedFace contains the face extremums along the given axis. |
splitValue | [in] the split axis value. |
|
inlinestatic |
computes a score of a specific splitting axis. Basically each triangle in the mesh is visited and all vertices are tested for being on either left or right side of the splitting value. The score is then the total number of triangles being completely on either left or right side. Which means that a score=mesh.size() is the best score where the split value completely splits the triangles into two volumes. score=0 is the worst where all triangles has vertices on both sides on the split value.
mesh | documentation missing ! |
splitAxis | documentation missing ! |
splitValue | documentation missing ! |
t3d | documentation missing ! |
|
inline |
creates an OBB factory that fits obb's to triangle meshes by calculating the covariance of the triangle mesh and use the eigen vectors of the covariance as the axes of the OBB.
|
inline |
creates a splitter strategy for obb tree construction using mean splitting strategy.
The strategy splits a trimesh in one of the axes of the OBB. The splitting point is determined as the mean on one of the OBB axes. Performs in O(n)
|
inline |
creates a splitter strategy for OBB tree construction using an object median splitting strategy.
splits a trimesh in one of the axis of a bounding volume. The splitter use a median based strategy where the splitpoint is determined as the object median and as such is suitable for creating balanced OBB trees. Median is found in O(n log n) time
|
inline |
Creates a splitter strategy for OBB tree construction using an object median splitting strategy.
Splits a shell representation with analytic surfaces in one of the axes of the bounding volume. The splitter use a median based strategy where the splitpoint is determined as the object median and as such is suitable for creating balanced OBB trees.
|
inline |
creates a splitter strategy for OBB tree construction using a spatial median splitting strategy.
splits a trimesh in one of the axis of a bounding volume such that the bounding volume is split in two equal parts. Median is found in constant time.
|
inline |
creates an OBB tree using a covariance OBB factory and a object median splitting strategy.
mesh | [in] the mesh that should be decomposed into a OBB tree |
maxTrisInLeaf | [in] the maximum number of tris that are allowed in each leaf node |
|
inline |
Creates an OBB tree using a object median splitting strategy.
shell | [in] the shell to create OBB tree for. |
maxTrisInLeaf | [in] the maximum number of faces in a leaf node. |
|
inlinestatic |
Top-down construction of a bounding volume tree.
shell | [in] the shell to create bounding volume tree for. Must have at least one face. |
bvFactory | a factory for creating bounding volumes. |
splitter | [in] the splitting strategy used to divide the shell. |
maxTrisInLeaf | [in] how many faces to allow in one leaf of the tree. |
|
inlinestatic |
general function for constructing a binary bounding volume tree in a top down fashion.
mesh | [in] the mesh on which to construct the bounding volume tree |
bvFactory | [in] a factory for creating/fitting bounding volumes given a triangle mesh |
splitter | [in] divides a mesh into 2 meshes by sorting the mesh and providing a splitting index |
maxTrisInLeaf | [in] the maximum number of tris that are allowed in each leaf node |
|
inlinestatic |
Recursive top-down construction of a bounding volume tree.
tree | [out] the resulting bounding volume tree. |
node | [in/out] current node being handled in tree. |
shell | [in] the shell to create bounding volume tree for. Must have at least one face. |
bvFactory | a factory for creating bounding volumes. |
splitter | [in] the splitting strategy used to divide the shell. |
maxTrisInLeaf | [in] how many faces to allow in one leaf of the tree. |
|
inlinestatic |
recursive top down construction of a bounding volume tree
tree | |
node | |
mesh | |
bvFactory | |
splitter | |
maxTrisInLeaf |