Open CASCADE Technology  7.0.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
Graphic3d_StructureManager Class Reference

This class allows the definition of a manager to which the graphic objects are associated. It allows them to be globally manipulated. It defines the global attributes. Keywords: Structure, Structure Manager, Update Mode, Destroy, Highlight, Visible. More...

#include <Graphic3d_StructureManager.hxx>

Inheritance diagram for Graphic3d_StructureManager:
Inheritance graph
[legend]

Public Member Functions

 Graphic3d_StructureManager (const Handle< Graphic3d_GraphicDriver > &theDriver)
 Initializes the ViewManager. Currently creating of more than 100 viewer instances is not supported and leads to InitializationError and initialization failure. This limitation might be addressed in some future OCCT releases. Warning: Raises InitialisationError if the initialization of the ViewManager failed. More...
 
 ~Graphic3d_StructureManager ()
 Deletes the manager <me>. More...
 
void SetPrimitivesAspect (const Handle< Graphic3d_AspectLine3d > &CTX)
 Modifies the default attributes for lines in the visualiser. More...
 
void SetPrimitivesAspect (const Handle< Graphic3d_AspectFillArea3d > &CTX)
 Modifies the default attributes for faces in the visualiser. More...
 
void SetPrimitivesAspect (const Handle< Graphic3d_AspectText3d > &CTX)
 Modifies the default attributes for text in the visualiser. More...
 
void SetPrimitivesAspect (const Handle< Graphic3d_AspectMarker3d > &CTX)
 Modifies the default attributes for markers in the visualiser. More...
 
void SetUpdateMode (const Aspect_TypeOfUpdate theType)
 Modifies the screen update mode. More...
 
Aspect_TypeOfUpdate UpdateMode () const
 Returns the screen update mode. More...
 
virtual void Update (const Aspect_TypeOfUpdate theMode=Aspect_TOU_ASAP) const
 Updates screen in function of modifications of the structures. More...
 
virtual void Remove ()
 Deletes and erases the 3D structure manager. More...
 
virtual void Erase ()
 Erases all the structures. More...
 
void DisplayedStructures (Graphic3d_MapOfStructure &SG) const
 Returns the set of structures displayed in visualiser <me>. More...
 
void HighlightedStructures (Graphic3d_MapOfStructure &SG) const
 Returns the set of highlighted structures in a visualiser <me>. More...
 
Handle< Graphic3d_AspectFillArea3dFillArea3dAspect () const
 Returns the values of the current default attributes. More...
 
Handle< Graphic3d_AspectLine3dLine3dAspect () const
 Returns the values of the current default attributes. More...
 
Handle< Graphic3d_AspectMarker3dMarker3dAspect () const
 Returns the values of the current default attributes. More...
 
void PrimitivesAspect (Handle< Graphic3d_AspectLine3d > &CTXL, Handle< Graphic3d_AspectText3d > &CTXT, Handle< Graphic3d_AspectMarker3d > &CTXM, Handle< Graphic3d_AspectFillArea3d > &CTXF) const
 Returns the values of the current default attributes. More...
 
Handle< Graphic3d_AspectText3dText3dAspect () const
 Returns the values of the current default attributes. More...
 
virtual void ReCompute (const Handle< Graphic3d_Structure > &theStructure)
 Forces a new construction of the structure. if <theStructure> is displayed and TOS_COMPUTED. More...
 
virtual void ReCompute (const Handle< Graphic3d_Structure > &theStructure, const Handle< Graphic3d_DataStructureManager > &theProjector)
 Forces a new construction of the structure. if <theStructure> is displayed in <theProjector> and TOS_COMPUTED. More...
 
virtual void Clear (const Handle< Graphic3d_Structure > &theStructure, const Standard_Boolean theWithDestruction)
 Clears the structure. More...
 
virtual void Connect (const Handle< Graphic3d_Structure > &theMother, const Handle< Graphic3d_Structure > &theDaughter)
 Connects the structures. More...
 
virtual void Disconnect (const Handle< Graphic3d_Structure > &theMother, const Handle< Graphic3d_Structure > &theDaughter)
 Disconnects the structures. More...
 
virtual void Display (const Handle< Graphic3d_Structure > &theStructure)
 Display the structure. More...
 
virtual void Erase (const Handle< Graphic3d_Structure > &theStructure)
 Erases the structure. More...
 
virtual void Highlight (const Handle< Graphic3d_Structure > &theStructure, const Aspect_TypeOfHighlightMethod theMethod)
 Highlights the structure. More...
 
virtual void SetTransform (const Handle< Graphic3d_Structure > &theStructure, const TColStd_Array2OfReal &theTrsf)
 Transforms the structure. More...
 
