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< Standard_Real, Dimension >::Type | BVH_VecNd |
![]() | |
typedef BVH_Box< Standard_Real, 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 Standard_Boolean 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 std::vector< 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. | |
virtual Standard_Boolean | RejectNode (const BVH_VecNd &theCMin1, const BVH_VecNd &theCMax1, const BVH_VecNd &theCMin2, const BVH_VecNd &theCMax2, Standard_Real &) const override |
Checks if the pair of elements should be rejected. | |
Standard_Boolean | RejectElement (const Standard_Integer theID1, const Standard_Integer theID2) |
Checks if the pair of elements should be rejected. | |
virtual Standard_Boolean | Accept (const Standard_Integer theID1, const Standard_Integer theID2) override |
Checks and accepts the pair of elements. | |
![]() | |
BVH_PairTraverse () | |
void | SetBVHSets (BVH_BoxSet< Standard_Real, Dimension, Standard_Integer > *theBVHSet1, BVH_BoxSet< Standard_Real, Dimension, Standard_Integer > *theBVHSet2) |
virtual Standard_Boolean | RejectNode (const BVH_VecNt &theCornerMin1, const BVH_VecNt &theCornerMax1, const BVH_VecNt &theCornerMin2, const BVH_VecNt &theCornerMax2, Standard_Real &theMetric) const=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< Standard_Real, Dimension > > &theBVH1, const opencascade::handle< BVH_Tree< Standard_Real, 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. | |
![]() | |
virtual Standard_Boolean | IsMetricBetter (const Standard_Real &, const Standard_Real &) const |
virtual Standard_Boolean | RejectMetric (const Standard_Real &) const |
virtual Standard_Boolean | Stop () const |
Protected Attributes | |
Fields | |
std::vector< PairIDs > | myPairs |
Selected pairs of indices. | |
Standard_Boolean | mySameBVHs |
Selection is performed from the same BVH trees. | |
![]() | |
BVH_BoxSet< Standard_Real, Dimension, Standard_Integer > * | myBVHSet1 |
BVH_BoxSet< Standard_Real, Dimension, Standard_Integer > * | myBVHSet2 |
Additional Inherited Members | |
![]() | |
BVH_BaseTraverse () | |
Destructor. | |
virtual | ~BVH_BaseTraverse () |
Destructor. | |
Template Selector for selection of the elements from two BVH trees.
typedef BVH::VectorType<Standard_Real,Dimension>::Type BOPTools_PairSelector< Dimension >::BVH_VecNd |
|
inline |
|
inlineoverridevirtual |
Checks and accepts the pair of elements.
Implements BVH_PairTraverse< Standard_Real, Dimension, BVH_BoxSet< Standard_Real, Dimension, Standard_Integer > >.
|
inline |
Sorts the indices.
|
inline |
Returns the list of accepted indices.
|
inline |
Checks if the pair of elements should be rejected.
|
inlineoverridevirtual |
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.