Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures
BOPTools_PairSelector< Dimension > Class Template Reference

Template Selector for selection of the elements from two BVH trees. More...

#include <BOPTools_PairSelector.hxx>

Inheritance diagram for BOPTools_PairSelector< Dimension >:
Inheritance graph
[legend]

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< PairIDsmyPairs
 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.
 

Detailed Description

template<int Dimension>
class BOPTools_PairSelector< Dimension >

Template Selector for selection of the elements from two BVH trees.

Member Typedef Documentation

◆ BVH_VecNd

template<int Dimension>
typedef BVH::VectorType<double,Dimension>::Type BOPTools_PairSelector< Dimension >::BVH_VecNd

Constructor & Destructor Documentation

◆ BOPTools_PairSelector()

template<int Dimension>
BOPTools_PairSelector< Dimension >::BOPTools_PairSelector ( )
inline

Member Function Documentation

◆ Accept()

template<int Dimension>
bool BOPTools_PairSelector< Dimension >::Accept ( const int theID1,
const int theID2 )
inlineoverridevirtual

Checks and accepts the pair of elements.

Implements BVH_PairTraverse< double, Dimension, BVH_BoxSet< double, Dimension, int > >.

◆ Clear()

template<int Dimension>
void BOPTools_PairSelector< Dimension >::Clear ( )
inline

Sorts the indices.

◆ Pairs()

template<int Dimension>
const NCollection_LinearVector< PairIDs > & BOPTools_PairSelector< Dimension >::Pairs ( ) const
inline

Returns the list of accepted indices.

◆ RejectElement()

template<int Dimension>
bool BOPTools_PairSelector< Dimension >::RejectElement ( const int theID1,
const int theID2 )
inline

Checks if the pair of elements should be rejected.

◆ RejectNode()

template<int Dimension>
bool BOPTools_PairSelector< Dimension >::RejectNode ( const BVH_VecNd & theCMin1,
const BVH_VecNd & theCMax1,
const BVH_VecNd & theCMin2,
const BVH_VecNd & theCMax2,
double &  ) const
inlineoverride

Checks if the pair of elements should be rejected.

◆ SetSame()

template<int Dimension>
void BOPTools_PairSelector< Dimension >::SetSame ( const bool theIsSame)
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.

◆ Sort()

template<int Dimension>
void BOPTools_PairSelector< Dimension >::Sort ( )
inline

Sorts the indices.

Field Documentation

◆ myPairs

template<int Dimension>
NCollection_LinearVector<PairIDs> BOPTools_PairSelector< Dimension >::myPairs
protected

Selected pairs of indices.

◆ mySameBVHs

template<int Dimension>
bool BOPTools_PairSelector< Dimension >::mySameBVHs
protected

Selection is performed from the same BVH trees.


The documentation for this class was generated from the following file: