Open CASCADE Technology  7.3.0
Public Types | Public Member Functions

Graphic3d_ClipPlane Class Reference

Container for properties describing graphic driver clipping planes. It is up to application to create instances of this class and specify its properties. The instances are passed into graphic driver or other facilities that implement clipping features (e.g. selection). Depending on usage context the class can be used to specify: More...

#include <Graphic3d_ClipPlane.hxx>

Inheritance diagram for Graphic3d_ClipPlane:
Inheritance graph
[legend]

Public Types

typedef NCollection_Vec4< Standard_RealEquation
 
- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 

Public Member Functions

 Graphic3d_ClipPlane ()
 Default constructor. Initializes clip plane container with the following properties: More...
 
 Graphic3d_ClipPlane (const Graphic3d_ClipPlane &theOther)
 Copy constructor. More...
 
 Graphic3d_ClipPlane (const Equation &theEquation)
 Construct clip plane for the passed equation. By default the plane is on, capping is turned off. More...
 
 Graphic3d_ClipPlane (const gp_Pln &thePlane)
 Construct clip plane from the passed geometrical definition. By default the plane is on, capping is turned off. More...
 
void SetEquation (const gp_Pln &thePlane)
 Set plane equation by its geometrical definition. The equation is specified in "world" coordinate system. More...
 
void SetEquation (const Equation &theEquation)
 Set 4-component equation vector for clipping plane. The equation is specified in "world" coordinate system. More...
 
const EquationGetEquation () const
 Get 4-component equation vector for clipping plane. More...
 
Standard_Boolean IsOn () const
 Check that the clipping plane is turned on. More...
 
void SetOn (const Standard_Boolean theIsOn)
 Change state of the clipping plane. More...
 
void SetCapping (const Standard_Boolean theIsOn)
 Change state of capping surface rendering. More...
 
Standard_Boolean IsCapping () const
 Check state of capping surface rendering. More...
 
const gp_PlnToPlane () const
 Get geometrical definition. More...
 
virtual Handle< Graphic3d_ClipPlaneClone () const
 Clone plane. Virtual method to simplify copying procedure if plane class is redefined at application level to add specific fields to it e.g. id, name, etc. More...
 
void SetCappingMaterial (const Graphic3d_MaterialAspect &theMat)
 Set material for rendering capping surface. More...
 
const Graphic3d_MaterialAspectCappingMaterial () const
 
void SetCappingTexture (const Handle< Graphic3d_TextureMap > &theTexture)
 Set texture to be applied on capping surface. More...
 
Handle< Graphic3d_TextureMapCappingTexture () const
 
void SetCappingHatch (const Aspect_HatchStyle theStyle)
 Set hatch style (stipple) and turn hatching on. More...
 
Aspect_HatchStyle CappingHatch () const
 
void SetCappingCustomHatch (const Handle< Graphic3d_HatchStyle > &theStyle)
 Set custom hatch style (stipple) and turn hatching on. More...
 
const Handle< Graphic3d_HatchStyle > & CappingCustomHatch () const
 
void SetCappingHatchOn ()
 Turn on hatching. More...
 
void SetCappingHatchOff ()
 Turn off hatching. More...
 
Standard_Boolean IsHatchOn () const
 
const TCollection_AsciiStringGetId () const
 This ID is used for managing associated resources in graphical driver. The clip plane can be assigned within a range of IO which can be displayed in separate OpenGl contexts. For each of the context an associated OpenGl resource for graphical aspects should be created and kept. The resources are stored in graphical driver for each of individual groups of shared context under the clip plane identifier. More...
 
const Handle< Graphic3d_AspectFillArea3d > & CappingAspect () const
 Return capping aspect. More...
 
void SetCappingAspect (const Handle< Graphic3d_AspectFillArea3d > &theAspect)
 Assign capping aspect. More...
 
bool ToUseObjectMaterial () const
 Flag indicating whether material for capping plane should be taken from object. Default value: FALSE (use dedicated capping plane material). More...
 
void SetUseObjectMaterial (bool theToUse)
 Set flag for controlling the source of capping plane material. More...
 
bool ToUseObjectTexture () const
 Flag indicating whether texture for capping plane should be taken from object. Default value: FALSE. More...
 
void SetUseObjectTexture (bool theToUse)
 Set flag for controlling the source of capping plane texture. More...
 
bool ToUseObjectShader () const
 Flag indicating whether shader program for capping plane should be taken from object. Default value: FALSE. More...
 
