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_Box< T, N > Class Template Reference

    Defines axis aligned bounding box (AABB) based on BVH vectors. More...

    #include <BVH_Box.hxx>

    Inheritance diagram for BVH_Box< T, N >:

    Public Types

    typedef BVH::VectorType< T, N >::Type BVH_VecNt

    Public Member Functions

    constexpr BVH_Box () noexcept
     Creates uninitialized bounding box.
    constexpr BVH_Box (const BVH_VecNt &thePoint) noexcept
     Creates bounding box of given point.
    constexpr BVH_Box (const BVH_VecNt &theMinPoint, const BVH_VecNt &theMaxPoint) noexcept
     Creates bounding box from corner points.
    constexpr void Clear () noexcept
     Clears bounding box.
    constexpr bool IsValid () const noexcept
     Is bounding box valid?
    void Add (const BVH_VecNt &thePoint)
     Appends new point to the bounding box.
    void Combine (const BVH_Box &theBox)
     Combines bounding box with another one.
    constexpr const BVH_VecNtCornerMin () const noexcept
     Returns minimum point of bounding box.
    constexpr const BVH_VecNtCornerMax () const noexcept
     Returns maximum point of bounding box.
    constexpr BVH_VecNtCornerMin () noexcept
     Returns minimum point of bounding box.
    constexpr BVH_VecNtCornerMax () noexcept
     Returns maximum point of bounding box.
    Area () const
     Returns surface area of bounding box. If the box is degenerated into line, returns the perimeter instead.
    constexpr BVH_VecNt Size () const
     Returns diagonal of bounding box.
    constexpr BVH_VecNt Center () const
     Returns center of bounding box.
    Center (const int theAxis) const
     Returns center of bounding box along the given axis.
    void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const
     Dumps the content of me into the stream.
    bool InitFromJson (const Standard_SStream &theSStream, int &theStreamPos)
     Inits the content of me from the stream.
    constexpr bool IsOut (const BVH_Box< T, N > &theOther) const
     Checks if the Box is out of the other box.
    constexpr bool IsOut (const BVH_VecNt &theMinPoint, const BVH_VecNt &theMaxPoint) const
     Checks if the Box is out of the other box defined by two points.
    constexpr bool Contains (const BVH_Box< T, N > &theOther, bool &hasOverlap) const
     Checks if the Box fully contains the other box.
    constexpr bool Contains (const BVH_VecNt &theMinPoint, const BVH_VecNt &theMaxPoint, bool &hasOverlap) const
     Checks if the Box is fully contains the other box.
    constexpr bool IsOut (const BVH_VecNt &thePoint) const
     Checks if the Point is out of the box.

    Protected Attributes

    BVH_VecNt myMinPoint
     Minimum point of bounding box (max<T> when invalid).
    BVH_VecNt myMaxPoint
     Maximum point of bounding box (lowest<T> when invalid).

    Detailed Description

    template<class T, int N>
    class BVH_Box< T, N >

    Defines axis aligned bounding box (AABB) based on BVH vectors.

    Template Parameters
    TNumeric data type
    NVector dimension

    Member Typedef Documentation

    ◆ BVH_VecNt

    template<class T, int N>
    typedef BVH::VectorType<T,N>::Type BVH_Box< T, N >::BVH_VecNt

    Constructor & Destructor Documentation

    ◆ BVH_Box() [1/3]

    template<class T, int N>
    BVH_Box< T, N >::BVH_Box ( )
    inlineconstexprnoexcept

    Creates uninitialized bounding box.

    ◆ BVH_Box() [2/3]

    template<class T, int N>
    BVH_Box< T, N >::BVH_Box ( const BVH_VecNt & thePoint)
    inlineconstexprnoexcept

    Creates bounding box of given point.

    ◆ BVH_Box() [3/3]

    template<class T, int N>
    BVH_Box< T, N >::BVH_Box ( const BVH_VecNt & theMinPoint,
    const BVH_VecNt & theMaxPoint )
    inlineconstexprnoexcept

    Creates bounding box from corner points.

    Member Function Documentation

    ◆ Add()

    template<class T, int N>
    void BVH_Box< T, N >::Add ( const BVH_VecNt & thePoint)

    Appends new point to the bounding box.

    ◆ Area()

    template<class T, int N>
    T BVH_Box< T, N >::Area ( ) const

    Returns surface area of bounding box. If the box is degenerated into line, returns the perimeter instead.

    ◆ Center() [1/2]

    template<class T, int N>
    BVH_VecNt BVH_Box< T, N >::Center ( ) const
    inlineconstexpr

    Returns center of bounding box.

    ◆ Center() [2/2]

    template<class T, int N>
    T BVH_Box< T, N >::Center ( const int theAxis) const
    inline

    Returns center of bounding box along the given axis.

    ◆ Clear()

    template<class T, int N>
    void BVH_Box< T, N >::Clear ( )
    inlineconstexprnoexcept

    Clears bounding box.

    ◆ Combine()

    template<class T, int N>
    void BVH_Box< T, N >::Combine ( const BVH_Box< T, N > & theBox)

    Combines bounding box with another one.

    ◆ Contains() [1/2]

    template<class T, int N>
    bool BVH_Box< T, N >::Contains ( const BVH_Box< T, N > & theOther,
    bool & hasOverlap ) const
    inlineconstexpr

    Checks if the Box fully contains the other box.

    ◆ Contains() [2/2]

    template<class T, int N>
    bool BVH_Box< T, N >::Contains ( const BVH_VecNt & theMinPoint,
    const BVH_VecNt & theMaxPoint,
    bool & hasOverlap ) const
    inlineconstexpr

    Checks if the Box is fully contains the other box.

    ◆ CornerMax() [1/2]

    template<class T, int N>
    const BVH_VecNt & BVH_Box< T, N >::CornerMax ( ) const
    inlineconstexprnoexcept

    Returns maximum point of bounding box.

    ◆ CornerMax() [2/2]

    template<class T, int N>
    BVH_VecNt & BVH_Box< T, N >::CornerMax ( )
    inlineconstexprnoexcept

    Returns maximum point of bounding box.

    ◆ CornerMin() [1/2]

    template<class T, int N>
    const BVH_VecNt & BVH_Box< T, N >::CornerMin ( ) const
    inlineconstexprnoexcept

    Returns minimum point of bounding box.

    ◆ CornerMin() [2/2]

    template<class T, int N>
    BVH_VecNt & BVH_Box< T, N >::CornerMin ( )
    inlineconstexprnoexcept

    Returns minimum point of bounding box.

    ◆ DumpJson()

    template<class T, int N>
    void BVH_Box< T, N >::DumpJson ( Standard_OStream & theOStream,
    int theDepth = -1 ) const
    inline

    Dumps the content of me into the stream.

    ◆ InitFromJson()

    template<class T, int N>
    bool BVH_Box< T, N >::InitFromJson ( const Standard_SStream & theSStream,
    int & theStreamPos )
    inline

    Inits the content of me from the stream.

    ◆ IsOut() [1/3]

    template<class T, int N>
    bool BVH_Box< T, N >::IsOut ( const BVH_Box< T, N > & theOther) const
    inlineconstexpr

    Checks if the Box is out of the other box.

    ◆ IsOut() [2/3]

    template<class T, int N>
    bool BVH_Box< T, N >::IsOut ( const BVH_VecNt & theMinPoint,
    const BVH_VecNt & theMaxPoint ) const
    inlineconstexpr

    Checks if the Box is out of the other box defined by two points.

    ◆ IsOut() [3/3]

    template<class T, int N>
    bool BVH_Box< T, N >::IsOut ( const BVH_VecNt & thePoint) const
    inlineconstexpr

    Checks if the Point is out of the box.

    ◆ IsValid()

    template<class T, int N>
    bool BVH_Box< T, N >::IsValid ( ) const
    inlineconstexprnoexcept

    Is bounding box valid?

    ◆ Size()

    template<class T, int N>
    BVH_VecNt BVH_Box< T, N >::Size ( ) const
    inlineconstexpr

    Returns diagonal of bounding box.

    Field Documentation

    ◆ myMaxPoint

    template<class T, int N>
    BVH_VecNt BVH_Box< T, N >::myMaxPoint
    protected

    Maximum point of bounding box (lowest<T> when invalid).

    ◆ myMinPoint

    template<class T, int N>
    BVH_VecNt BVH_Box< T, N >::myMinPoint
    protected

    Minimum point of bounding box (max<T> when invalid).


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