OCCT3D OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    Graphic3d_CStructure Class Referenceabstract

    Low-level graphic structure interface. More...

    #include <Graphic3d_CStructure.hxx>

    Inheritance diagram for Graphic3d_CStructure:

    Data Structures

    class  SubclassStructIterator
     Auxiliary wrapper to iterate through structure list. More...
    class  SubclassGroupIterator
     Auxiliary wrapper to iterate through group sequence. More...

    Public Member Functions

    const occ::handle< Graphic3d_GraphicDriver > & GraphicDriver () const
    const NCollection_Sequence< occ::handle< Graphic3d_Group > > & Groups () const
    const occ::handle< TopLoc_Datum3D > & Transformation () const
     Return transformation.
    virtual void SetTransformation (const occ::handle< TopLoc_Datum3D > &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 HasGroupTransformPersistence () const
     Return TRUE if some groups might have transform persistence; FALSE by default.
    void SetGroupTransformPersistence (bool theValue)
     Set if some groups might have transform persistence.
    bool HasGroupFlipping () const
     Return TRUE if some groups might have flipping options; FALSE by default.
    void SetGroupFlipping (bool theValue)
     Set if some groups might have flipping options.
    const occ::handle< Graphic3d_SequenceOfHClipPlane > & ClipPlanes () const
    void SetClipPlanes (const occ::handle< Graphic3d_SequenceOfHClipPlane > &thePlanes)
     Pass clip planes to the associated graphic driver structure.
    const Graphic3d_BndBox3dBoundingBox () const
    Graphic3d_BndBox3dChangeBoundingBox ()
    bool IsVisible () const
     Return structure visibility flag.
    bool IsVisible (const int theViewId) const
     Return structure visibility considering both View Affinity and global visibility state.
    virtual void SetZLayer (const Graphic3d_ZLayerId theLayerIndex)
     Set z layer ID to display the structure in specified layer.
    Graphic3d_ZLayerId ZLayer () const
     Get z layer ID.
    const occ::handle< Graphic3d_PresentationAttributes > & HighlightStyle () const
     Returns valid handle to highlight style of the structure in case if highlight flag is set to true.
    int Identification () const
     Return structure id (generated by Graphic3d_GraphicDriver::NewIdentification() during structure construction).
    Graphic3d_DisplayPriority Priority () const
     Return structure display priority.
    void SetPriority (Graphic3d_DisplayPriority thePriority)
     Set structure display priority.
    Graphic3d_DisplayPriority PreviousPriority () const
     Return previous structure display priority.
    void SetPreviousPriority (Graphic3d_DisplayPriority thePriority)
     Set previous structure display priority.
    bool IsCulled () const
     Returns FALSE if the structure hits the current view volume, otherwise returns TRUE.
    void SetCulled (bool theIsCulled) const
     Marks structure as culled/not culled - note that IsAlwaysRendered() is ignored here!
    void MarkAsNotCulled () const
     Marks structure as overlapping the current view volume one. The method is called during traverse of BVH tree.
    bool BndBoxClipCheck () const
     Returns whether check of object's bounding box clipping is enabled before drawing of object; TRUE by default.
    void SetBndBoxClipCheck (bool theBndBoxClipCheck)
     Enable/disable check of object's bounding box clipping before drawing of object.
    bool IsAlwaysRendered () const
     Checks if the structure should be included into BVH tree or not.
    virtual void OnVisibilityChanged ()=0
     Update structure visibility state.
    virtual void Clear ()=0
     Clear graphic data.
    virtual void Connect (Graphic3d_CStructure &theStructure)=0
     Connect other structure to this one.
    virtual void Disconnect (Graphic3d_CStructure &theStructure)=0
     Disconnect other structure to this one.
    virtual void GraphicHighlight (const occ::handle< Graphic3d_PresentationAttributes > &theStyle)=0
     Highlights structure with the given style.
    virtual void GraphicUnhighlight ()=0
     Unhighlights the structure and invalidates pointer to structure's highlight style.
    virtual occ::handle< Graphic3d_CStructureShadowLink (const occ::handle< Graphic3d_StructureManager > &theManager) const =0
     Create shadow link to this structure.
    virtual occ::handle< Graphic3d_GroupNewGroup (const occ::handle< Graphic3d_Structure > &theStruct)=0
     Create new group within this structure.
    virtual void RemoveGroup (const occ::handle< Graphic3d_Group > &theGroup)=0
     Remove group from this structure.
    virtual void updateLayerTransformation ()
     Update render transformation matrix.
    virtual void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const
     Dumps the content of me into the stream.
    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 ()=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_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.
    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.

    Data Fields

    occ::handle< Graphic3d_ViewAffinityViewAffinity
     view affinity mask
    unsigned IsInfinite: 1
    unsigned stick: 1
     displaying state - should be set when structure has been added to scene graph (but can be in hidden state)
    unsigned highlight: 1
    unsigned visible: 1
     visibility flag - can be used to suppress structure while leaving it in the scene graph
    unsigned HLRValidation: 1
    unsigned IsForHighlight: 1
    unsigned IsMutable: 1
    unsigned Is2dText: 1

    Protected Member Functions

     Graphic3d_CStructure (const occ::handle< Graphic3d_StructureManager > &theManager)
     Create empty structure.

    Protected Attributes

    occ::handle< Graphic3d_GraphicDrivermyGraphicDriver
    NCollection_Sequence< occ::handle< Graphic3d_Group > > myGroups
    Graphic3d_BndBox3d myBndBox
    occ::handle< TopLoc_Datum3DmyTrsf
    occ::handle< Graphic3d_TransformPersmyTrsfPers
    occ::handle< Graphic3d_SequenceOfHClipPlanemyClipPlanes
    occ::handle< Graphic3d_PresentationAttributesmyHighlightStyle
    int myId
     Current highlight style; is set only if highlight flag is true.
    Graphic3d_ZLayerId myZLayer
    Graphic3d_DisplayPriority myPriority
    Graphic3d_DisplayPriority myPreviousPriority
    bool myIsCulled
     A status specifying is structure needs to be rendered after BVH tree traverse.
    bool myBndBoxClipCheck
     Flag responsible for checking of bounding box clipping before drawing of object.
    bool myHasGroupTrsf
     flag specifying that some groups might have transform persistence
    bool myHasGroupFlipping
     flag specifying that some groups might have flipping options

    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.

    Detailed Description

    Low-level graphic structure interface.

    Constructor & Destructor Documentation

    ◆ Graphic3d_CStructure()

    Graphic3d_CStructure::Graphic3d_CStructure ( const occ::handle< Graphic3d_StructureManager > & theManager)
    protected

    Create empty structure.

    Member Function Documentation

    ◆ BndBoxClipCheck()

    bool Graphic3d_CStructure::BndBoxClipCheck ( ) const
    inline

    Returns whether check of object's bounding box clipping is enabled before drawing of object; TRUE by default.

    ◆ BoundingBox()

    const Graphic3d_BndBox3d & Graphic3d_CStructure::BoundingBox ( ) const
    inline
    Returns
    bounding box of this presentation

    ◆ ChangeBoundingBox()

    Graphic3d_BndBox3d & Graphic3d_CStructure::ChangeBoundingBox ( )
    inline
    Returns
    bounding box of this presentation without transformation matrix applied

    ◆ Clear()

    virtual void Graphic3d_CStructure::Clear ( )
    pure virtual

    Clear graphic data.

    Implemented in OpenGl_Structure.

    ◆ ClipPlanes()

    const occ::handle< Graphic3d_SequenceOfHClipPlane > & Graphic3d_CStructure::ClipPlanes ( ) const
    inline
    Returns
    associated clip planes

    ◆ Connect()

    virtual void Graphic3d_CStructure::Connect ( Graphic3d_CStructure & theStructure)
    pure virtual

    Connect other structure to this one.

    Implemented in OpenGl_Structure, and OpenGl_StructureShadow.

    ◆ Disconnect()

    virtual void Graphic3d_CStructure::Disconnect ( Graphic3d_CStructure & theStructure)
    pure virtual

    Disconnect other structure to this one.

    Implemented in OpenGl_Structure, and OpenGl_StructureShadow.

    ◆ DumpJson()

    virtual void Graphic3d_CStructure::DumpJson ( Standard_OStream & theOStream,
    int theDepth = -1 ) const
    virtual

    Dumps the content of me into the stream.

    Reimplemented in OpenGl_Structure.

    ◆ GraphicDriver()

    const occ::handle< Graphic3d_GraphicDriver > & Graphic3d_CStructure::GraphicDriver ( ) const
    inline
    Returns
    graphic driver created this structure

    ◆ GraphicHighlight()

    virtual void Graphic3d_CStructure::GraphicHighlight ( const occ::handle< Graphic3d_PresentationAttributes > & theStyle)
    pure virtual

    Highlights structure with the given style.

    Implemented in OpenGl_Structure.

    ◆ GraphicUnhighlight()

    virtual void Graphic3d_CStructure::GraphicUnhighlight ( )
    pure virtual

    Unhighlights the structure and invalidates pointer to structure's highlight style.

    Implemented in OpenGl_Structure.

    ◆ Groups()

    const NCollection_Sequence< occ::handle< Graphic3d_Group > > & Graphic3d_CStructure::Groups ( ) const
    inline
    Returns
    graphic groups

    ◆ HasGroupFlipping()

    bool Graphic3d_CStructure::HasGroupFlipping ( ) const
    inline

    Return TRUE if some groups might have flipping options; FALSE by default.

    ◆ HasGroupTransformPersistence()

    bool Graphic3d_CStructure::HasGroupTransformPersistence ( ) const
    inline

    Return TRUE if some groups might have transform persistence; FALSE by default.

    ◆ HighlightStyle()

    const occ::handle< Graphic3d_PresentationAttributes > & Graphic3d_CStructure::HighlightStyle ( ) const
    inline

    Returns valid handle to highlight style of the structure in case if highlight flag is set to true.

    ◆ Identification()

    int Graphic3d_CStructure::Identification ( ) const
    inline

    Return structure id (generated by Graphic3d_GraphicDriver::NewIdentification() during structure construction).

    ◆ IsAlwaysRendered()

    bool Graphic3d_CStructure::IsAlwaysRendered ( ) const
    inline

    Checks if the structure should be included into BVH tree or not.

    ◆ IsCulled()

    bool Graphic3d_CStructure::IsCulled ( ) const
    inline

    Returns FALSE if the structure hits the current view volume, otherwise returns TRUE.

    ◆ IsVisible() [1/2]

    bool Graphic3d_CStructure::IsVisible ( ) const
    inline

    Return structure visibility flag.

    ◆ IsVisible() [2/2]

    bool Graphic3d_CStructure::IsVisible ( const int theViewId) const
    inline

    Return structure visibility considering both View Affinity and global visibility state.

    ◆ MarkAsNotCulled()

    void Graphic3d_CStructure::MarkAsNotCulled ( ) const
    inline

    Marks structure as overlapping the current view volume one. The method is called during traverse of BVH tree.

    ◆ NewGroup()

    virtual occ::handle< Graphic3d_Group > Graphic3d_CStructure::NewGroup ( const occ::handle< Graphic3d_Structure > & theStruct)
    pure virtual

    Create new group within this structure.

    Implemented in OpenGl_Structure.

    ◆ OnVisibilityChanged()

    virtual void Graphic3d_CStructure::OnVisibilityChanged ( )
    pure virtual

    Update structure visibility state.

    Implemented in OpenGl_Structure.

    ◆ PreviousPriority()

    Graphic3d_DisplayPriority Graphic3d_CStructure::PreviousPriority ( ) const
    inline

    Return previous structure display priority.

    ◆ Priority()

    Graphic3d_DisplayPriority Graphic3d_CStructure::Priority ( ) const
    inline

    Return structure display priority.

    ◆ RemoveGroup()

    virtual void Graphic3d_CStructure::RemoveGroup ( const occ::handle< Graphic3d_Group > & theGroup)
    pure virtual

    Remove group from this structure.

    Implemented in OpenGl_Structure.

    ◆ SetBndBoxClipCheck()

    void Graphic3d_CStructure::SetBndBoxClipCheck ( bool theBndBoxClipCheck)
    inline

    Enable/disable check of object's bounding box clipping before drawing of object.

    ◆ SetClipPlanes()

    void Graphic3d_CStructure::SetClipPlanes ( const occ::handle< Graphic3d_SequenceOfHClipPlane > & thePlanes)
    inline

    Pass clip planes to the associated graphic driver structure.

    ◆ SetCulled()

    void Graphic3d_CStructure::SetCulled ( bool theIsCulled) const
    inline

    Marks structure as culled/not culled - note that IsAlwaysRendered() is ignored here!

    ◆ SetGroupFlipping()

    void Graphic3d_CStructure::SetGroupFlipping ( bool theValue)
    inline

    Set if some groups might have flipping options.

    ◆ SetGroupTransformPersistence()

    void Graphic3d_CStructure::SetGroupTransformPersistence ( bool theValue)
    inline

    Set if some groups might have transform persistence.

    ◆ SetPreviousPriority()

    void Graphic3d_CStructure::SetPreviousPriority ( Graphic3d_DisplayPriority thePriority)
    inline

    Set previous structure display priority.

    ◆ SetPriority()

    void Graphic3d_CStructure::SetPriority ( Graphic3d_DisplayPriority thePriority)
    inline

    Set structure display priority.

    ◆ SetTransformation()

    virtual void Graphic3d_CStructure::SetTransformation ( const occ::handle< TopLoc_Datum3D > & theTrsf)
    inlinevirtual

    Assign transformation.

    Reimplemented in OpenGl_Structure.

    ◆ SetTransformPersistence()

    virtual void Graphic3d_CStructure::SetTransformPersistence ( const occ::handle< Graphic3d_TransformPers > & theTrsfPers)
    inlinevirtual

    Set transformation persistence.

    Reimplemented in OpenGl_Structure.

    ◆ SetZLayer()

    virtual void Graphic3d_CStructure::SetZLayer ( const Graphic3d_ZLayerId theLayerIndex)
    inlinevirtual

    Set z layer ID to display the structure in specified layer.

    Reimplemented in OpenGl_Structure.

    ◆ ShadowLink()

    virtual occ::handle< Graphic3d_CStructure > Graphic3d_CStructure::ShadowLink ( const occ::handle< Graphic3d_StructureManager > & theManager) const
    pure virtual

    Create shadow link to this structure.

    Implemented in OpenGl_Structure.

    ◆ Transformation()

    const occ::handle< TopLoc_Datum3D > & Graphic3d_CStructure::Transformation ( ) const
    inline

    Return transformation.

    ◆ TransformPersistence()

    const occ::handle< Graphic3d_TransformPers > & Graphic3d_CStructure::TransformPersistence ( ) const
    inline

    Return transformation persistence.

    ◆ updateLayerTransformation()

    virtual void Graphic3d_CStructure::updateLayerTransformation ( )
    inlinevirtual

    Update render transformation matrix.

    Reimplemented in OpenGl_Structure.

    ◆ ZLayer()

    Graphic3d_ZLayerId Graphic3d_CStructure::ZLayer ( ) const
    inline

    Get z layer ID.

    Field Documentation

    ◆ highlight

    unsigned Graphic3d_CStructure::highlight

    ◆ HLRValidation

    unsigned Graphic3d_CStructure::HLRValidation

    ◆ Is2dText

    unsigned Graphic3d_CStructure::Is2dText

    ◆ IsForHighlight

    unsigned Graphic3d_CStructure::IsForHighlight

    ◆ IsInfinite

    unsigned Graphic3d_CStructure::IsInfinite

    ◆ IsMutable

    unsigned Graphic3d_CStructure::IsMutable

    ◆ myBndBox

    Graphic3d_BndBox3d Graphic3d_CStructure::myBndBox
    protected

    ◆ myBndBoxClipCheck

    bool Graphic3d_CStructure::myBndBoxClipCheck
    protected

    Flag responsible for checking of bounding box clipping before drawing of object.

    ◆ myClipPlanes

    occ::handle<Graphic3d_SequenceOfHClipPlane> Graphic3d_CStructure::myClipPlanes
    protected

    ◆ myGraphicDriver

    occ::handle<Graphic3d_GraphicDriver> Graphic3d_CStructure::myGraphicDriver
    protected

    ◆ myGroups

    NCollection_Sequence<occ::handle<Graphic3d_Group> > Graphic3d_CStructure::myGroups
    protected

    ◆ myHasGroupFlipping

    bool Graphic3d_CStructure::myHasGroupFlipping
    protected

    flag specifying that some groups might have flipping options

    ◆ myHasGroupTrsf

    bool Graphic3d_CStructure::myHasGroupTrsf
    protected

    flag specifying that some groups might have transform persistence

    ◆ myHighlightStyle

    occ::handle<Graphic3d_PresentationAttributes> Graphic3d_CStructure::myHighlightStyle
    protected

    ◆ myId

    int Graphic3d_CStructure::myId
    protected

    Current highlight style; is set only if highlight flag is true.

    ◆ myIsCulled

    bool Graphic3d_CStructure::myIsCulled
    mutableprotected

    A status specifying is structure needs to be rendered after BVH tree traverse.

    ◆ myPreviousPriority

    Graphic3d_DisplayPriority Graphic3d_CStructure::myPreviousPriority
    protected

    ◆ myPriority

    Graphic3d_DisplayPriority Graphic3d_CStructure::myPriority
    protected

    ◆ myTrsf

    occ::handle<TopLoc_Datum3D> Graphic3d_CStructure::myTrsf
    protected

    ◆ myTrsfPers

    occ::handle<Graphic3d_TransformPers> Graphic3d_CStructure::myTrsfPers
    protected

    ◆ myZLayer

    Graphic3d_ZLayerId Graphic3d_CStructure::myZLayer
    protected

    ◆ stick

    unsigned Graphic3d_CStructure::stick

    displaying state - should be set when structure has been added to scene graph (but can be in hidden state)

    ◆ ViewAffinity

    occ::handle<Graphic3d_ViewAffinity> Graphic3d_CStructure::ViewAffinity

    view affinity mask

    ◆ visible

    unsigned Graphic3d_CStructure::visible

    visibility flag - can be used to suppress structure while leaving it in the scene graph


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