Abstract class for computation of the min distance between elements of two BVH trees. To use this class it is required to define only the method Accept to compute the distance between elements of the trees. More...
#include <BVH_PairDistance.hxx>
Public Types | |
typedef BVH_Tools< NumType, Dimension >::BVH_VecNt | BVH_VecNt |
![]() | |
typedef BVH_Box< NumType, Dimension >::BVH_VecNt | BVH_VecNt |
Public Member Functions | |
Constructor | |
Constructor | |
BVH_PairDistance () | |
Compute the distance | |
Computes the distance between two BVH trees | |
NumType | ComputeDistance () |
Accessing the results | |
Returns IsDone flag | |
Standard_Boolean | IsDone () const |
Returns the computed distance. | |
NumType | Distance () const |
Returns the computed distance. | |
Definition of the rules for tree descend | |
Compares the two metrics and chooses the best one | |
virtual Standard_Boolean | IsMetricBetter (const NumType &theLeft, const NumType &theRight) const override |
Computes the distance between boxes of the nodes. | |
virtual Standard_Boolean | RejectNode (const BVH_VecNt &theCornerMin1, const BVH_VecNt &theCornerMax1, const BVH_VecNt &theCornerMin2, const BVH_VecNt &theCornerMax2, NumType &theMetric) const override |
Computes the distance between boxes of the nodes. | |
virtual Standard_Boolean | RejectMetric (const NumType &theMetric) const override |
Rejects the branch by the metric. | |
virtual Standard_Boolean | Stop () const override |
Returns the flag controlling the tree descend. | |
![]() | |
BVH_PairTraverse () | |
void | SetBVHSets (BVHSetType *theBVHSet1, BVHSetType *theBVHSet2) |
virtual Standard_Boolean | Accept (const Standard_Integer theIndex1, const Standard_Integer theIndex2)=0 |
Leaf element acceptance. Returns true if the pair of elements is accepted, false otherwise. | |
Standard_Integer | Select () |
Performs selection of the elements from two BVH trees by the rules defined in Accept/Reject methods. Returns the number of accepted pairs of elements. | |
Standard_Integer | Select (const opencascade::handle< BVH_Tree< NumType, Dimension > > &theBVH1, const opencascade::handle< BVH_Tree< NumType, Dimension > > &theBVH2) |
Performs selection of the elements from two BVH trees by the rules defined in Accept/Reject methods. Returns the number of accepted pairs of elements. | |
![]() |
Protected Attributes | |
Fields | |
NumType | myDistance |
Square distance. | |
Standard_Boolean | myIsDone |
State of the algorithm. | |
![]() | |
BVHSetType * | myBVHSet1 |
BVHSetType * | myBVHSet2 |
Additional Inherited Members | |
![]() | |
BVH_BaseTraverse () | |
Destructor. | |
virtual | ~BVH_BaseTraverse () |
Destructor. | |
Abstract class for computation of the min distance between elements of two BVH trees. To use this class it is required to define only the method Accept to compute the distance between elements of the trees.
NumType | Numeric data type |
Dimension | Vector dimension |
BVHSetType | Type of the set on which BVH is built |
typedef BVH_Tools<NumType,Dimension>::BVH_VecNt BVH_PairDistance< NumType, Dimension, BVHSetType >::BVH_VecNt |
|
inline |
|
inline |
|
inline |
Returns the computed distance.
|
inline |
Returns the computed distance.
|
inlineoverridevirtual |
Computes the distance between boxes of the nodes.
Reimplemented from BVH_BaseTraverse< NumType >.
|
inlineoverridevirtual |
Rejects the branch by the metric.
Reimplemented from BVH_BaseTraverse< NumType >.
|
inlineoverridevirtual |
Computes the distance between boxes of the nodes.
Implements BVH_PairTraverse< NumType, Dimension, BVHSetType, NumType >.
|
inlineoverridevirtual |
Returns the flag controlling the tree descend.
Reimplemented from BVH_BaseTraverse< NumType >.
|
protected |
Square distance.
|
protected |
State of the algorithm.