Abstract class implementing the traverse of the single binary tree. Selection of the data from the tree is performed by the rules defined in the Accept/Reject methods. See description of the required methods in the comments above.
More...
#include <BVH_Traverse.hxx>
|
|
| BVH_Traverse () |
| Constructor. More...
|
|
|
void | SetBVHSet (BVHSetType *theBVHSet) |
| Sets the BVH Set containing the BVH tree. More...
|
|
|
virtual Standard_Boolean | AcceptMetric (const MetricType &) const |
| Basing on the given metric, checks if the whole branch may be accepted without any further checks. Returns true if the metric is accepted, false otherwise. More...
|
|
virtual Standard_Boolean | RejectNode (const BVH_VecNt &theCornerMin, const BVH_VecNt &theCornerMax, MetricType &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. More...
|
|
virtual Standard_Boolean | Accept (const Standard_Integer theIndex, const MetricType &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. More...
|
|
|
Standard_Integer | Select () |
| Selection of the elements from the BVH tree by the rules defined in Accept/Reject methods. The method requires the BVHSet containing BVH tree to be set. Returns the number of accepted elements. More...
|
|
Standard_Integer | 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. More...
|
|
virtual Standard_Boolean | IsMetricBetter (const NumType &, const NumType &) const |
| Compares the two metrics and chooses the best one. Returns true if the first metric is better than the second, false otherwise. More...
|
|
virtual Standard_Boolean | RejectMetric (const NumType &) const |
| Rejects the node by the metric. More...
|
|
virtual Standard_Boolean | Stop () const |
| Returns the flag controlling the tree descend. Returns true if the tree descend should be stopped. More...
|
|
template<class NumType, int Dimension, class BVHSetType = void, class MetricType = NumType>
class BVH_Traverse< NumType, Dimension, BVHSetType, MetricType >
Abstract class implementing the traverse of the single binary tree. Selection of the data from the tree is performed by the rules defined in the Accept/Reject methods. See description of the required methods in the comments above.
- Template Parameters
-
NumType | Numeric data type |
Dimension | Vector dimension |
BVHSetType | Type of set containing the BVH tree (required to access the elements by the index) |
MetricType | Type of metric to perform more optimal tree descend |
◆ BVH_VecNt
template<class NumType , int Dimension, class BVHSetType = void, class MetricType = NumType>
◆ BVH_Traverse()
template<class NumType , int Dimension, class BVHSetType = void, class MetricType = NumType>
◆ Accept()
template<class NumType , int Dimension, class BVHSetType = void, class MetricType = NumType>
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.
Implemented in BOPTools_BoxSelector< Dimension >.
◆ AcceptMetric()
template<class NumType , int Dimension, class BVHSetType = void, class MetricType = NumType>
Basing on the given metric, checks if the whole branch may be accepted without any further checks. Returns true if the metric is accepted, false otherwise.
Reimplemented in BOPTools_BoxSelector< Dimension >.
◆ RejectNode()
template<class NumType , int Dimension, class BVHSetType = void, class MetricType = NumType>
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.
◆ Select() [1/2]
template<class NumType , int Dimension, class BVHSetType = void, class MetricType = NumType>
Selection of the elements from the BVH tree by the rules defined in Accept/Reject methods. The method requires the BVHSet containing BVH tree to be set. Returns the number of accepted elements.
◆ Select() [2/2]
template<class NumType , int Dimension, class BVHSetType = void, class MetricType = NumType>
Performs selection of the elements from the BVH tree by the rules defined in Accept/Reject methods. Returns the number of accepted elements.
◆ SetBVHSet()
template<class NumType , int Dimension, class BVHSetType = void, class MetricType = NumType>
void BVH_Traverse< NumType, Dimension, BVHSetType, MetricType >::SetBVHSet |
( |
BVHSetType * |
theBVHSet | ) |
|
|
inline |
Sets the BVH Set containing the BVH tree.
◆ myBVHSet
template<class NumType , int Dimension, class BVHSetType = void, class MetricType = NumType>
BVHSetType* BVH_Traverse< NumType, Dimension, BVHSetType, MetricType >::myBVHSet |
|
protected |
The documentation for this class was generated from the following file: