Open CASCADE Technology 7.8.2.dev
OpenGl_Group Class Reference

Implementation of low-level graphic group. More...

#include <OpenGl_Group.hxx>

Inheritance diagram for OpenGl_Group:

Public Member Functions

 OpenGl_Group (const Handle< Graphic3d_Structure > &theStruct)
 Create empty group. Will throw exception if not created by OpenGl_Structure.
 
virtual void Clear (const Standard_Boolean theToUpdateStructureMgr) override
 Suppress all primitives and attributes of <me>. To clear group without update in Graphic3d_StructureManager pass Standard_False as <theUpdateStructureMgr>. This used on context and viewer destruction, when the pointer to structure manager in Graphic3d_Structure could be already released (pointers are used here to avoid handle cross-reference);.
 
virtual Handle< Graphic3d_AspectsAspects () const override
 Return line aspect.
 
bool HasPersistence () const
 Return TRUE if group contains primitives with transform persistence.
 
virtual void SetGroupPrimitivesAspect (const Handle< Graphic3d_Aspects > &theAspect) override
 Update aspect.
 
virtual void SetPrimitivesAspect (const Handle< Graphic3d_Aspects > &theAspect) override
 Append aspect as an element.
 
virtual void SynchronizeAspects () override
 Update presentation aspects after their modification.
 
virtual void ReplaceAspects (const Graphic3d_MapOfAspectsToAspects &theMap) override
 Replace aspects specified in the replacement map.
 
virtual void AddPrimitiveArray (const Graphic3d_TypeOfPrimitiveArray theType, const Handle< Graphic3d_IndexBuffer > &theIndices, const Handle< Graphic3d_Buffer > &theAttribs, const Handle< Graphic3d_BoundBuffer > &theBounds, const Standard_Boolean theToEvalMinMax) override
 Add primitive array element.
 
virtual void AddText (const Handle< Graphic3d_Text > &theTextParams, const Standard_Boolean theToEvalMinMax) override
 Adds a text for display.
 
virtual void SetFlippingOptions (const Standard_Boolean theIsEnabled, const gp_Ax2 &theRefPlane) override
 Add flipping element.
 
virtual void SetStencilTestOptions (const Standard_Boolean theIsEnabled) override
 Add stencil test element.
 
OpenGl_StructureGlStruct () const
 
void AddElement (OpenGl_Element *theElem)
 
virtual void Render (const Handle< OpenGl_Workspace > &theWorkspace) const
 
virtual void Release (const Handle< OpenGl_Context > &theGlCtx)
 
const OpenGl_ElementNodeFirstNode () const
 Returns first OpenGL element node of the group.
 
const OpenGl_AspectsGlAspects () const
 Returns OpenGL aspect.
 
Standard_Boolean IsRaytracable () const
 Is the group ray-tracable (contains ray-tracable elements)?
 
virtual void DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const override
 Dumps the content of me into the stream.
 
- Public Member Functions inherited from Graphic3d_Group
virtual ~Graphic3d_Group ()
 Suppress the group <me> in the structure.
 
void Remove ()
 Suppress the group <me> in the structure. Warning: No more graphic operations in <me> after this call. Modifies the current modelling transform persistence (pan, zoom or rotate) Get the current modelling transform persistence (pan, zoom or rotate)
 
void AddPrimitiveArray (const Handle< Graphic3d_ArrayOfPrimitives > &thePrim, const Standard_Boolean theToEvalMinMax=Standard_True)
 Adds an array of primitives for display.
 
const Handle< Graphic3d_TransformPers > & TransformPersistence () const
 Return transformation persistence.
 
virtual void SetTransformPersistence (const Handle< Graphic3d_TransformPers > &theTrsfPers)
 Set transformation persistence.
 
Standard_Boolean IsDeleted () const
 Returns Standard_True if the group <me> is deleted. <me> is deleted after the call Remove (me) or the associated structure is deleted.
 
Standard_Boolean IsEmpty () const
 Returns Standard_True if the group <me> is empty.
 
void MinMaxValues (Standard_Real &theXMin, Standard_Real &theYMin, Standard_Real &theZMin, Standard_Real &theXMax, Standard_Real &theYMax, Standard_Real &theZMax) const
 Returns the coordinates of the boundary box of the group.
 
void SetMinMaxValues (const Standard_Real theXMin, const Standard_Real theYMin, const Standard_Real theZMin, const Standard_Real theXMax, const Standard_Real theYMax, const Standard_Real theZMax)
 Sets the coordinates of the boundary box of the group.
 
const Graphic3d_BndBox4fBoundingBox () const
 Returns boundary box of the group <me> without transformation applied,.
 
Graphic3d_BndBox4fChangeBoundingBox ()
 Returns non-const boundary box of the group <me> without transformation applied,.
 
Handle< Graphic3d_StructureStructure () const
 Returns the structure containing the group <me>.
 
void SetClosed (const bool theIsClosed)
 Changes property shown that primitive arrays within this group form closed volume (do no contain open shells).
 
bool IsClosed () const
 Return true if primitive arrays within this graphic group form closed volume (do no contain open shells).
 
