Open CASCADE Technology
6.9.0
|
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>
Public Types | |
typedef NCollection_Vec4 < Standard_Real > | Equation |
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 Equation & | GetEquation () 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... | |
gp_Pln | ToPlane () const |
Get geometrical definition. The plane is built up from the equation clipping plane equation vector. More... | |
virtual Handle < Graphic3d_ClipPlane > | Clone () 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_MaterialAspect & | CappingMaterial () const |
void | SetCappingTexture (const Handle< Graphic3d_TextureMap > &theTexture) |
Set texture to be applied on capping surface. More... | |
const Handle < Graphic3d_TextureMap > & | CappingTexture () const |
void | SetCappingHatch (const Aspect_HatchStyle theStyle) |
Set hatch style (stipple) and turn hatching on. More... | |
Aspect_HatchStyle | CappingHatch () const |
void | SetCappingHatchOn () |
Turn on hatching. More... | |
void | SetCappingHatchOff () |
Turn off hatching. More... | |
Standard_Boolean | IsHatchOn () const |
const TCollection_AsciiString & | GetId () 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... | |
Handle < Graphic3d_AspectFillArea3d > | CappingAspect () const |
Compute and return capping aspect from the graphical attributes. More... | |
unsigned int | MCountEquation () const |
unsigned int | MCountAspect () const |
DEFINE_STANDARD_RTTI (Graphic3d_ClipPlane) | |
Public Member Functions inherited from Standard_Transient | |
Standard_Transient () | |
Empty constructor. More... | |
Standard_Transient (const Standard_Transient &) | |
Copy constructor – does nothing. More... | |
Standard_Transient & | operator= (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 Handle_Standard_Type & | DynamicType () const |
Returns a type information object about this object. More... | |
Standard_Boolean | IsInstance (const 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 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... | |
virtual Handle_Standard_Transient | This () const |
Returns a Handle which references this object. Must never be called to objects created in stack. More... | |
Standard_Integer | GetRefCount () const |
Get the reference counter of this object. More... | |
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:
Graphic3d_ClipPlane::Graphic3d_ClipPlane | ( | ) |
Default constructor. Initializes clip plane container with the following properties:
Graphic3d_ClipPlane::Graphic3d_ClipPlane | ( | const Graphic3d_ClipPlane & | theOther | ) |
Copy constructor.
theOther | [in] the copied plane. |
Graphic3d_ClipPlane::Graphic3d_ClipPlane | ( | const Equation & | theEquation | ) |
Construct clip plane for the passed equation. By default the plane is on, capping is turned off.
theEquation | [in] the plane equation. |
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.
thePlane | [in] the plane. |
Handle< Graphic3d_AspectFillArea3d > Graphic3d_ClipPlane::CappingAspect | ( | ) | const |
Compute and return capping aspect from the graphical attributes.
|
inline |
|
inline |
|
inline |
|
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.
Graphic3d_ClipPlane::DEFINE_STANDARD_RTTI | ( | Graphic3d_ClipPlane | ) |
|
inline |
Get 4-component equation vector for clipping plane.
|
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.
|
inline |
Check state of capping surface rendering.
|
inline |
|
inline |
Check that the clipping plane is turned on.
|
inline |
|
inline |
void Graphic3d_ClipPlane::SetCapping | ( | const Standard_Boolean | theIsOn | ) |
Change state of capping surface rendering.
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. |
void Graphic3d_ClipPlane::SetCappingHatch | ( | const Aspect_HatchStyle | theStyle | ) |
Set hatch style (stipple) and turn hatching on.
theStyle | [in] the hatch style. |
void Graphic3d_ClipPlane::SetCappingHatchOff | ( | ) |
Turn off hatching.
void Graphic3d_ClipPlane::SetCappingHatchOn | ( | ) |
Turn on hatching.
void Graphic3d_ClipPlane::SetCappingMaterial | ( | const Graphic3d_MaterialAspect & | theMat | ) |
Set material for rendering capping surface.
theMat | [in] the material. |
void Graphic3d_ClipPlane::SetCappingTexture | ( | const Handle< Graphic3d_TextureMap > & | theTexture | ) |
Set texture to be applied on capping surface.
theTexture | [in] the texture. |
void Graphic3d_ClipPlane::SetEquation | ( | const gp_Pln & | thePlane | ) |
Set plane equation by its geometrical definition. The equation is specified in "world" coordinate system.
thePlane | [in] the plane. |
void Graphic3d_ClipPlane::SetEquation | ( | const Equation & | theEquation | ) |
Set 4-component equation vector for clipping plane. The equation is specified in "world" coordinate system.
theEquation | [in] the XYZW (or "ABCD") equation vector. |
void Graphic3d_ClipPlane::SetOn | ( | const Standard_Boolean | theIsOn | ) |
Change state of the clipping plane.
theIsOn | [in] the flag specifying whether the graphic driver clipping by this plane should be turned on or off. |
gp_Pln Graphic3d_ClipPlane::ToPlane | ( | ) | const |
Get geometrical definition. The plane is built up from the equation clipping plane equation vector.