![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Template Selector for selection of the elements from two BVH trees. More...
#include <BOPTools_PairSelector.hxx>

Data Structures | |
| struct | PairIDs |
Public Types | |
public types | |
Auxiliary structure to keep the pair of indices | |
| typedef BVH::VectorType< double, Dimension >::Type | BVH_VecNd |
Public Types inherited from BVH_PairTraverse< double, Dimension, BVH_BoxSet< double, Dimension, int > > | |
| typedef BVH_Box< double, Dimension >::BVH_VecNt | BVH_VecNt |
Public Member Functions | |
Constructor | |
Empty constructor | |
| BOPTools_PairSelector () | |
public interfaces | |
Clears the indices | |
| void | Clear () |
| Sorts the indices. | |
| void | Sort () |
| Sorts the indices. | |
| void | SetSame (const bool theIsSame) |
| Tells to selector that BVH trees are the same. If the flag is set to true the resulting vector will contain only unique pairs (mirrored pairs will be rejected, e.g. (1, 2) will be taken, (2, 1) will be rejected) and will not contain pairs in which IDs are the same (pair (1, 1) will be rejected). If it is required to have a full vector of pairs even for the same BVH trees, just keep the false value of this flag. | |
| const NCollection_LinearVector< PairIDs > & | Pairs () const |
| Returns the list of accepted indices. | |
Rejection/Acceptance rules | |
Basing on the bounding boxes of the nodes checks if the pair of nodes should be rejected. | |
| bool | RejectNode (const BVH_VecNd &theCMin1, const BVH_VecNd &theCMax1, const BVH_VecNd &theCMin2, const BVH_VecNd &theCMax2, double &) const override |
| Checks if the pair of elements should be rejected. | |
| bool | RejectElement (const int theID1, const int theID2) |
| Checks if the pair of elements should be rejected. | |
| bool | Accept (const int theID1, const int theID2) override |
| Checks and accepts the pair of elements. | |
Public Member Functions inherited from BVH_PairTraverse< double, Dimension, BVH_BoxSet< double, Dimension, int > > | |
| BVH_PairTraverse () | |
| void | SetBVHSets (BVH_BoxSet< double, Dimension, int > *theBVHSet1, BVH_BoxSet< double, Dimension, int > *theBVHSet2) |
| virtual bool | RejectNode (const BVH_VecNt &theCornerMin1, const BVH_VecNt &theCornerMax1, const BVH_VecNt &theCornerMin2, const BVH_VecNt &theCornerMax2, double &theMetric) const=0 |
| Leaf element acceptance. Returns true if the pair of elements is accepted, false otherwise. | |
| int | 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. | |
| int | Select (const opencascade::handle< BVH_Tree< double, Dimension > > &theBVH1, const opencascade::handle< BVH_Tree< double, 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. | |
Public Member Functions inherited from BVH_BaseTraverse< MetricType > | |
| virtual bool | IsMetricBetter (const MetricType &, const MetricType &) const |
| virtual bool | RejectMetric (const MetricType &) const |
| virtual bool | Stop () const |
Protected Attributes | |
Fields | |
| NCollection_LinearVector< PairIDs > | myPairs |
| Selected pairs of indices. | |
| bool | mySameBVHs |
| Selection is performed from the same BVH trees. | |
Protected Attributes inherited from BVH_PairTraverse< double, Dimension, BVH_BoxSet< double, Dimension, int > > | |
| BVH_BoxSet< double, Dimension, int > * | myBVHSet1 |
| BVH_BoxSet< double, Dimension, int > * | myBVHSet2 |
Additional Inherited Members | |
Protected Member Functions inherited from BVH_BaseTraverse< MetricType > | |
| BVH_BaseTraverse () | |
| Destructor. | |
| virtual | ~BVH_BaseTraverse ()=default |
| Destructor. | |
Template Selector for selection of the elements from two BVH trees.
| typedef BVH::VectorType<double,Dimension>::Type BOPTools_PairSelector< Dimension >::BVH_VecNd |
|
inline |
|
inlineoverridevirtual |
Checks and accepts the pair of elements.
Implements BVH_PairTraverse< double, Dimension, BVH_BoxSet< double, Dimension, int > >.
|
inline |
Sorts the indices.
|
inline |
Returns the list of accepted indices.
|
inline |
Checks if the pair of elements should be rejected.
|
inlineoverride |
Checks if the pair of elements should be rejected.
|
inline |
Tells to selector that BVH trees are the same. If the flag is set to true the resulting vector will contain only unique pairs (mirrored pairs will be rejected, e.g. (1, 2) will be taken, (2, 1) will be rejected) and will not contain pairs in which IDs are the same (pair (1, 1) will be rejected). If it is required to have a full vector of pairs even for the same BVH trees, just keep the false value of this flag.
|
inline |
Sorts the indices.
|
protected |
Selected pairs of indices.
|
protected |
Selection is performed from the same BVH trees.