Open CASCADE Technology  6.9.1
Public Member Functions
Visual3d_ViewManager Class Reference

This class allows the definition of a manager to which the views are associated. It allows them to be globally manipulated. More...

#include <Visual3d_ViewManager.hxx>

Inheritance diagram for Visual3d_ViewManager:
Inheritance graph
[legend]

Public Member Functions

 Visual3d_ViewManager (const Handle< Graphic3d_GraphicDriver > &theDriver)
 Creates a 3D visualizer. Currently creating of more than 100 viewer instances is not supported and leads to InitializationError and initialisation failure. This limitation might be addressed in some future OCCT releases. More...
 
void Activate ()
 Activates all the views of the manager <me>. More...
 
void Deactivate ()
 Deactivates all the views of the manager <me>. More...
 
virtual void Destroy ()
 Deletes and erases the 3D visualiser <me>. More...
 
 ~Visual3d_ViewManager ()
 
void Erase ()
 Erases all of the structures displayed in the visualiser <me>. More...
 
void Redraw () const
 Redraws all the displayed structures. More...
 
void RedrawImmediate () const
 Updates layer of immediate presentations. More...
 
void Invalidate () const
 Invalidates viewer content but does not redraw it. More...
 
void Remove ()
 Deletes and erases the 3D visualiser <me>. More...
 
void Update () const
 Updates screen in function of modifications of the structures. Category: Methods to modify the class definition. More...
 
Handle< Visual3d_HSequenceOfViewActivatedView () const
 Returns the group of views activated in the visualiser <me>. More...
 
const Visual3d_SequenceOfViewDefinedViews () const
 Returns the group of views defined in the visualiser <me>. More...
 
Standard_Integer MaxNumOfViews () const
 Returns the theoretical maximum number of definable views in the view manager <me>. Warning: It's not possible to accept an infinite number of definable views because each view must have an identification and we have different view managers. More...
 
Standard_Integer Identification (const Handle< Visual3d_View > &AView)
 Returns : a new identification number for a new view in the visualiser. More...
 
void UnIdentification (const Standard_Integer aViewId)
 Release a unique ID of the view reserved for the view on its creation. More...
 
Handle< Graphic3d_StructureIdentification (const Standard_Integer AId) const
 Returns the structure with the identification number <AId>. More...
 
Standard_Integer Identification () const
 Returns the identification number of the visualiser. More...
 
void ChangeDisplayPriority (const Handle< Graphic3d_Structure > &AStructure, const Standard_Integer OldPriority, const Standard_Integer NewPriority)
 Changes the display priority of the structure <AStructure>. More...
 
void ChangeZLayer (const Handle< Graphic3d_Structure > &theStructure, const Graphic3d_ZLayerId theLayerId)
 Change Z layer for structure. The layer mechanism allows to display structures in higher layers in overlay of structures in lower layers. More...
 
void SetZLayerSettings (const Graphic3d_ZLayerId theLayerId, const Graphic3d_ZLayerSettings &theSettings)
 Sets the settings for a single Z layer for all managed views. More...
 
Graphic3d_ZLayerSettings ZLayerSettings (const Graphic3d_ZLayerId theLayerId)
 Returns the settings of a single Z layer. More...
 
Standard_Boolean AddZLayer (Graphic3d_ZLayerId &theLayerId)
 Add a new top-level Z layer and get its ID as <theLayerId> value. The method returns Standard_False if the layer can not be created. The layer mechanism allows to display structures in higher layers in overlay of structures in lower layers. More...
 
Standard_Boolean RemoveZLayer (const Graphic3d_ZLayerId theLayerId)
 Remove Z layer with ID <theLayerId>. Method returns Standard_False if the layer can not be removed or doesn't exists. By default, there are always default bottom-level layer that can't be removed. More...
 
void GetAllZLayers (TColStd_SequenceOfInteger &theLayerSeq) const
 Return all Z layer ids in sequence ordered by overlay level from lowest layer to highest ( foreground ). The first layer ID in sequence is the default layer that can't be removed. More...
 
void Clear (const Handle< Graphic3d_Structure > &AStructure, const Standard_Boolean WithDestruction)
 Clears the structure <AStructure>. More...
 
