OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    BVH_PairTraverse< NumType, Dimension, BVHSetType, MetricType > Class Template Referenceabstract

    Abstract class implementing the parallel traverse of two binary trees. Selection of the data from the trees 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>

    Inheritance diagram for BVH_PairTraverse< NumType, Dimension, BVHSetType, MetricType >:

    Data Structures

    struct  BVH_PairNodesInStack

    Public Types

    public types
    typedef BVH_Box< NumType, Dimension >::BVH_VecNt BVH_VecNt

    Public Member Functions

    Constructor

    Constructor

     BVH_PairTraverse ()
    Setting the sets to access the elements and BVH trees

    Sets the BVH Sets containing the BVH trees

    void SetBVHSets (BVHSetType *theBVHSet1, BVHSetType *theBVHSet2)
    Rules for Accept/Reject

    Rejection of the pair of nodes by bounding boxes. Metric is computed to choose the best branch. Returns true if the pair of nodes should be rejected, false otherwise.

    virtual bool RejectNode (const BVH_VecNt &theCornerMin1, const BVH_VecNt &theCornerMax1, const BVH_VecNt &theCornerMin2, const BVH_VecNt &theCornerMax2, MetricType &theMetric) const =0
     Leaf element acceptance. Returns true if the pair of elements is accepted, false otherwise.
    virtual bool Accept (const int theIndex1, const int theIndex2)=0
     Leaf element acceptance. Returns true if the pair of elements is accepted, false otherwise.
    Selection

    Selection of the pairs of elements of two BVH trees by the rules defined in Accept/Reject methods. The method requires the BVHSets containing BVH trees to be set. Returns the number of accepted pairs of elements.

    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< NumType, Dimension > > &theBVH1, const opencascade::handle< BVH_Tree< NumType, 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< NumType >
    virtual bool IsMetricBetter (const NumType &, const NumType &) const
    virtual bool RejectMetric (const NumType &) const
    virtual bool Stop () const

    Protected Attributes

    Fields
    BVHSetType * myBVHSet1
    BVHSetType * myBVHSet2

    Additional Inherited Members

    Protected Member Functions inherited from BVH_BaseTraverse< NumType >
     BVH_BaseTraverse ()
     Destructor.
    virtual ~BVH_BaseTraverse ()=default
     Destructor.

    Detailed Description

    template<class NumType, int Dimension, class BVHSetType = void, class MetricType = NumType>
    class BVH_PairTraverse< NumType, Dimension, BVHSetType, MetricType >

    Abstract class implementing the parallel traverse of two binary trees. Selection of the data from the trees is performed by the rules defined in the Accept/Reject methods. See description of the required methods in the comments above.

    Template Parameters
    NumTypeNumeric data type
    DimensionVector dimension
    BVHSetTypeType of set containing the BVH tree (required to access the elements by the index)
    MetricTypeType of metric to perform more optimal tree descend

    Member Typedef Documentation

    ◆ BVH_VecNt

    template<class NumType, int Dimension, class BVHSetType = void, class MetricType = NumType>
    typedef BVH_Box<NumType,Dimension>::BVH_VecNt BVH_PairTraverse< NumType, Dimension, BVHSetType, MetricType >::BVH_VecNt

    Constructor & Destructor Documentation

    ◆ BVH_PairTraverse()

    template<class NumType, int Dimension, class BVHSetType = void, class MetricType = NumType>
    BVH_PairTraverse< NumType, Dimension, BVHSetType, MetricType >::BVH_PairTraverse ( )
    inline

    Member Function Documentation

    ◆ Accept()

    template<class NumType, int Dimension, class BVHSetType = void, class MetricType = NumType>
    virtual bool BVH_PairTraverse< NumType, Dimension, BVHSetType, MetricType >::Accept ( const int theIndex1,
    const int theIndex2 )
    pure virtual

    Leaf element acceptance. Returns true if the pair of elements is accepted, false otherwise.

    Implemented in BOPTools_PairSelector< Dimension >, BOPTools_PairSelector< 2 >, BOPTools_PairSelector< 3 >, BRepExtrema_OverlapTool, and IntPatch_BVHTraversal.

    ◆ RejectNode()

    template<class NumType, int Dimension, class BVHSetType = void, class MetricType = NumType>
    virtual bool BVH_PairTraverse< NumType, Dimension, BVHSetType, MetricType >::RejectNode ( const BVH_VecNt & theCornerMin1,
    const BVH_VecNt & theCornerMax1,
    const BVH_VecNt & theCornerMin2,
    const BVH_VecNt & theCornerMax2,
    MetricType & theMetric ) const
    pure virtual

    Leaf element acceptance. Returns true if the pair of elements is accepted, false otherwise.

    Implemented in BVH_PairDistance< NumType, Dimension, BVHSetType >.

    ◆ Select() [1/2]

    template<class NumType, int Dimension, class BVHSetType = void, class MetricType = NumType>
    int BVH_PairTraverse< NumType, Dimension, BVHSetType, MetricType >::Select ( )
    inline

    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.

    ◆ Select() [2/2]

    template<class NumType, int Dimension, class BVHSetType = void, class MetricType = NumType>
    int BVH_PairTraverse< NumType, Dimension, BVHSetType, MetricType >::Select ( const opencascade::handle< BVH_Tree< NumType, Dimension > > & theBVH1,
    const opencascade::handle< BVH_Tree< NumType, 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.

    ◆ SetBVHSets()

    template<class NumType, int Dimension, class BVHSetType = void, class MetricType = NumType>
    void BVH_PairTraverse< NumType, Dimension, BVHSetType, MetricType >::SetBVHSets ( BVHSetType * theBVHSet1,
    BVHSetType * theBVHSet2 )
    inline

    Field Documentation

    ◆ myBVHSet1

    template<class NumType, int Dimension, class BVHSetType = void, class MetricType = NumType>
    BVHSetType* BVH_PairTraverse< NumType, Dimension, BVHSetType, MetricType >::myBVHSet1
    protected

    ◆ myBVHSet2

    template<class NumType, int Dimension, class BVHSetType = void, class MetricType = NumType>
    BVHSetType* BVH_PairTraverse< NumType, Dimension, BVHSetType, MetricType >::myBVHSet2
    protected

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