OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    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 occ::handle< Graphic3d_Structure > &theStruct)
     Create empty group. Will throw exception if not created by OpenGl_Structure.
    void Clear (const bool theToUpdateStructureMgr) override
     Suppress all primitives and attributes of <me>. To clear group without update in Graphic3d_StructureManager pass 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);.
    occ::handle< Graphic3d_Aspects > Aspects () const override
     Return line aspect.
    bool HasPersistence () const
     Return TRUE if group contains primitives with transform persistence.
    void SetGroupPrimitivesAspect (const occ::handle< Graphic3d_Aspects > &theAspect) override
     Update aspect.
    void SetPrimitivesAspect (const occ::handle< Graphic3d_Aspects > &theAspect) override
     Append aspect as an element.
    void SynchronizeAspects () override
     Update presentation aspects after their modification.
    void ReplaceAspects (const NCollection_DataMap< occ::handle< Graphic3d_Aspects >, occ::handle< Graphic3d_Aspects > > &theMap) override
     Replace aspects specified in the replacement map.
    void AddPrimitiveArray (const Graphic3d_TypeOfPrimitiveArray theType, const occ::handle< Graphic3d_IndexBuffer > &theIndices, const occ::handle< Graphic3d_Buffer > &theAttribs, const occ::handle< Graphic3d_BoundBuffer > &theBounds, const bool theToEvalMinMax) override
     Add primitive array element.
    void AddText (const occ::handle< Graphic3d_Text > &theTextParams, const bool theToEvalMinMax) override
     Adds a text for display.
    void SetFlippingOptions (const bool theIsEnabled, const gp_Ax2 &theRefPlane) override
     Add flipping element.
    void SetStencilTestOptions (const bool theIsEnabled) override
     Add stencil test element.
    OpenGl_Structure * GlStruct () const
    void AddElement (OpenGl_Element *theElem)
    virtual void Render (const occ::handle< OpenGl_Workspace > &theWorkspace) const
    virtual void Release (const occ::handle< OpenGl_Context > &theGlCtx)
    const OpenGl_ElementNode * FirstNode () const
     Returns first OpenGL element node of the group.
    const OpenGl_Aspects * GlAspects () const
     Returns OpenGL aspect.
    bool IsRaytracable () const
     Is the group ray-tracable (contains ray-tracable elements)?
    void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const override
     Dumps the content of me into the stream.
    Public Member Functions inherited from Graphic3d_Group
     ~Graphic3d_Group () override
     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 occ::handle< Graphic3d_ArrayOfPrimitives > &thePrim, const bool theToEvalMinMax=true)
     Adds an array of primitives for display.
    const occ::handle< Graphic3d_Flipper > & Flipper () const
     Return flipper metadata describing the runtime flip of this group, or null if not flipped.
    const gp_Trsf & Transformation () const
     Return transformation.
    virtual void SetTransformation (const gp_Trsf &theTrsf)
     Assign transformation.
    const occ::handle< Graphic3d_TransformPers > & TransformPersistence () const
     Return transformation persistence.
    virtual void SetTransformPersistence (const occ::handle< Graphic3d_TransformPers > &theTrsfPers)
     Set transformation persistence.
    bool IsDeleted () const
     Returns true if the group <me> is deleted. <me> is deleted after the call Remove (me) or the associated structure is deleted.
    bool IsEmpty () const
     Returns true if the group <me> is empty.
    void MinMaxValues (double &theXMin, double &theYMin, double &theZMin, double &theXMax, double &theYMax, double &theZMax) const
     Returns the coordinates of the boundary box of the group.
    void SetMinMaxValues (const double theXMin, const double theYMin, const double theZMin, const double theXMax, const double theYMax, const double theZMax)
     Sets the coordinates of the boundary box of the group.
    const Graphic3d_BndBox4f & BoundingBox () const
     Returns boundary box of the group <me> without transformation applied,.
    Graphic3d_BndBox4f & ChangeBoundingBox ()
     Returns non-const boundary box of the group <me> without transformation applied,.
    occ::handle< Graphic3d_Structure > Structure () 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).
    Deprecated method Marker ()
    Deprecated method pass Graphic3d_ArrayOfPoints to AddPrimitiveArray () instead") 1 void Marker( const Graphic3d_Vertex & thePoint
     current transform persistence
    Deprecated method Text () with obsolete arguments
     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).
    Deprecated method use AddText () instead of it") 1 virtual void Text( const char* const AText
     current transform persistence
    Deprecated method Text () with obsolete arguments
     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.
    Deprecated method use AddText () instead of it") 1 void Text( const char* const AText
     current transform persistence
    Deprecated method Text () with obsolete arguments
     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).
    Deprecated method use AddText () instead of it") 1 void Text( const TCollection_ExtendedString & AText
     current transform persistence
    Deprecated method Text () with obsolete arguments
     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.
    Deprecated method use AddText () instead of it") 1 void Text( const TCollection_ExtendedString & AText
     current transform persistence
    Deprecated method Text () with obsolete arguments
     Creates the string <theText> at orientation <theOrientation> in 3D space.
    Deprecated method use AddText () instead of it") 1 virtual void Text( const char* const theTextUtf
     current transform persistence
    Deprecated method Text () with obsolete arguments
     Creates the string <theText> at orientation <theOrientation> in 3D space.
    Deprecated method use AddText () instead of it") 1 virtual void Text( const TCollection_ExtendedString & theText
     current transform persistence
    Public Member Functions inherited from Standard_Transient
     Standard_Transient ()
     Empty constructor.
     Standard_Transient (const Standard_Transient &)
     Copy constructor – does nothing.
    Standard_Transient & operator= (const Standard_Transient &)
     Assignment operator, needed to avoid copying reference counter.
    virtual ~Standard_Transient ()=default
     Destructor must be virtual.
    virtual const opencascade::handle< Standard_Type > & DynamicType () const
     Returns a type descriptor about this object.
    bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
     Returns a true value if this is an instance of Type.
    bool IsInstance (const char *const theTypeName) const
     Returns a true value if this is an instance of TypeName.
    bool 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.
    bool IsKind (const char *const 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_Transient * This () 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.
    int GetRefCount () const noexcept
     Get the reference counter of this object.
    void IncrementRefCounter () noexcept
     Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
    int DecrementRefCounter () noexcept
     Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
    virtual void Delete () const
     Memory deallocator for transient classes.

    Protected Member Functions

     ~OpenGl_Group () override
     Graphic3d_Group (const occ::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_Aspects * myAspects
    OpenGl_ElementNode * myFirst
    OpenGl_ElementNode * myLast
    bool myIsRaytracable
    occ::handle< Graphic3d_TransformPers > myTrsfPers
     current transform persistence
    occ::handle< Graphic3d_Flipper > myFlipper
     current group flipping
    Graphic3d_Structure * myStructure
     pointer to the parent structure
    Graphic3d_BndBox4f myBounds
     bounding box
    gp_Trsf myTrsf
     group transformation
    bool myIsClosed
     flag indicating closed volume

    Additional Inherited Members

    typedef void base_type
     Returns a type descriptor about this object.
    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.
    Deprecated method pass Graphic3d_ArrayOfPoints to const bool theToEvalMinMax = true)
     current transform persistence
    Deprecated method use const Graphic3d_Vertex & APoint
     current transform persistence
    Deprecated method use const Graphic3d_Vertex const double AHeight
     current transform persistence
    Deprecated method use const Graphic3d_Vertex const double const double AAngle
     current transform persistence
    Deprecated method use const Graphic3d_Vertex const double const double const Graphic3d_TextPath ATp
     current transform persistence
    Deprecated method use const Graphic3d_Vertex const double const double const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment AHta
     current transform persistence
    Deprecated method use const Graphic3d_Vertex const double const double const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment const Graphic3d_VerticalTextAlignment AVta
     current transform persistence
    Deprecated method use const Graphic3d_Vertex const double const double const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment const Graphic3d_VerticalTextAlignment const bool EvalMinMax = true)
     current transform persistence
    Deprecated method use const Graphic3d_Vertex const double const bool EvalMinMax = true)
     current transform persistence
    Deprecated method use const gp_Ax2 & theOrientation
     current transform persistence
    Deprecated method use const gp_Ax2 const double theHeight
     current transform persistence
    Deprecated method use const gp_Ax2 const double const double theAngle
     current transform persistence
    Deprecated method use const gp_Ax2 const double const double const Graphic3d_TextPath theTp
     current transform persistence
    Deprecated method use const gp_Ax2 const double const double const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment theHTA
     current transform persistence
    Deprecated method use const gp_Ax2 const double const double const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment const Graphic3d_VerticalTextAlignment theVTA
     current transform persistence
    Deprecated method use const gp_Ax2 const double const double const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment const Graphic3d_VerticalTextAlignment const bool theToEvalMinMax = true
     current transform persistence
    Deprecated method use const gp_Ax2 const double const double const Graphic3d_TextPath const Graphic3d_HorizontalTextAlignment const Graphic3d_VerticalTextAlignment const bool const bool theHasOwnAnchor = true)
     current transform persistence

    Detailed Description

    Implementation of low-level graphic group.

    Constructor & Destructor Documentation

    ◆ OpenGl_Group()

    OpenGl_Group::OpenGl_Group ( const occ::handle< Graphic3d_Structure > & theStruct)

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

    ◆ ~OpenGl_Group()

    OpenGl_Group::~OpenGl_Group ( )
    overrideprotected

    Member Function Documentation

    ◆ AddElement()

    void OpenGl_Group::AddElement ( OpenGl_Element * theElem)

    ◆ AddPrimitiveArray()

    void OpenGl_Group::AddPrimitiveArray ( const Graphic3d_TypeOfPrimitiveArray theType,
    const occ::handle< Graphic3d_IndexBuffer > & theIndices,
    const occ::handle< Graphic3d_Buffer > & theAttribs,
    const occ::handle< Graphic3d_BoundBuffer > & theBounds,
    const bool theToEvalMinMax )
    overridevirtual

    Add primitive array element.

    Reimplemented from Graphic3d_Group.

    ◆ AddText()

    void OpenGl_Group::AddText ( const occ::handle< Graphic3d_Text > & theTextParams,
    const bool theToEvalMinMax )
    overridevirtual

    Adds a text for display.

    Reimplemented from Graphic3d_Group.

    ◆ Aspects()

    occ::handle< Graphic3d_Aspects > OpenGl_Group::Aspects ( ) const
    inlineoverridevirtual

    Return line aspect.

    Implements Graphic3d_Group.

    ◆ Clear()

    void OpenGl_Group::Clear ( const bool theUpdateStructureMgr)
    overridevirtual

    Suppress all primitives and attributes of <me>. To clear group without update in Graphic3d_StructureManager pass 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()

    void OpenGl_Group::DumpJson ( Standard_OStream & theOStream,
    int 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()

    bool OpenGl_Group::IsRaytracable ( ) const
    inline

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

    ◆ Release()

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

    ◆ Render()

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

    ◆ ReplaceAspects()

    void OpenGl_Group::ReplaceAspects ( const NCollection_DataMap< occ::handle< Graphic3d_Aspects >, occ::handle< Graphic3d_Aspects > > & theMap)
    overridevirtual

    Replace aspects specified in the replacement map.

    Implements Graphic3d_Group.

    ◆ SetFlippingOptions()

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

    Add flipping element.

    Implements Graphic3d_Group.

    ◆ SetGroupPrimitivesAspect()

    void OpenGl_Group::SetGroupPrimitivesAspect ( const occ::handle< Graphic3d_Aspects > & theAspect)
    overridevirtual

    Update aspect.

    Implements Graphic3d_Group.

    ◆ SetPrimitivesAspect()

    void OpenGl_Group::SetPrimitivesAspect ( const occ::handle< Graphic3d_Aspects > & theAspect)
    overridevirtual

    Append aspect as an element.

    Implements Graphic3d_Group.

    ◆ SetStencilTestOptions()

    void OpenGl_Group::SetStencilTestOptions ( const bool theIsEnabled)
    overridevirtual

    Add stencil test element.

    Implements Graphic3d_Group.

    ◆ SynchronizeAspects()

    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

    bool OpenGl_Group::myIsRaytracable
    protected

    ◆ myLast

    OpenGl_ElementNode* OpenGl_Group::myLast
    protected

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