virtual void ChangeDisplayPriority (const Handle< Graphic3d_Structure > &theStructure, const Standard_Integer theOldPriority, const Standard_Integer theNewPriority)
 Changes the display priority of the structure <AStructure>. More...
 
virtual void ChangeZLayer (const Handle< Graphic3d_Structure > &theStructure, const Graphic3d_ZLayerId theLayerId)
 Change Z layer for structure. The Z layer mechanism allows to display structures in higher layers in overlay of structures in lower layers. More...
 
const Handle< Graphic3d_GraphicDriver > & GraphicDriver () const
 Returns the graphic driver of <me>. More...
 
Standard_Integer Identification (Graphic3d_CView *theView)
 Attaches the view to this structure manager and sets its identification number within the manager. More...
 
void UnIdentification (Graphic3d_CView *theView)
 Detach the view from this structure manager and release its identification. More...
 
const Graphic3d_IndexedMapOfViewDefinedViews () const
 Returns the group of views defined in the structure manager. More...
 
Standard_Integer MaxNumOfViews () const
 Returns the theoretical maximum number of definable views in the manager. Warning: It's not possible to accept an infinite number of definable views because each view must have an identification and we have different managers. More...
 
virtual Standard_Integer Identification () const
 Returns the identification number of the manager. More...
 
virtual Handle< Graphic3d_StructureIdentification (const Standard_Integer AId) const
 Returns the structure with the identification number <AId>. More...
 
Standard_Integer NewIdentification ()
 Returns a new identification number for a new structure in the manager. More...
 
virtual void UnHighlight (const Handle< Graphic3d_Structure > &AStructure)
 Suppress the highlighting on the structure <AStructure>. More...
 
virtual void UnHighlight ()
 Suppresses the highlighting on all the structures in <me>. More...
 
void RecomputeStructures ()
 
void RecomputeStructures (const Graphic3d_MapOfStructure &theStructures)
 Recomputes all structures from theStructures. More...
 
Handle< Graphic3d_ViewAffinityRegisterObject (const Handle< Standard_Transient > &theObject)
 
void UnregisterObject (const Handle< Standard_Transient > &theObject)
 
Handle< Graphic3d_ViewAffinityObjectAffinity (const Handle< Standard_Transient > &theObject) const
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const override
 Memory deallocator for transient classes. More...
 
- 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 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...
 

Static Public Member Functions

static Standard_Integer Limit ()
 Returns maximum number of managers defineable. More...
 
static Standard_Integer CurrentId ()
 Returns a current identifier available. More...
 
- 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...
 

Protected Member Functions

Standard_Integer NumberOfDisplayedStructures () const
 Returns the number of structures displayed in visualizer <me>. Returns the structure displayed in visualizer <me>. More...
 

Protected Attributes

Standard_Integer myId
 
Aspect_GenId myStructGenId
 
Aspect_GenId myViewGenId
 
Aspect_TypeOfUpdate myUpdateMode
 
Handle< Graphic3d_AspectLine3dmyAspectLine3d
 
Handle< Graphic3d_AspectText3dmyAspectText3d
 
Handle< Graphic3d_AspectMarker3dmyAspectMarker3d
 
Handle< Graphic3d_AspectFillArea3dmyAspectFillArea3d
 
Graphic3d_MapOfStructure myDisplayedStructure
 
Graphic3d_MapOfStructure myHighlightedStructure
 
Graphic3d_MapOfObject myRegisteredObjects
 
Handle< Graphic3d_GraphicDrivermyGraphicDriver
 
Graphic3d_IndexedMapOfView myDefinedViews
 

Additional Inherited Members

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

Detailed Description

This class allows the definition of a manager to which the graphic objects are associated. It allows them to be globally manipulated. It defines the global attributes. Keywords: Structure, Structure Manager, Update Mode, Destroy, Highlight, Visible.

Constructor & Destructor Documentation

Graphic3d_StructureManager::Graphic3d_StructureManager ( const Handle< Graphic3d_GraphicDriver > &  theDriver)

Initializes the ViewManager. Currently creating of more than 100 viewer instances is not supported and leads to InitializationError and initialization failure. This limitation might be addressed in some future OCCT releases. Warning: Raises InitialisationError if the initialization of the ViewManager failed.

Graphic3d_StructureManager::~Graphic3d_StructureManager ( )

Deletes the manager <me>.

Member Function Documentation

virtual void Graphic3d_StructureManager::ChangeDisplayPriority ( const Handle< Graphic3d_Structure > &  theStructure,
const Standard_Integer  theOldPriority,
const Standard_Integer  theNewPriority 
)
virtual

Changes the display priority of the structure <AStructure>.