void SetUseObjectShader (bool theToUse)
 Set flag for controlling the source of capping plane shader program. More...
 
bool ToUseObjectProperties () const
 Return true if some fill area aspect properties should be taken from object. More...
 
unsigned int MCountEquation () const
 
unsigned int MCountAspect () const
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 

Detailed Description

Container for properties describing graphic driver clipping planes. It is up to application to create instances of this class and specify its properties. The instances are passed into graphic driver or other facilities that implement clipping features (e.g. selection). Depending on usage context the class can be used to specify:

Member Typedef Documentation

◆ Equation

Constructor & Destructor Documentation

◆ Graphic3d_ClipPlane() [1/4]

Graphic3d_ClipPlane::Graphic3d_ClipPlane ( )

Default constructor. Initializes clip plane container with the following properties:

  • Equation (0.0, 0.0, 1.0, 0)
  • IsOn (True),
  • IsCapping (False),
  • Material (Graphic3d_NOM_DEFAULT),
  • Texture (NULL),
  • HatchStyle (Aspect_HS_HORIZONTAL),
  • IsHatchOn (False)

◆ Graphic3d_ClipPlane() [2/4]

Graphic3d_ClipPlane::Graphic3d_ClipPlane ( const Graphic3d_ClipPlane theOther)

Copy constructor.

Parameters
theOther[in] the copied plane.

◆ Graphic3d_ClipPlane() [3/4]

Graphic3d_ClipPlane::Graphic3d_ClipPlane ( const Equation theEquation)

Construct clip plane for the passed equation. By default the plane is on, capping is turned off.

Parameters
theEquation[in] the plane equation.

◆ Graphic3d_ClipPlane() [4/4]

Graphic3d_ClipPlane::Graphic3d_ClipPlane ( const gp_Pln thePlane)

Construct clip plane from the passed geometrical definition. By default the plane is on, capping is turned off.

Parameters
thePlane[in] the plane.

Member Function Documentation

◆ CappingAspect()

const Handle< Graphic3d_AspectFillArea3d >& Graphic3d_ClipPlane::CappingAspect ( ) const
inline

Return capping aspect.

Returns
capping surface rendering aspect.

◆ CappingCustomHatch()

const Handle< Graphic3d_HatchStyle >& Graphic3d_ClipPlane::CappingCustomHatch ( ) const
inline
Returns
hatching style.

◆ CappingHatch()

Aspect_HatchStyle Graphic3d_ClipPlane::CappingHatch ( ) const
inline
Returns
hatching style.

◆ CappingMaterial()

const Graphic3d_MaterialAspect& Graphic3d_ClipPlane::CappingMaterial ( ) const
inline
Returns
capping material.

◆ CappingTexture()

Handle< Graphic3d_TextureMap > Graphic3d_ClipPlane::CappingTexture ( ) const
inline
Returns
capping texture map.

◆ Clone()

virtual Handle< Graphic3d_ClipPlane > Graphic3d_ClipPlane::Clone ( ) const
virtual

Clone plane. Virtual method to simplify copying procedure if plane class is redefined at application level to add specific fields to it e.g. id, name, etc.

Returns
new instance of clipping plane with same properties and attributes.

◆ GetEquation()

const Equation& Graphic3d_ClipPlane::GetEquation ( ) const
inline

Get 4-component equation vector for clipping plane.

Returns
clipping plane equation vector.

◆ GetId()

const TCollection_AsciiString& Graphic3d_ClipPlane::GetId ( ) const
inline

This ID is used for managing associated resources in graphical driver. The clip plane can be assigned within a range of IO which can be displayed in separate OpenGl contexts. For each of the context an associated OpenGl resource for graphical aspects should be created and kept. The resources are stored in graphical driver for each of individual groups of shared context under the clip plane identifier.

Returns
clip plane resource identifier string.

◆ IsCapping()

Standard_Boolean Graphic3d_ClipPlane::IsCapping ( ) const
inline

Check state of capping surface rendering.

Returns
true (turned on) or false depending on the state.

◆ IsHatchOn()

Standard_Boolean Graphic3d_ClipPlane::IsHatchOn ( ) const
inline
Returns
True if hatching mask is turned on.

◆ IsOn()

Standard_Boolean Graphic3d_ClipPlane::IsOn ( ) const
inline

Check that the clipping plane is turned on.

Returns
boolean flag indicating whether the plane is in on or off state.

◆ MCountAspect()

