Open CASCADE Technology: OpenGl_Clipping Class Reference

Open CASCADE Technology 6.8.0

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Data Structures | Public Types
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 Types
enum | EquationCoords { EquationCoords_View, EquationCoords_World }
| Enumerates supported equation coordinate spaces. More...

## Public Member Functions
general methods
| OpenGl_Clipping ()
| Default constructor. More...
void | Init (const Standard_Integer theMaxPlanes)
| Initialize. More...
non-modifying getters
Standard_Boolean | Contains (const Handle< Graphic3d_ClipPlane > &thePlane) const
| Check whether the clipping plane has been added to the current context state. More...
const Graphic3d_SequenceOfHClipPlane & | Planes () const
| Get clip planes defined for context. More...
EquationCoords | GetEquationSpace (const Handle< Graphic3d_ClipPlane > &thePlane) const
Standard_Boolean | IsEnabled (const Handle< Graphic3d_ClipPlane > &thePlane) const
| Check whether the clipping plane has been set and enabled for the current context state. More...
Standard_Boolean | IsClippingOn () const
Standard_Boolean | IsCappingOn () const
Standard_Boolean | IsClippingOrCappingOn () const
clipping state modification commands
void | Add (Graphic3d_SequenceOfHClipPlane &thePlanes, const EquationCoords &theCoordSpace, const Handle< OpenGl_Workspace > &theWS)
| 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 | Add (Graphic3d_SequenceOfHClipPlane &thePlanes, const EquationCoords &theCoordSpace)
| Add planes to the context clipping at the specified system of coordinates. This method assumes that appropriate matrix is already set in context state. If the number of the passed planes exceeds capabilities of OpenGl, the last planes are simply ignored. More...
void | Remove (const Graphic3d_SequenceOfHClipPlane &thePlanes)
| Remove the passed set of clipping planes from the context state. More...
void | SetEnabled (const Handle< Graphic3d_ClipPlane > &thePlane, const Standard_Boolean theIsEnabled)
| Enable or disable clipping plane in the OpenGl context. More...

## Short-cuts
void | AddView (Graphic3d_SequenceOfHClipPlane &thePlanes, const Handle< OpenGl_Workspace > &theWS)
| Add planes to the context clipping at the view system of coordinates. If the number of the passed planes exceeds capabilities of OpenGl, the last planes are simply ignored. More...
void | AddView (Graphic3d_SequenceOfHClipPlane &thePlanes)
| Add planes to the context clipping at the view system of coordinates. If the number of the passed planes exceeds capabilities of OpenGl, the last planes are simply ignored. More...
void | AddWorld (Graphic3d_SequenceOfHClipPlane &thePlanes, const Handle< OpenGl_Workspace > &theWS)
| Add planes to the context clipping at the world system of coordinates. If the number of the passed planes exceeds capabilities of OpenGl, the last planes are simply ignored. More...
void | AddWorld (Graphic3d_SequenceOfHClipPlane &thePlanes)
| Add planes to the context clipping at the world system of coordinates. If the number of the passed planes exceeds capabilities of OpenGl, the last planes are simply ignored. More...
void | RemoveAll ()
| Remove all of the planes from context state. More...

## 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.

## Member Enumeration Documentation

enum OpenGl_Clipping::EquationCoords

Enumerates supported equation coordinate spaces.

Enumerator
EquationCoords_View |
EquationCoords_World |

## Constructor & Destructor Documentation

OpenGl_Clipping::OpenGl_Clipping | ( |  | ) |

Default constructor.

## Member Function Documentation

void OpenGl_Clipping::Add | ( | Graphic3d_SequenceOfHClipPlane & | thePlanes,
|  | const EquationCoords & | theCoordSpace,
|  | const Handle< OpenGl_Workspace > & | theWS
| ) |  |

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.

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.
  theCoordSpace | [in] the equation definition space.
  theWS | [in] the workspace to access the matrices.

void OpenGl_Clipping::Add | ( | Graphic3d_SequenceOfHClipPlane & | thePlanes,
|  | const EquationCoords & | theCoordSpace
| ) |  |