virtual void Graphic3d_StructureManager::ChangeZLayer ( const Handle< Graphic3d_Structure > &  theStructure,
const Graphic3d_ZLayerId  theLayerId 
)
virtual

Change Z layer for structure. The Z layer mechanism allows to display structures in higher layers in overlay of structures in lower layers.

virtual void Graphic3d_StructureManager::Clear ( const Handle< Graphic3d_Structure > &  theStructure,
const Standard_Boolean  theWithDestruction 
)
virtual

Clears the structure.

virtual void Graphic3d_StructureManager::Connect ( const Handle< Graphic3d_Structure > &  theMother,
const Handle< Graphic3d_Structure > &  theDaughter 
)
virtual

Connects the structures.

static Standard_Integer Graphic3d_StructureManager::CurrentId ( )
static

Returns a current identifier available.

const Graphic3d_IndexedMapOfView& Graphic3d_StructureManager::DefinedViews ( ) const

Returns the group of views defined in the structure manager.

virtual void Graphic3d_StructureManager::Disconnect ( const Handle< Graphic3d_Structure > &  theMother,
const Handle< Graphic3d_Structure > &  theDaughter 
)
virtual

Disconnects the structures.

virtual void Graphic3d_StructureManager::Display ( const Handle< Graphic3d_Structure > &  theStructure)
virtual

Display the structure.

void Graphic3d_StructureManager::DisplayedStructures ( Graphic3d_MapOfStructure SG) const

Returns the set of structures displayed in visualiser <me>.

virtual void Graphic3d_StructureManager::Erase ( )
virtual

Erases all the structures.

virtual void Graphic3d_StructureManager::Erase ( const Handle< Graphic3d_Structure > &  theStructure)
virtual

Erases the structure.

Handle< Graphic3d_AspectFillArea3d > Graphic3d_StructureManager::FillArea3dAspect ( ) const

Returns the values of the current default attributes.

const Handle< Graphic3d_GraphicDriver >& Graphic3d_StructureManager::GraphicDriver ( ) const

Returns the graphic driver of <me>.

virtual void Graphic3d_StructureManager::Highlight ( const Handle< Graphic3d_Structure > &  theStructure,
const Aspect_TypeOfHighlightMethod  theMethod 
)
virtual

Highlights the structure.

void Graphic3d_StructureManager::HighlightedStructures ( Graphic3d_MapOfStructure SG) const

Returns the set of highlighted structures in a visualiser <me>.

Standard_Integer Graphic3d_StructureManager::Identification ( Graphic3d_CView theView)

Attaches the view to this structure manager and sets its identification number within the manager.

virtual Standard_Integer Graphic3d_StructureManager::Identification ( ) const
virtual

Returns the identification number of the manager.

virtual Handle< Graphic3d_Structure > Graphic3d_StructureManager::Identification ( const Standard_Integer  AId) const
virtual

Returns the structure with the identification number <AId>.

static Standard_Integer Graphic3d_StructureManager::Limit ( )
static

Returns maximum number of managers defineable.

Handle< Graphic3d_AspectLine3d > Graphic3d_StructureManager::Line3dAspect ( ) const

Returns the values of the current default attributes.

Handle< Graphic3d_AspectMarker3d > Graphic3d_StructureManager::Marker3dAspect ( ) const

Returns the values of the current default attributes.

Standard_Integer Graphic3d_StructureManager::MaxNumOfViews ( ) const

Returns the theoretical maximum number of definable views in the manager. Warning: It's not possible to accept an infinite number of definable views because each view must have an identification and we have different managers.

Standard_Integer Graphic3d_StructureManager::NewIdentification ( )

Returns a new identification number for a new structure in the manager.

Standard_Integer Graphic3d_StructureManager::NumberOfDisplayedStructures ( ) const
protected

Returns the number of structures displayed in visualizer <me>. Returns the structure displayed in visualizer <me>.

Handle< Graphic3d_ViewAffinity > Graphic3d_StructureManager::ObjectAffinity ( const Handle< Standard_Transient > &  theObject) const
void Graphic3d_StructureManager::PrimitivesAspect ( Handle< Graphic3d_AspectLine3d > &  CTXL,
Handle< Graphic3d_AspectText3d > &  CTXT,
Handle< Graphic3d_AspectMarker3d > &  CTXM,
Handle< Graphic3d_AspectFillArea3d > &  CTXF 
) const

Returns the values of the current default attributes.

virtual void Graphic3d_StructureManager::ReCompute ( const Handle< Graphic3d_Structure > &  theStructure)
virtual

Forces a new construction of the structure. if <theStructure> is displayed and TOS_COMPUTED.

virtual void Graphic3d_StructureManager::ReCompute ( const Handle< Graphic3d_Structure > &  theStructure,
const Handle< Graphic3d_DataStructureManager > &  theProjector 
)
virtual