void Connect (const Handle< Graphic3d_Structure > &AMother, const Handle< Graphic3d_Structure > &ADaughter)
 Connects the structures <AMother> and <ADaughter>. More...
 
void Disconnect (const Handle< Graphic3d_Structure > &AMother, const Handle< Graphic3d_Structure > &ADaughter)
 Disconnects the structures <AMother> and <ADaughter>. More...
 
void Display (const Handle< Graphic3d_Structure > &AStructure)
 Display of the structure <AStructure>. More...
 
void Erase (const Handle< Graphic3d_Structure > &AStructure)
 Erases the structure <AStructure>. More...
 
void Highlight (const Handle< Graphic3d_Structure > &AStructure, const Aspect_TypeOfHighlightMethod AMethod)
 Highlights the structure <AStructure>. More...
 
void SetTransform (const Handle< Graphic3d_Structure > &AStructure, const TColStd_Array2OfReal &ATrsf)
 Transforms the structure <AStructure>. More...
 
void UnHighlight ()
 Suppress the highlighting on all the structures. More...
 
void UnHighlight (const Handle< Graphic3d_Structure > &AStructure)
 Suppress the highlighting on the structure <AStructure>. More...
 
Standard_Boolean ViewExists (const Handle< Aspect_Window > &AWindow, Graphic3d_CView &TheCView) const
 Returns Standard_True if the view associated to the window <AWindow> exists and is activated. <TheViewId> contains the internal identification of the associated view. More...
 
const Handle< Visual3d_Layer > & UnderLayer () const
 Returns the underlay of the viewer <me>. More...
 
const Handle< Visual3d_Layer > & OverLayer () const
 Returns the underlay of the viewer <me>. More...
 
void ReCompute (const Handle< Graphic3d_Structure > &AStructure)
 Forces a new construction of the structure <AStructure> if <AStructure> is displayed and TOS_COMPUTED. More...
 
void ReCompute (const Handle< Graphic3d_Structure > &AStructure, const Handle< Graphic3d_DataStructureManager > &AProjector)
 Forces a new construction of the structure <AStructure> if <AStructure> is displayed in <AProjector> and TOS_COMPUTED. More...
 
Standard_Boolean ZBufferAuto () const
 Returns Standard_True if the zbuffer activity is managed automatically. Default Standard_False. More...
 
void SetZBufferAuto (const Standard_Boolean AFlag)
 if <AFlag> is Standard_True then the zbuffer activity is managed automatically. Default Standard_False More...
 
- Public Member Functions inherited from Graphic3d_StructureManager
 ~Graphic3d_StructureManager ()
 
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 AType)
 Modifies the screen update mode. 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...
 
Aspect_TypeOfUpdate UpdateMode () const
 Returns the screen update mode. More...
 
const Handle< Graphic3d_GraphicDriver > & GraphicDriver () const
 Returns the graphic driver of <me>. More...
 
Standard_Integer NewIdentification ()
 Returns a new identification number for a new structure in the manager. 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
 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 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...
 

Additional Inherited Members

- Static Public Member Functions inherited from Graphic3d_StructureManager
static Standard_Integer Limit ()
 Returns maximum number of managers defineable. More...
 
static Standard_Integer CurrentId ()
 Returns a current identifier available. More...
 
- Protected Member Functions inherited from Graphic3d_StructureManager
 Graphic3d_StructureManager (const Handle< Graphic3d_GraphicDriver > &theDriver)
 Initialises the ViewManager. Currently creating of more than 100 viewer instances is not supported and leads to InitializationError and initialisation failure. This limitation might be addressed in some future OCCT releases. Warning: Raises InitialisationError if the initialisation of the ViewManager failed. More...
 
Standard_Integer NumberOfDisplayedStructures () const
 Returns the number of structures displayed in visualiser <me>. Returns the structure displayed in visualiser <me>. More...
 
- Protected Attributes inherited from Graphic3d_StructureManager
Standard_Integer MyId
 
Aspect_TypeOfUpdate MyUpdateMode
 
Handle< Graphic3d_AspectLine3dMyAspectLine3d
 