Add planes to the context clipping at the specified system of coordinates. This method assumes that appropriate matrix is already set in context state. If the number of the passed planes exceeds capabilities of OpenGl, the last planes are simply ignored.

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.
  theCoordSpace | [in] the equation definition space.

void OpenGl_Clipping::AddView | ( | Graphic3d_SequenceOfHClipPlane & | thePlanes,
|  | const Handle< OpenGl_Workspace > & | theWS
| ) |  |
| inline

Add planes to the context clipping at the view system of coordinates. If the number of the passed planes exceeds capabilities of OpenGl, the last planes are simply ignored.

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.
  theWS | [in] the workspace to access the matrices.

void OpenGl_Clipping::AddView | ( | Graphic3d_SequenceOfHClipPlane & | thePlanes | ) |
| inline

Add planes to the context clipping at the view system of coordinates. If the number of the passed planes exceeds capabilities of OpenGl, the last planes are simply ignored.

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 OpenGl_Clipping::AddWorld | ( | Graphic3d_SequenceOfHClipPlane & | thePlanes,
|  | const Handle< OpenGl_Workspace > & | theWS
| ) |  |
| inline

Add planes to the context clipping at the world system of coordinates. If the number of the passed planes exceeds capabilities of OpenGl, the last planes are simply ignored.

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.
  theWS | [in] the workspace to access the matrices.

void OpenGl_Clipping::AddWorld | ( | Graphic3d_SequenceOfHClipPlane & | thePlanes | ) |
| inline

Add planes to the context clipping at the world system of coordinates. If the number of the passed planes exceeds capabilities of OpenGl, the last planes are simply ignored.

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.

Standard_Boolean OpenGl_Clipping::Contains | ( | const Handle< Graphic3d_ClipPlane > & | thePlane | ) | const
| inline

Check whether the clipping plane has been added to the current context state.

Parameters

  thePlane | [in] the plane to check.

Returns
  True if plane is set.

EquationCoords OpenGl_Clipping::GetEquationSpace | ( | const Handle< Graphic3d_ClipPlane > & | thePlane | ) | const
| inline

Returns
  kind of equation coordinate space used for the clip plane.

void OpenGl_Clipping::Init | ( | const Standard_Integer | theMaxPlanes | ) |

Initialize.

Parameters

  theMaxPlanes | [in] number of clipping planes supported by OpenGl context.

Standard_Boolean OpenGl_Clipping::IsCappingOn | ( |  | ) | const
| inline

Returns
  true if there are enabled capping planes

Standard_Boolean OpenGl_Clipping::IsClippingOn | ( |  | ) | const
| inline

Returns
  true if there are enabled clipping planes (NOT capping)

Standard_Boolean OpenGl_Clipping::IsClippingOrCappingOn | ( |  | ) | const
| inline

Returns
  true if there are enabled clipping or capping planes

Standard_Boolean OpenGl_Clipping::IsEnabled | ( | const Handle< Graphic3d_ClipPlane > & | thePlane | ) | const
| inline

Check whether the clipping plane has been set and enabled for the current context state.

Parameters

  thePlane | [in] the plane to check.

Returns
  True if plane is enabled.

const Graphic3d_SequenceOfHClipPlane& OpenGl_Clipping::Planes | ( |  | ) | const
| inline

Get clip planes defined for context.

Returns
  sequence of set clipping planes.

void OpenGl_Clipping::Remove | ( | const Graphic3d_SequenceOfHClipPlane & | thePlanes | ) |

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

Parameters

  thePlanes | [in] the planes to remove from list.

void OpenGl_Clipping::RemoveAll | ( |  | ) |
| inline

Remove all of the planes from context state.

void OpenGl_Clipping::SetEnabled | ( | const Handle< Graphic3d_ClipPlane > & | thePlane,
|  | const Standard_Boolean | theIsEnabled
| ) |  |

Enable or disable clipping plane in the OpenGl context.

Parameters

  thePlane | [in] the plane to affect.
  theIsEnabled | [in] the state of the plane.

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

- OpenGl_Clipping.hxx