void Marker (const Graphic3d_Vertex &thePoint, const Standard_Boolean theToEvalMinMax=Standard_True)
 
virtual void Text (const Standard_CString AText, const Graphic3d_Vertex &APoint, const Standard_Real AHeight, const Standard_Real AAngle, const Graphic3d_TextPath ATp, const Graphic3d_HorizontalTextAlignment AHta, const Graphic3d_VerticalTextAlignment AVta, const Standard_Boolean EvalMinMax=Standard_True)
 Creates the string <AText> at position <APoint>. The 3D point of attachment is projected. The text is written in the plane of projection. The attributes are given with respect to the plane of projection. AHeight : Height of text. (Relative to the Normalized Projection Coordinates (NPC) Space). AAngle : Orientation of the text (with respect to the horizontal).
 
void Text (const Standard_CString AText, const Graphic3d_Vertex &APoint, const Standard_Real AHeight, const Standard_Boolean EvalMinMax=Standard_True)
 Creates the string <AText> at position <APoint>. The 3D point of attachment is projected. The text is written in the plane of projection. The attributes are given with respect to the plane of projection. AHeight : Height of text. (Relative to the Normalized Projection Coordinates (NPC) Space). The other attributes have the following default values: AAngle : PI / 2. ATp : TP_RIGHT AHta : HTA_LEFT AVta : VTA_BOTTOM.
 
void Text (const TCollection_ExtendedString &AText, const Graphic3d_Vertex &APoint, const Standard_Real AHeight, const Standard_Real AAngle, const Graphic3d_TextPath ATp, const Graphic3d_HorizontalTextAlignment AHta, const Graphic3d_VerticalTextAlignment AVta, const Standard_Boolean EvalMinMax=Standard_True)
 Creates the string <AText> at position <APoint>. The 3D point of attachment is projected. The text is written in the plane of projection. The attributes are given with respect to the plane of projection. AHeight : Height of text. (Relative to the Normalized Projection Coordinates (NPC) Space). AAngle : Orientation of the text (with respect to the horizontal).
 
void Text (const TCollection_ExtendedString &AText, const Graphic3d_Vertex &APoint, const Standard_Real AHeight, const Standard_Boolean EvalMinMax=Standard_True)
 Creates the string <AText> at position <APoint>. The 3D point of attachment is projected. The text is written in the plane of projection. The attributes are given with respect to the plane of projection. AHeight : Height of text. (Relative to the Normalized Projection Coordinates (NPC) Space). The other attributes have the following default values: AAngle : PI / 2. ATp : TP_RIGHT AHta : HTA_LEFT AVta : VTA_BOTTOM.
 
virtual void Text (const Standard_CString theTextUtf, const gp_Ax2 &theOrientation, const Standard_Real theHeight, const Standard_Real theAngle, const Graphic3d_TextPath theTp, const Graphic3d_HorizontalTextAlignment theHTA, const Graphic3d_VerticalTextAlignment theVTA, const Standard_Boolean theToEvalMinMax=Standard_True, const Standard_Boolean theHasOwnAnchor=Standard_True)
 Creates the string <theText> at orientation <theOrientation> in 3D space.
 
virtual void Text (const TCollection_ExtendedString &theText, const gp_Ax2 &theOrientation, const Standard_Real theHeight, const Standard_Real theAngle, const Graphic3d_TextPath theTp, const Graphic3d_HorizontalTextAlignment theHTA, const Graphic3d_VerticalTextAlignment theVTA, const Standard_Boolean theToEvalMinMax=Standard_True, const Standard_Boolean theHasOwnAnchor=Standard_True)
 Creates the string <theText> at orientation <theOrientation> in 3D space.
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
 
virtual ~Standard_Transient ()
 Destructor must be virtual.
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object.
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type.
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName.
 
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.
 
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.
 
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.
 
Standard_Integer GetRefCount () const noexcept
 Get the reference counter of this object.
 
void IncrementRefCounter () noexcept
 Increments the reference counter of this object.
 
Standard_Integer DecrementRefCounter () noexcept
 Decrements the reference counter of this object; returns the decremented value.
 
virtual void Delete () const
 Memory deallocator for transient classes.
 

Protected Member Functions

virtual ~OpenGl_Group ()
 
- Protected Member Functions inherited from Graphic3d_Group
 Graphic3d_Group (const Handle< Graphic3d_Structure > &theStructure)
 Creates a group in the structure <AStructure>.
 
void Update () const
 Calls the Update method of the StructureManager which contains the associated Structure of the Group <me>.
 

Protected Attributes

OpenGl_AspectsmyAspects
 
OpenGl_ElementNodemyFirst
 
OpenGl_ElementNodemyLast
 
Standard_Boolean myIsRaytracable
 
- Protected Attributes inherited from Graphic3d_Group
Handle< Graphic3d_TransformPersmyTrsfPers
 current transform persistence
 
Graphic3d_StructuremyStructure
 pointer to the parent structure
 
Graphic3d_BndBox4f myBounds
 bounding box
 
bool myIsClosed
 flag indicating closed volume
 

