![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Abstract class for computation of the min distance between some Object and elements of BVH tree. To use this class it is required to define two methods: More...
#include <BVH_Distance.hxx>

Public Member Functions | |
Constructor | |
Constructor | |
| BVH_Distance () | |
Setting object for distance computation | |
Sets the object to which the distance is required | |
| void | SetObject (const ObjectType &theObject) |
Compute the distance | |
Computes the distance between object and BVH tree | |
| NumType | ComputeDistance () |
Accessing the results | |
Returns IsDone flag | |
| bool | 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 | |
| bool | IsMetricBetter (const NumType &theLeft, const NumType &theRight) const override |
| Rejects the branch by the metric. | |
| bool | RejectMetric (const NumType &theMetric) const override |
| Rejects the branch by the metric. | |
| bool | Stop () const override |
| Returns the flag controlling the tree descend. | |
Public Member Functions inherited from BVH_Traverse< NumType, Dimension, BVHSetType, NumType > | |
| BVH_Traverse () | |
| void | SetBVHSet (BVHSetType *theBVHSet) |
| virtual bool | AcceptMetric (const NumType &) const |
| Rejection of the node by bounding box. Metric is computed to choose the best branch. Returns true if the node should be rejected, false otherwise. | |
| virtual bool | RejectNode (const BVH_VecNt &theCornerMin, const BVH_VecNt &theCornerMax, NumType &theMetric) const=0 |
| Rejection of the node by bounding box. Metric is computed to choose the best branch. Returns true if the node should be rejected, false otherwise. | |
| virtual bool | Accept (const int theIndex, const NumType &theMetric)=0 |
| Leaf element acceptance. Metric of the parent leaf-node is passed to avoid the check on the element and accept it unconditionally. Returns true if the element has been accepted, false otherwise. | |
| int | Select () |
| Performs selection of the elements from the BVH tree by the rules defined in Accept/Reject methods. Returns the number of accepted elements. | |
| int | Select (const opencascade::handle< BVH_Tree< NumType, Dimension > > &theBVH) |
| Performs selection of the elements from the BVH tree by the rules defined in Accept/Reject methods. Returns the number of accepted elements. | |
Public Member Functions inherited from BVH_BaseTraverse< MetricType > | |
| virtual bool | IsMetricBetter (const MetricType &, const MetricType &) const |
| virtual bool | RejectMetric (const MetricType &) const |
Protected Attributes | |
Fields | |
| NumType | myDistance |
| Distance. | |
| bool | myIsDone |
| State of the algorithm. | |
| ObjectType | myObject |
| Object to compute the distance to. | |
Protected Attributes inherited from BVH_Traverse< NumType, Dimension, BVHSetType, NumType > | |
| BVHSetType * | myBVHSet |
Additional Inherited Members | |
Public Types inherited from BVH_Traverse< NumType, Dimension, BVHSetType, NumType > | |
| typedef BVH_Box< NumType, Dimension >::BVH_VecNt | BVH_VecNt |
Protected Member Functions inherited from BVH_BaseTraverse< MetricType > | |
| BVH_BaseTraverse () | |
| Destructor. | |
| virtual | ~BVH_BaseTraverse ()=default |
| Destructor. | |
Abstract class for computation of the min distance between some Object and elements of BVH tree. To use this class it is required to define two methods:
| NumType | Numeric data type |
| Dimension | Vector dimension |
| ObjectType | Type of the object to which the distance is required |
| BVHSetType | Type of the set on which BVH is built |
|
inline |
|
inline |
|
inline |
Returns the computed distance.
|
inline |
Returns the computed distance.
|
inlineoverride |
Rejects the branch by the metric.
|
inlineoverride |
Rejects the branch by the metric.
|
inline |
|
inlineoverridevirtual |
Returns the flag controlling the tree descend.
Reimplemented from BVH_BaseTraverse< MetricType >.
|
protected |
Distance.
|
protected |
State of the algorithm.
|
protected |
Object to compute the distance to.