unsigned int Graphic3d_ClipPlane::MCountAspect ( ) const
inline
Returns
modification counter for aspect.

◆ MCountEquation()

unsigned int Graphic3d_ClipPlane::MCountEquation ( ) const
inline
Returns
modification counter for equation.

◆ SetCapping()

void Graphic3d_ClipPlane::SetCapping ( const Standard_Boolean  theIsOn)

Change state of capping surface rendering.

Parameters
theIsOn[in] the flag specifying whether the graphic driver should perform rendering of capping surface produced by this plane. The graphic driver produces this surface for convex graphics by means of stencil-test and multi-pass rendering.

◆ SetCappingAspect()

void Graphic3d_ClipPlane::SetCappingAspect ( const Handle< Graphic3d_AspectFillArea3d > &  theAspect)

Assign capping aspect.

◆ SetCappingCustomHatch()

void Graphic3d_ClipPlane::SetCappingCustomHatch ( const Handle< Graphic3d_HatchStyle > &  theStyle)

Set custom hatch style (stipple) and turn hatching on.

Parameters
theStyle[in] the hatch pattern.

◆ SetCappingHatch()

void Graphic3d_ClipPlane::SetCappingHatch ( const Aspect_HatchStyle  theStyle)

Set hatch style (stipple) and turn hatching on.

Parameters
theStyle[in] the hatch style.

◆ SetCappingHatchOff()

void Graphic3d_ClipPlane::SetCappingHatchOff ( )

Turn off hatching.

◆ SetCappingHatchOn()

void Graphic3d_ClipPlane::SetCappingHatchOn ( )

Turn on hatching.

◆ SetCappingMaterial()

void Graphic3d_ClipPlane::SetCappingMaterial ( const Graphic3d_MaterialAspect theMat)

Set material for rendering capping surface.

Parameters
theMat[in] the material.

◆ SetCappingTexture()

void Graphic3d_ClipPlane::SetCappingTexture ( const Handle< Graphic3d_TextureMap > &  theTexture)

Set texture to be applied on capping surface.

Parameters
theTexture[in] the texture.

◆ SetEquation() [1/2]

void Graphic3d_ClipPlane::SetEquation ( const gp_Pln thePlane)

Set plane equation by its geometrical definition. The equation is specified in "world" coordinate system.

Parameters
thePlane[in] the plane.

◆ SetEquation() [2/2]

void Graphic3d_ClipPlane::SetEquation ( const Equation theEquation)

Set 4-component equation vector for clipping plane. The equation is specified in "world" coordinate system.

Parameters
theEquation[in] the XYZW (or "ABCD") equation vector.

◆ SetOn()

void Graphic3d_ClipPlane::SetOn ( const Standard_Boolean  theIsOn)

Change state of the clipping plane.

Parameters
theIsOn[in] the flag specifying whether the graphic driver clipping by this plane should be turned on or off.

◆ SetUseObjectMaterial()

void Graphic3d_ClipPlane::SetUseObjectMaterial ( bool  theToUse)
inline

Set flag for controlling the source of capping plane material.

◆ SetUseObjectShader()

void Graphic3d_ClipPlane::SetUseObjectShader ( bool  theToUse)
inline

Set flag for controlling the source of capping plane shader program.

◆ SetUseObjectTexture()

void Graphic3d_ClipPlane::SetUseObjectTexture ( bool  theToUse)
inline

Set flag for controlling the source of capping plane texture.

◆ ToPlane()

const gp_Pln& Graphic3d_ClipPlane::ToPlane ( ) const
inline

Get geometrical definition.

Returns
geometrical definition of clipping plane

◆ ToUseObjectMaterial()

bool Graphic3d_ClipPlane::ToUseObjectMaterial ( ) const
inline

Flag indicating whether material for capping plane should be taken from object. Default value: FALSE (use dedicated capping plane material).

◆ ToUseObjectProperties()

bool Graphic3d_ClipPlane::ToUseObjectProperties ( ) const
inline

Return true if some fill area aspect properties should be taken from object.

◆ ToUseObjectShader()

bool Graphic3d_ClipPlane::ToUseObjectShader ( ) const
inline

Flag indicating whether shader program for capping plane should be taken from object. Default value: FALSE.

◆ ToUseObjectTexture()

bool Graphic3d_ClipPlane::ToUseObjectTexture ( ) const
inline

Flag indicating whether texture for capping plane should be taken from object. Default value: FALSE.


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