Handle< Graphic3d_AspectText3dMyAspectText3d
 
Handle< Graphic3d_AspectMarker3dMyAspectMarker3d
 
Handle< Graphic3d_AspectFillArea3dMyAspectFillArea3d
 
Graphic3d_MapOfStructure MyDisplayedStructure
 
Graphic3d_MapOfObject myRegisteredObjects
 
Graphic3d_MapOfStructure MyHighlightedStructure
 
Aspect_GenId MyStructGenId
 
Handle< Graphic3d_GraphicDriverMyGraphicDriver
 

Detailed Description

This class allows the definition of a manager to which the views are associated. It allows them to be globally manipulated.

Constructor & Destructor Documentation

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

Creates a 3D visualizer. Currently creating of more than 100 viewer instances is not supported and leads to InitializationError and initialisation failure. This limitation might be addressed in some future OCCT releases.

Category: Methods to modify the class definition

Visual3d_ViewManager::~Visual3d_ViewManager ( )
inline

Member Function Documentation

void Visual3d_ViewManager::Activate ( )

Activates all the views of the manager <me>.

Handle< Visual3d_HSequenceOfView > Visual3d_ViewManager::ActivatedView ( ) const

Returns the group of views activated in the visualiser <me>.

Standard_Boolean Visual3d_ViewManager::AddZLayer ( Graphic3d_ZLayerId theLayerId)
virtual

Add a new top-level Z layer and get its ID as <theLayerId> value. The method returns Standard_False if the layer can not be created. The layer mechanism allows to display structures in higher layers in overlay of structures in lower layers.

Implements Graphic3d_StructureManager.

void Visual3d_ViewManager::ChangeDisplayPriority ( const Handle< Graphic3d_Structure > &  AStructure,
const Standard_Integer  OldPriority,
const Standard_Integer  NewPriority 
)
virtual

Changes the display priority of the structure <AStructure>.

Implements Graphic3d_StructureManager.

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

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

Implements Graphic3d_StructureManager.

void Visual3d_ViewManager::Clear ( const Handle< Graphic3d_Structure > &  AStructure,
const Standard_Boolean  WithDestruction 
)
virtual

Clears the structure <AStructure>.

Implements Graphic3d_StructureManager.

void Visual3d_ViewManager::Connect ( const Handle< Graphic3d_Structure > &  AMother,
const Handle< Graphic3d_Structure > &  ADaughter 
)
virtual

Connects the structures <AMother> and <ADaughter>.

Implements Graphic3d_StructureManager.

void Visual3d_ViewManager::Deactivate ( )

Deactivates all the views of the manager <me>.

const Visual3d_SequenceOfView& Visual3d_ViewManager::DefinedViews ( ) const

Returns the group of views defined in the visualiser <me>.

virtual void Visual3d_ViewManager::Destroy ( )
virtual

Deletes and erases the 3D visualiser <me>.

Reimplemented from Graphic3d_StructureManager.

void Visual3d_ViewManager::Disconnect ( const Handle< Graphic3d_Structure > &  AMother,
const Handle< Graphic3d_Structure > &  ADaughter 
)
virtual

Disconnects the structures <AMother> and <ADaughter>.

Implements Graphic3d_StructureManager.

void Visual3d_ViewManager::Display ( const Handle< Graphic3d_Structure > &  AStructure)
virtual

Display of the structure <AStructure>.

Implements Graphic3d_StructureManager.

void Visual3d_ViewManager::Erase ( )

Erases all of the structures displayed in the visualiser <me>.

void Visual3d_ViewManager::Erase ( const Handle< Graphic3d_Structure > &  AStructure)
virtual

Erases the structure <AStructure>.

Implements Graphic3d_StructureManager.

void Visual3d_ViewManager::GetAllZLayers ( TColStd_SequenceOfInteger theLayerSeq) const
virtual

Return all Z layer ids in sequence ordered by overlay level from lowest layer to highest ( foreground ). The first layer ID in sequence is the default layer that can't be removed.

Implements Graphic3d_StructureManager.

void Visual3d_ViewManager::Highlight ( const Handle< Graphic3d_Structure > &  AStructure,
const Aspect_TypeOfHighlightMethod  AMethod 
)
virtual

