Open CASCADE Technology 7.8.2.dev
|
The classes implement the traverse of the BVH tree. More...
#include <BVH_Traverse.hxx>
Public Member Functions | |
Metrics comparison for choosing the best branch | |
virtual Standard_Boolean | IsMetricBetter (const MetricType &, const MetricType &) const |
Compares the two metrics and chooses the best one. Returns true if the first metric is better than the second, false otherwise. | |
Rejection of the node by metric | |
virtual Standard_Boolean | RejectMetric (const MetricType &) const |
Rejects the node by the metric. | |
Condition to stop the descend | |
virtual Standard_Boolean | Stop () const |
Returns the flag controlling the tree descend. Returns true if the tree descend should be stopped. | |
Protected Member Functions | |
Constructors | |
BVH_BaseTraverse () | |
Constructor. | |
virtual | ~BVH_BaseTraverse () |
Destructor. | |
The classes implement the traverse of the BVH tree.
There are two traverse methods implemented:
To perform Selection of the elements from BVH_Tree using the traverse methods implemented here it is required to define Acceptance/Rejection rules in the following methods:
The selector of a single tree has an extra method which allows accepting the whole branches without any further checks (e.g. full inclusion test):
Two ways of selection are possible:
Here is the example of usage of the traverse to find the point-triangulation minimal distance.
Abstract class implementing the base Traverse interface required for selection of the elements from BVH tree.
MetricType | Type of metric to perform more optimal tree descend |
|
inlineprotected |
Constructor.
|
inlineprotectedvirtual |
Destructor.
|
inlinevirtual |
Compares the two metrics and chooses the best one. Returns true if the first metric is better than the second, false otherwise.
Reimplemented in BVH_Distance< NumType, Dimension, ObjectType, BVHSetType >, BVH_Distance< Standard_Real, 3, BVH_Vec3d, BRepExtrema_TriangleSet >, and BVH_PairDistance< NumType, Dimension, BVHSetType >.
|
inlinevirtual |
Rejects the node by the metric.
Reimplemented in BVH_Distance< NumType, Dimension, ObjectType, BVHSetType >, BVH_Distance< Standard_Real, 3, BVH_Vec3d, BRepExtrema_TriangleSet >, and BVH_PairDistance< NumType, Dimension, BVHSetType >.
|
inlinevirtual |
Returns the flag controlling the tree descend. Returns true if the tree descend should be stopped.
Reimplemented in BVH_Distance< NumType, Dimension, ObjectType, BVHSetType >, BVH_Distance< Standard_Real, 3, BVH_Vec3d, BRepExtrema_TriangleSet >, and BVH_PairDistance< NumType, Dimension, BVHSetType >.