|
Open CASCADE Technology
7.7.2
|
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 | |
| OpenGl_Clipping () | |
| Default constructor. More... | |
| void | Init () |
| Initialize. More... | |
| void | Reset (const Handle< Graphic3d_SequenceOfHClipPlane > &thePlanes) |
| Setup list of global (for entire view) clipping planes and clears local plane list if it was not released before. More... | |
| void | SetLocalPlanes (const Handle< Graphic3d_SequenceOfHClipPlane > &thePlanes) |
| Setup list of local (for current object) clipping planes. More... | |
| Standard_Boolean | IsCappingOn () const |
| Standard_Boolean | IsClippingOrCappingOn () const |
| Standard_Integer | NbClippingOrCappingOn () const |
| Standard_Boolean | HasClippingChains () const |
| Return TRUE if there are clipping chains in the list (defining more than 1 sub-plane) More... | |
advanced method for disabling defined planes | |
| Standard_Boolean | HasDisabled () const |
| Return true if some clipping planes have been temporarily disabled. More... | |
| Standard_Boolean | SetEnabled (const OpenGl_ClippingIterator &thePlane, const Standard_Boolean theIsEnabled) |
| Disable plane temporarily. More... | |
| void | DisableGlobal () |
| Temporarily disable all planes from the global (view) list, keep only local (object) list. More... | |
| void | RestoreDisabled () |
| Restore all temporarily disabled planes. Does NOT affect constantly disabled planes Graphic3d_ClipPlane::IsOn(). More... | |
capping algorithm filter | |
| const Handle< Graphic3d_ClipPlane > & | CappedChain () const |
| Chain which is either temporary disabled or the only one enabled for Capping algorithm. More... | |
| Standard_Integer | CappedSubPlane () const |
| Sub-plane index within filtered Chain; positive number for DisableAllExcept and negative for EnableAllExcept. More... | |
| bool | IsCappingFilterOn () const |
| Return TRUE if capping algorithm is in state, when all clipping planes are temporarily disabled except currently processed one. More... | |
| bool | IsCappingDisableAllExcept () const |
| Return TRUE if capping algorithm is in state, when all clipping planes are temporarily disabled except currently processed one. More... | |
| bool | IsCappingEnableAllExcept () const |
| Return TRUE if capping algorithm is in state, when all clipping planes are enabled except currently rendered one. More... | |
| void | DisableAllExcept (const Handle< Graphic3d_ClipPlane > &theChain, const Standard_Integer theSubPlaneIndex) |
| Temporarily disable all planes except specified one for Capping algorithm. Does not affect already disabled planes. More... | |
| void | EnableAllExcept (const Handle< Graphic3d_ClipPlane > &theChain, const Standard_Integer theSubPlaneIndex) |
| Enable back planes disabled by ::DisableAllExcept() for Capping algorithm. Keeps only specified plane enabled. More... | |
| void | ResetCappingFilter () |
| Resets chain filter for Capping algorithm. More... | |
clipping state modification commands | |
| void | add (const Handle< Graphic3d_SequenceOfHClipPlane > &thePlanes, const Standard_Integer theStartIndex) |
| 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. More... | |
| void | remove (const Handle< Graphic3d_SequenceOfHClipPlane > &thePlanes, const Standard_Integer theStartIndex) |
| Remove the passed set of clipping planes from the context state. More... | |
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.
| OpenGl_Clipping::OpenGl_Clipping | ( | ) |
Default constructor.
|
protected |
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().
| 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. |
|
inline |
Chain which is either temporary disabled or the only one enabled for Capping algorithm.
|
inline |
Sub-plane index within filtered Chain; positive number for DisableAllExcept and negative for EnableAllExcept.
| void OpenGl_Clipping::DisableAllExcept | ( | const Handle< Graphic3d_ClipPlane > & | theChain, |
| const Standard_Integer | theSubPlaneIndex | ||
| ) |
Temporarily disable all planes except specified one for Capping algorithm. Does not affect already disabled planes.
| void OpenGl_Clipping::DisableGlobal | ( | ) |
Temporarily disable all planes from the global (view) list, keep only local (object) list.
| void OpenGl_Clipping::EnableAllExcept | ( | const Handle< Graphic3d_ClipPlane > & | theChain, |
| const Standard_Integer | theSubPlaneIndex | ||
| ) |
Enable back planes disabled by ::DisableAllExcept() for Capping algorithm. Keeps only specified plane enabled.
|
inline |
Return TRUE if there are clipping chains in the list (defining more than 1 sub-plane)
|
inline |
Return true if some clipping planes have been temporarily disabled.
| void OpenGl_Clipping::Init | ( | ) |
Initialize.
|
inline |
Return TRUE if capping algorithm is in state, when all clipping planes are temporarily disabled except currently processed one.
|
inline |
Return TRUE if capping algorithm is in state, when all clipping planes are enabled except currently rendered one.
|
inline |
Return TRUE if capping algorithm is in state, when all clipping planes are temporarily disabled except currently processed one.
|
inline |
|
inline |
|
inline |
|
protected |
Remove the passed set of clipping planes from the context state.
| thePlanes | [in] the planes to remove from list. |
| void OpenGl_Clipping::Reset | ( | const 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 OpenGl_Clipping::ResetCappingFilter | ( | ) |
Resets chain filter for Capping algorithm.
| void OpenGl_Clipping::RestoreDisabled | ( | ) |
Restore all temporarily disabled planes. Does NOT affect constantly disabled planes Graphic3d_ClipPlane::IsOn().
| Standard_Boolean OpenGl_Clipping::SetEnabled | ( | const OpenGl_ClippingIterator & | thePlane, |
| const Standard_Boolean | theIsEnabled | ||
| ) |
Disable plane temporarily.
| void OpenGl_Clipping::SetLocalPlanes | ( | const Handle< Graphic3d_SequenceOfHClipPlane > & | thePlanes | ) |
Setup list of local (for current object) clipping planes.
1.8.10