Highlights the structure <AStructure>.

Implements Graphic3d_StructureManager.

Standard_Integer Visual3d_ViewManager::Identification ( const Handle< Visual3d_View > &  AView)

Returns : a new identification number for a new view in the visualiser.

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

Returns the structure with the identification number <AId>.

Reimplemented from Graphic3d_StructureManager.

Standard_Integer Visual3d_ViewManager::Identification ( ) const
virtual

Returns the identification number of the visualiser.

Reimplemented from Graphic3d_StructureManager.

void Visual3d_ViewManager::Invalidate ( ) const

Invalidates viewer content but does not redraw it.

Standard_Integer Visual3d_ViewManager::MaxNumOfViews ( ) const

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

const Handle< Visual3d_Layer >& Visual3d_ViewManager::OverLayer ( ) const

Returns the underlay of the viewer <me>.

void Visual3d_ViewManager::ReCompute ( const Handle< Graphic3d_Structure > &  AStructure)
virtual

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

Implements Graphic3d_StructureManager.

void Visual3d_ViewManager::ReCompute ( const Handle< Graphic3d_Structure > &  AStructure,
const Handle< Graphic3d_DataStructureManager > &  AProjector 
)
virtual

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

Implements Graphic3d_StructureManager.

void Visual3d_ViewManager::Redraw ( ) const

Redraws all the displayed structures.

void Visual3d_ViewManager::RedrawImmediate ( ) const

Updates layer of immediate presentations.

void Visual3d_ViewManager::Remove ( )

Deletes and erases the 3D visualiser <me>.

Standard_Boolean Visual3d_ViewManager::RemoveZLayer ( const Graphic3d_ZLayerId  theLayerId)
virtual

Remove Z layer with ID <theLayerId>. Method returns Standard_False if the layer can not be removed or doesn't exists. By default, there are always default bottom-level layer that can't be removed.

Implements Graphic3d_StructureManager.

void Visual3d_ViewManager::SetTransform ( const Handle< Graphic3d_Structure > &  AStructure,
const TColStd_Array2OfReal ATrsf 
)
virtual

Transforms the structure <AStructure>.

Implements Graphic3d_StructureManager.

void Visual3d_ViewManager::SetZBufferAuto ( const Standard_Boolean  AFlag)

if <AFlag> is Standard_True then the zbuffer activity is managed automatically. Default Standard_False

void Visual3d_ViewManager::SetZLayerSettings ( const Graphic3d_ZLayerId  theLayerId,
const Graphic3d_ZLayerSettings theSettings 
)
virtual

Sets the settings for a single Z layer for all managed views.

Implements Graphic3d_StructureManager.

const Handle< Visual3d_Layer >& Visual3d_ViewManager::UnderLayer ( ) const

Returns the underlay of the viewer <me>.

void Visual3d_ViewManager::UnHighlight ( )
virtual

Suppress the highlighting on all the structures.

Implements Graphic3d_StructureManager.

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

Suppress the highlighting on the structure <AStructure>.

Implements Graphic3d_StructureManager.

void Visual3d_ViewManager::UnIdentification ( const Standard_Integer  aViewId)

Release a unique ID of the view reserved for the view on its creation.

void Visual3d_ViewManager::Update ( ) const
virtual

Updates screen in function of modifications of the structures. Category: Methods to modify the class definition.

Implements Graphic3d_StructureManager.

Standard_Boolean Visual3d_ViewManager::ViewExists ( const Handle< Aspect_Window > &  AWindow,
Graphic3d_CView TheCView 
) const

Returns Standard_True if the view associated to the window <AWindow> exists and is activated. <TheViewId> contains the internal identification of the associated view.

Standard_Boolean Visual3d_ViewManager::ZBufferAuto ( ) const

Returns Standard_True if the zbuffer activity is managed automatically. Default Standard_False.

Graphic3d_ZLayerSettings Visual3d_ViewManager::ZLayerSettings ( const Graphic3d_ZLayerId  theLayerId)
virtual

Returns the settings of a single Z layer.

Implements Graphic3d_StructureManager.


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