Additional Inherited Members

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

Detailed Description

Implementation of low-level graphic group.

Constructor & Destructor Documentation

◆ OpenGl_Group()

OpenGl_Group::OpenGl_Group ( const Handle< Graphic3d_Structure > & theStruct)

Create empty group. Will throw exception if not created by OpenGl_Structure.

◆ ~OpenGl_Group()

virtual OpenGl_Group::~OpenGl_Group ( )
protectedvirtual

Member Function Documentation

◆ AddElement()

void OpenGl_Group::AddElement ( OpenGl_Element * theElem)

◆ AddPrimitiveArray()

virtual void OpenGl_Group::AddPrimitiveArray ( const Graphic3d_TypeOfPrimitiveArray theType,
const Handle< Graphic3d_IndexBuffer > & theIndices,
const Handle< Graphic3d_Buffer > & theAttribs,
const Handle< Graphic3d_BoundBuffer > & theBounds,
const Standard_Boolean theToEvalMinMax )
overridevirtual

Add primitive array element.

Reimplemented from Graphic3d_Group.

◆ AddText()

virtual void OpenGl_Group::AddText ( const Handle< Graphic3d_Text > & theTextParams,
const Standard_Boolean theToEvalMinMax )
overridevirtual

Adds a text for display.

Reimplemented from Graphic3d_Group.

◆ Aspects()

virtual Handle< Graphic3d_Aspects > OpenGl_Group::Aspects ( ) const
inlineoverridevirtual

Return line aspect.

Implements Graphic3d_Group.

◆ Clear()

virtual void OpenGl_Group::Clear ( const Standard_Boolean theUpdateStructureMgr)
overridevirtual

Suppress all primitives and attributes of <me>. To clear group without update in Graphic3d_StructureManager pass Standard_False as <theUpdateStructureMgr>. This used on context and viewer destruction, when the pointer to structure manager in Graphic3d_Structure could be already released (pointers are used here to avoid handle cross-reference);.

Reimplemented from Graphic3d_Group.

◆ DumpJson()

virtual void OpenGl_Group::DumpJson ( Standard_OStream & theOStream,
Standard_Integer theDepth = -1 ) const
overridevirtual

Dumps the content of me into the stream.

Reimplemented from Graphic3d_Group.

◆ FirstNode()

const OpenGl_ElementNode * OpenGl_Group::FirstNode ( ) const
inline

Returns first OpenGL element node of the group.

◆ GlAspects()

const OpenGl_Aspects * OpenGl_Group::GlAspects ( ) const
inline

Returns OpenGL aspect.

◆ GlStruct()

OpenGl_Structure * OpenGl_Group::GlStruct ( ) const
inline

◆ HasPersistence()

bool OpenGl_Group::HasPersistence ( ) const
inline

Return TRUE if group contains primitives with transform persistence.

◆ IsRaytracable()

Standard_Boolean OpenGl_Group::IsRaytracable ( ) const
inline

Is the group ray-tracable (contains ray-tracable elements)?

◆ Release()

virtual void OpenGl_Group::Release ( const Handle< OpenGl_Context > & theGlCtx)
virtual

◆ Render()

virtual void OpenGl_Group::Render ( const Handle< OpenGl_Workspace > & theWorkspace) const
virtual

◆ ReplaceAspects()

virtual void OpenGl_Group::ReplaceAspects ( const Graphic3d_MapOfAspectsToAspects & theMap)
overridevirtual

Replace aspects specified in the replacement map.

Implements Graphic3d_Group.

◆ SetFlippingOptions()

virtual void OpenGl_Group::SetFlippingOptions ( const Standard_Boolean theIsEnabled,
const gp_Ax2 & theRefPlane )
overridevirtual

Add flipping element.

Implements Graphic3d_Group.

◆ SetGroupPrimitivesAspect()

virtual void OpenGl_Group::SetGroupPrimitivesAspect ( const Handle< Graphic3d_Aspects > & theAspect)
overridevirtual

Update aspect.

Implements Graphic3d_Group.

◆ SetPrimitivesAspect()

virtual void OpenGl_Group::SetPrimitivesAspect ( const Handle< Graphic3d_Aspects > & theAspect)
overridevirtual

Append aspect as an element.

Implements Graphic3d_Group.

◆ SetStencilTestOptions()

virtual void OpenGl_Group::SetStencilTestOptions ( const Standard_Boolean theIsEnabled)
overridevirtual

Add stencil test element.

Implements Graphic3d_Group.

◆ SynchronizeAspects()

virtual void OpenGl_Group::SynchronizeAspects ( )
overridevirtual

Update presentation aspects after their modification.

Implements Graphic3d_Group.

Field Documentation

◆ myAspects

OpenGl_Aspects* OpenGl_Group::myAspects
protected

◆ myFirst

OpenGl_ElementNode* OpenGl_Group::myFirst
protected

◆ myIsRaytracable

Standard_Boolean OpenGl_Group::myIsRaytracable
protected

◆ myLast

OpenGl_ElementNode* OpenGl_Group::myLast
protected

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