Forces a new construction of the structure. if <theStructure> is displayed in <theProjector> and TOS_COMPUTED.

void Graphic3d_StructureManager::RecomputeStructures ( )
void Graphic3d_StructureManager::RecomputeStructures ( const Graphic3d_MapOfStructure theStructures)

Recomputes all structures from theStructures.

Handle< Graphic3d_ViewAffinity > Graphic3d_StructureManager::RegisterObject ( const Handle< Standard_Transient > &  theObject)
virtual void Graphic3d_StructureManager::Remove ( )
virtual

Deletes and erases the 3D structure manager.

void Graphic3d_StructureManager::SetPrimitivesAspect ( const Handle< Graphic3d_AspectLine3d > &  CTX)

Modifies the default attributes for lines in the visualiser.

void Graphic3d_StructureManager::SetPrimitivesAspect ( const Handle< Graphic3d_AspectFillArea3d > &  CTX)

Modifies the default attributes for faces in the visualiser.

void Graphic3d_StructureManager::SetPrimitivesAspect ( const Handle< Graphic3d_AspectText3d > &  CTX)

Modifies the default attributes for text in the visualiser.

void Graphic3d_StructureManager::SetPrimitivesAspect ( const Handle< Graphic3d_AspectMarker3d > &  CTX)

Modifies the default attributes for markers in the visualiser.

virtual void Graphic3d_StructureManager::SetTransform ( const Handle< Graphic3d_Structure > &  theStructure,
const TColStd_Array2OfReal theTrsf 
)
virtual

Transforms the structure.

void Graphic3d_StructureManager::SetUpdateMode ( const Aspect_TypeOfUpdate  theType)

Modifies the screen update mode.

TOU_ASAP - as soon as possible TOU_WAIT - on demand (with the Update function) Note : Dynamic Operations and Update Mode Use SetUpdateMode to control when changes to the display are made. Use one of the following functions to update one or more views:

  • Update all views of the viewer: Graphic3d_StructureManager::Update()
  • Update one view of the viewer: Graphic3d_View::Update() Use one of the following functions to update the entire display:
  • Redraw all structures in all views: Graphic3d_StructureManager::Redraw()
  • Redraw all structures in one view: Graphic3d_View::Redraw()
Handle< Graphic3d_AspectText3d > Graphic3d_StructureManager::Text3dAspect ( ) const

Returns the values of the current default attributes.

virtual void Graphic3d_StructureManager::UnHighlight ( const Handle< Graphic3d_Structure > &  AStructure)
virtual

Suppress the highlighting on the structure <AStructure>.

virtual void Graphic3d_StructureManager::UnHighlight ( )
virtual

Suppresses the highlighting on all the structures in <me>.

void Graphic3d_StructureManager::UnIdentification ( Graphic3d_CView theView)

Detach the view from this structure manager and release its identification.

void Graphic3d_StructureManager::UnregisterObject ( const Handle< Standard_Transient > &  theObject)
virtual void Graphic3d_StructureManager::Update ( const Aspect_TypeOfUpdate  theMode = Aspect_TOU_ASAP) const
virtual

Updates screen in function of modifications of the structures.

Aspect_TypeOfUpdate Graphic3d_StructureManager::UpdateMode ( ) const

Returns the screen update mode.

TOU_ASAP as soon as possible TOU_WAIT on demand (Update)

Field Documentation

Handle< Graphic3d_AspectFillArea3d > Graphic3d_StructureManager::myAspectFillArea3d
protected
Handle< Graphic3d_AspectLine3d > Graphic3d_StructureManager::myAspectLine3d
protected
Handle< Graphic3d_AspectMarker3d > Graphic3d_StructureManager::myAspectMarker3d
protected
Handle< Graphic3d_AspectText3d > Graphic3d_StructureManager::myAspectText3d
protected
Graphic3d_IndexedMapOfView Graphic3d_StructureManager::myDefinedViews
protected
Graphic3d_MapOfStructure Graphic3d_StructureManager::myDisplayedStructure
protected
Handle< Graphic3d_GraphicDriver > Graphic3d_StructureManager::myGraphicDriver
protected
Graphic3d_MapOfStructure Graphic3d_StructureManager::myHighlightedStructure
protected
Standard_Integer Graphic3d_StructureManager::myId
protected
Graphic3d_MapOfObject Graphic3d_StructureManager::myRegisteredObjects
protected
Aspect_GenId Graphic3d_StructureManager::myStructGenId
protected
Aspect_TypeOfUpdate Graphic3d_StructureManager::myUpdateMode
protected
Aspect_GenId Graphic3d_StructureManager::myViewGenId
protected

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