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
    OpenGl_Clipping Class Reference

    This class contains logics related to tracking and modification of clipping plane state for particular OpenGl context. It contains information about enabled clipping planes and provides method to change clippings in context. The methods should be executed within OpenGl context associated with instance of this class. More...

    #include <OpenGl_Clipping.hxx>

    Public Member Functions

    general methods

    Default constructor.

     OpenGl_Clipping ()
     Initialize.
    void Init ()
     Initialize.
    void Reset (const occ::handle< Graphic3d_SequenceOfHClipPlane > &thePlanes)
     Setup list of global (for entire view) clipping planes and clears local plane list if it was not released before.
    void SetLocalPlanes (const occ::handle< Graphic3d_SequenceOfHClipPlane > &thePlanes)
     Setup list of local (for current object) clipping planes.
    bool IsCappingOn () const
    bool IsClippingOrCappingOn () const
    int NbClippingOrCappingOn () const
    bool HasClippingChains () const
     Return TRUE if there are clipping chains in the list (defining more than 1 sub-plane).
    advanced method for disabling defined planes

    Return true if some clipping planes have been temporarily disabled.

    bool HasDisabled () const
     Disable plane temporarily.
    bool SetEnabled (const OpenGl_ClippingIterator &thePlane, const bool theIsEnabled)
     Disable plane temporarily.
    void DisableGlobal ()
     Temporarily disable all planes from the global (view) list, keep only local (object) list.
    void RestoreDisabled ()
     Restore all temporarily disabled planes. Does NOT affect constantly disabled planes Graphic3d_ClipPlane::IsOn().
    capping algorithm filter
    const occ::handle< Graphic3d_ClipPlane > & CappedChain () const
     Chain which is either temporary disabled or the only one enabled for Capping algorithm.
    int CappedSubPlane () const
     Sub-plane index within filtered Chain; positive number for DisableAllExcept and negative for EnableAllExcept.
    bool IsCappingFilterOn () const
     Return TRUE if capping algorithm is in state, when all clipping planes are temporarily disabled except currently processed one.
    bool IsCappingDisableAllExcept () const
     Return TRUE if capping algorithm is in state, when all clipping planes are temporarily disabled except currently processed one.
    bool IsCappingEnableAllExcept () const
     Return TRUE if capping algorithm is in state, when all clipping planes are enabled except currently rendered one.
    void DisableAllExcept (const occ::handle< Graphic3d_ClipPlane > &theChain, const int theSubPlaneIndex)
     Temporarily disable all planes except specified one for Capping algorithm. Does not affect already disabled planes.
    void EnableAllExcept (const occ::handle< Graphic3d_ClipPlane > &theChain, const int theSubPlaneIndex)
     Enable back planes disabled by ::DisableAllExcept() for Capping algorithm. Keeps only specified plane enabled.
    void ResetCappingFilter ()
     Resets chain filter for Capping algorithm.

    clipping state modification commands

    Add planes to the context clipping at the specified system of coordinates. This methods loads appropriate transformation matrix from workspace to to transform equation coordinates. The planes become enabled in the context. If the number of the passed planes exceeds capabilities of OpenGl, the last planes are simply ignored.

    Within FFP, method also temporarily resets ModelView matrix before calling glClipPlane(). Otherwise the method just redirects to addLazy().

    Parameters
    thePlanes[in/out] the list of planes to be added The list then provides information on which planes were really added to clipping state. This list then can be used to fall back to previous state.
    void add (const occ::handle< Graphic3d_SequenceOfHClipPlane > &thePlanes, const int theStartIndex)
     global clipping planes
    void remove (const occ::handle< Graphic3d_SequenceOfHClipPlane > &thePlanes, const int theStartIndex)
     Remove the passed set of clipping planes from the context state.

    Detailed Description

    This class contains logics related to tracking and modification of clipping plane state for particular OpenGl context. It contains information about enabled clipping planes and provides method to change clippings in context. The methods should be executed within OpenGl context associated with instance of this class.

    Constructor & Destructor Documentation

    ◆ OpenGl_Clipping()

    OpenGl_Clipping::OpenGl_Clipping ( )

    Initialize.

    Member Function Documentation

    ◆ add()

    void OpenGl_Clipping::add ( const occ::handle< Graphic3d_SequenceOfHClipPlane > & thePlanes,
    const int theStartIndex )
    protected

    global clipping planes

    ◆ CappedChain()

    const occ::handle< Graphic3d_ClipPlane > & OpenGl_Clipping::CappedChain ( ) const
    inline

    Chain which is either temporary disabled or the only one enabled for Capping algorithm.

    ◆ CappedSubPlane()

    int OpenGl_Clipping::CappedSubPlane ( ) const
    inline

    Sub-plane index within filtered Chain; positive number for DisableAllExcept and negative for EnableAllExcept.

    ◆ DisableAllExcept()

    void OpenGl_Clipping::DisableAllExcept ( const occ::handle< Graphic3d_ClipPlane > & theChain,
    const int theSubPlaneIndex )

    Temporarily disable all planes except specified one for Capping algorithm. Does not affect already disabled planes.

    ◆ DisableGlobal()

    void OpenGl_Clipping::DisableGlobal ( )

    Temporarily disable all planes from the global (view) list, keep only local (object) list.

    ◆ EnableAllExcept()

    void OpenGl_Clipping::EnableAllExcept ( const occ::handle< Graphic3d_ClipPlane > & theChain,
    const int theSubPlaneIndex )

    Enable back planes disabled by ::DisableAllExcept() for Capping algorithm. Keeps only specified plane enabled.

    ◆ HasClippingChains()

    bool OpenGl_Clipping::HasClippingChains ( ) const
    inline

    Return TRUE if there are clipping chains in the list (defining more than 1 sub-plane).

    ◆ HasDisabled()

    bool OpenGl_Clipping::HasDisabled ( ) const
    inline

    Disable plane temporarily.

    ◆ Init()

    void OpenGl_Clipping::Init ( )

    Initialize.

    ◆ IsCappingDisableAllExcept()

    bool OpenGl_Clipping::IsCappingDisableAllExcept ( ) const
    inline

    Return TRUE if capping algorithm is in state, when all clipping planes are temporarily disabled except currently processed one.

    ◆ IsCappingEnableAllExcept()

    bool OpenGl_Clipping::IsCappingEnableAllExcept ( ) const
    inline

    Return TRUE if capping algorithm is in state, when all clipping planes are enabled except currently rendered one.

    ◆ IsCappingFilterOn()

    bool OpenGl_Clipping::IsCappingFilterOn ( ) const
    inline

    Return TRUE if capping algorithm is in state, when all clipping planes are temporarily disabled except currently processed one.

    ◆ IsCappingOn()

    bool OpenGl_Clipping::IsCappingOn ( ) const
    inline
    Returns
    true if there are enabled capping planes

    ◆ IsClippingOrCappingOn()

    bool OpenGl_Clipping::IsClippingOrCappingOn ( ) const
    inline
    Returns
    true if there are enabled clipping or capping planes

    ◆ NbClippingOrCappingOn()

    int OpenGl_Clipping::NbClippingOrCappingOn ( ) const
    inline
    Returns
    number of enabled clipping + capping planes

    ◆ remove()

    void OpenGl_Clipping::remove ( const occ::handle< Graphic3d_SequenceOfHClipPlane > & thePlanes,
    const int theStartIndex )
    protected

    Remove the passed set of clipping planes from the context state.

    Parameters
    [in]thePlanesthe planes to remove from list.

    ◆ Reset()

    void OpenGl_Clipping::Reset ( const occ::handle< Graphic3d_SequenceOfHClipPlane > & thePlanes)

    Setup list of global (for entire view) clipping planes and clears local plane list if it was not released before.

    ◆ ResetCappingFilter()

    void OpenGl_Clipping::ResetCappingFilter ( )

    Resets chain filter for Capping algorithm.

    ◆ RestoreDisabled()

    void OpenGl_Clipping::RestoreDisabled ( )

    Restore all temporarily disabled planes. Does NOT affect constantly disabled planes Graphic3d_ClipPlane::IsOn().

    ◆ SetEnabled()

    bool OpenGl_Clipping::SetEnabled ( const OpenGl_ClippingIterator & thePlane,
    const bool theIsEnabled )

    Disable plane temporarily.

    ◆ SetLocalPlanes()

    void OpenGl_Clipping::SetLocalPlanes ( const occ::handle< Graphic3d_SequenceOfHClipPlane > & thePlanes)

    Setup list of local (for current object) clipping planes.


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