OCCT3D 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_Traverse< NumType, Dimension, BVHSetType, MetricType > Class Template Referenceabstract

    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>

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

    Data Structures

    struct  BVH_NodeInStack

    Public Types

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

    Public Member Functions

    Constructor

    Constructor

     BVH_Traverse ()
    Setting the set to access the elements and BVH tree

    Sets the BVH Set containing the BVH tree

    void SetBVHSet (BVHSetType *theBVHSet)
    Rules for Accept/Reject

    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.

    virtual bool AcceptMetric (const MetricType &) const
     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.
    virtual bool 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.
    virtual bool Accept (const int 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.
    Selection

    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.

    int Select ()
     Performs selection of the elements from the BVH tree by the rules defined in Accept/Reject methods. Returns the number of accepted elements.
    int 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.
    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 * myBVHSet

    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_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
    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_Traverse< NumType, Dimension, BVHSetType, MetricType >::BVH_VecNt

    Constructor & Destructor Documentation

    ◆ BVH_Traverse()

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

    Member Function Documentation

    ◆ Accept()

    template<class NumType, int Dimension, class BVHSetType = void, class MetricType = NumType>
    virtual bool BVH_Traverse< NumType, Dimension, BVHSetType, MetricType >::Accept ( const int theIndex,
    const MetricType & theMetric )
    pure virtual

    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 >, BOPTools_BoxSelector< 2 >, BOPTools_BoxSelector< 3 >, and BRepExtrema_ProximityDistTool.

    ◆ AcceptMetric()

    template<class NumType, int Dimension, class BVHSetType = void, class MetricType = NumType>
    virtual bool BVH_Traverse< NumType, Dimension, BVHSetType, MetricType >::AcceptMetric ( const MetricType & ) const
    inlinevirtual

    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.

    Reimplemented in BOPTools_BoxSelector< Dimension >, BOPTools_BoxSelector< 2 >, and BOPTools_BoxSelector< 3 >.

    ◆ RejectNode()

    template<class NumType, int Dimension, class BVHSetType = void, class MetricType = NumType>
    virtual bool BVH_Traverse< NumType, Dimension, BVHSetType, MetricType >::RejectNode ( const BVH_VecNt & theCornerMin,
    const BVH_VecNt & theCornerMax,
    MetricType & theMetric ) const
    pure virtual

    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>
    int BVH_Traverse< NumType, Dimension, BVHSetType, MetricType >::Select ( )
    inline

    Performs selection of the elements from the BVH tree by the rules defined in Accept/Reject methods. Returns the number of accepted elements.

    ◆ Select() [2/2]

    template<class NumType, int Dimension, class BVHSetType = void, class MetricType = NumType>
    int BVH_Traverse< NumType, Dimension, BVHSetType, MetricType >::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.

    ◆ SetBVHSet()

    template<class NumType, int Dimension, class BVHSetType = void, class MetricType = NumType>
    void BVH_Traverse< NumType, Dimension, BVHSetType, MetricType >::SetBVHSet ( BVHSetType * theBVHSet)
    inline

    Field Documentation

    ◆ 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: