Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
Graphic3d_StructureManager Class Referenceabstract

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, Detectable
More...

#include <Graphic3d_StructureManager.hxx>

Inheritance diagram for Graphic3d_StructureManager:
Inheritance graph
[legend]

Public Member Functions

virtual void Destroy ()
 Deletes the manager <me>.
More...
 
 ~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. <br>


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:
More...

 
virtual void Update () const =0
 
 Updates screen in function of modifications of <br>
   the structures. <br>

Warning: Not necessary if the update mode is TOU_ASAP.
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...
 
void PickStructures (Graphic3d_MapOfStructure &SG) const
 Returns the set of detectable structures
in a visualiser <me>.
More...
 
Handle_Graphic3d_AspectFillArea3d FillArea3dAspect () const
 Returns the values of the current default attributes.
More...
 
Handle_Graphic3d_AspectLine3d Line3dAspect () const
 Returns the values of the current default attributes.
More...
 
Handle_Graphic3d_AspectMarker3d Marker3dAspect () const
 Returns the values of the current default attributes.
More...
 
void MinMaxValues (Standard_Real &XMin, Standard_Real &YMin, Standard_Real &ZMin, Standard_Real &XMax, Standard_Real &YMax, Standard_Real &ZMax) const
 Returns the coordinates of the boundary box of all
structures displayed in the manager <me>.
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_AspectText3d Text3dAspect () const
 Returns the values of the current default attributes.
More...
 
Aspect_TypeOfUpdate UpdateMode () const
 
 Returns the screen update mode. <br>


TOU_ASAP as soon as possible
TOU_WAIT on demand (Update)

More...

 
virtual void ChangeDisplayPriority (const Handle< Graphic3d_Structure > &AStructure, const Standard_Integer OldPriority, const Standard_Integer NewPriority)=0
 Changes the display priority of the structure <AStructure>.
More...
 
virtual void ChangeZLayer (const Handle< Graphic3d_Structure > &theStructure, const Standard_Integer theLayerId)=0
 
 Change Z layer for structure. The z layer mechanism allows <br>

to display structures in higher layers in overlay of structures in
lower layers.
More...

 
virtual Standard_Integer GetZLayer (const Handle< Graphic3d_Structure > &theStructure) const =0
 
 Get Z layer ID assigned to structure. If the structure <br>

has no layer ID (deleted from graphic driver), the method returns -1.
More...

 
virtual void SetZLayerSettings (const Standard_Integer theLayerId, const Graphic3d_ZLayerSettings theSettings)=0
 Sets the settings for a single Z layer for all managed views.
More...
 
virtual Graphic3d_ZLayerSettings ZLayerSettings (const Standard_Integer theLayerId)=0
 Returns the settings of a single Z layer.
More...
 
virtual Standard_Boolean AddZLayer (Standard_Integer &theLayerId)=0
 
 Add a new top-level Z layer and get its ID as <br>

<theLayerId> value. The method returns Standard_False if the layer
can not be created. The z layer mechanism allows to display
structures in higher layers in overlay of structures in lower layers.
More...

 
virtual Standard_Boolean RemoveZLayer (const Standard_Integer theLayerId)=0
 
 Remove Z layer with ID <theLayerId>. Method returns <br>

Standard_False if the layer can not be removed or doesn't exists.
By default, there is always a default bottom-level layer that can't
be removed.
More...

 
virtual void GetAllZLayers (TColStd_SequenceOfInteger &theLayerSeq) const =0
 
 Return all Z layer ids in sequence ordered by level <br>

from lowest layer to highest. The first layer ID in sequence is
the default layer that can't be removed.
More...

 
virtual void ReCompute (const Handle< Graphic3d_Structure > &AStructure)=0
 Forces a new construction of the structure <AStructure>
if <AStructure> is displayed and TOS_COMPUTED.
More...
 
virtual void ReCompute (const Handle< Graphic3d_Structure > &AStructure, const Handle< Graphic3d_DataStructureManager > &AProjector)=0
 Forces a new construction of the structure <AStructure>
if <AStructure> is displayed in <AProjector> and TOS_COMPUTED.
More...
 
virtual void Clear (const Handle< Graphic3d_Structure > &AStructure, const Standard_Boolean WithDestruction)=0
 Clears the structure <AStructure>.
More...
 
virtual void Connect (const Handle< Graphic3d_Structure > &AMother, const Handle< Graphic3d_Structure > &ADaughter)=0
 Connects the structures <AMother> and <ADaughter>.
More...
 
virtual void Disconnect (const Handle< Graphic3d_Structure > &AMother, const Handle< Graphic3d_Structure > &ADaughter)=0
 Disconnects the structures <AMother> and <ADaughter>.
More...
 
virtual void Display (const Handle< Graphic3d_Structure > &AStructure)=0
 Display the structure <AStructure>.
More...
 
virtual void Erase (const Handle< Graphic3d_Structure > &AStructure)=0
 Erases the structure <AStructure>.
More...
 
virtual void Highlight (const Handle< Graphic3d_Structure > &AStructure, const Aspect_TypeOfHighlightMethod AMethod)=0
 Highlights the structure <AStructure>.
More...
 
virtual void SetTransform (const Handle< Graphic3d_Structure > &AStructure, const TColStd_Array2OfReal &ATrsf)=0
 Transforms the structure <AStructure>.
More...
 
const
Handle_Graphic3d_GraphicDriver & 
GraphicDriver () const
 Returns the graphic driver of <me>.
More...
 
virtual Standard_Integer Identification () const
 Returns the identification number of the manager.
More...
 
virtual Handle_Graphic3d_Structure Identification (const Standard_Integer AId) const
 Returns the structure with the identification number <AId>.
More...
 
virtual void UnHighlight ()=0
 Suppresses the highlighting on all the structures in <me>.
More...
 
virtual void UnHighlight (const Handle< Graphic3d_Structure > &AStructure)=0
 Suppress the highlighting on the structure <AStructure>.
More...
 
void RecomputeStructures ()
 
- 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 void ShallowDump (Standard_OStream &) const
 
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...
 

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...
 

Protected Member Functions

 Graphic3d_StructureManager (const Handle< Graphic3d_GraphicDriver > &theDriver)
 
Initialises the ViewManager. <br>

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

Standard_Integer MyId
 
Aspect_TypeOfUpdate MyUpdateMode
 
Handle_Graphic3d_AspectLine3d MyAspectLine3d
 
Handle_Graphic3d_AspectText3d MyAspectText3d
 
Handle_Graphic3d_AspectMarker3d MyAspectMarker3d
 
Handle_Graphic3d_AspectFillArea3d MyAspectFillArea3d
 
Graphic3d_MapOfStructure MyDisplayedStructure
 
Graphic3d_MapOfStructure MyHighlightedStructure
 
Graphic3d_MapOfStructure MyPickStructure
 
Aspect_GenId MyStructGenId
 
Handle_Graphic3d_GraphicDriver MyGraphicDriver
 

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, Detectable

Constructor & Destructor Documentation

Graphic3d_StructureManager::~Graphic3d_StructureManager ( )
inline
Graphic3d_StructureManager::Graphic3d_StructureManager ( const Handle< Graphic3d_GraphicDriver > &  theDriver)
protected

Initialises the ViewManager. <br>

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.

Member Function Documentation

virtual Standard_Boolean Graphic3d_StructureManager::AddZLayer ( Standard_Integer theLayerId)
pure virtual

 Add a new top-level Z layer and get its ID as <br>

<theLayerId> value. The method returns Standard_False if the layer
can not be created. The z layer mechanism allows to display
structures in higher layers in overlay of structures in lower layers.

Implemented in Visual3d_ViewManager.

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

Changes the display priority of the structure <AStructure>.

Implemented in Visual3d_ViewManager.

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

 Change Z layer for structure. The z layer mechanism allows <br>

to display structures in higher layers in overlay of structures in
lower layers.

Implemented in Visual3d_ViewManager.

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

Clears the structure <AStructure>.

Implemented in Visual3d_ViewManager.

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

Connects the structures <AMother> and <ADaughter>.

Implemented in Visual3d_ViewManager.

static Standard_Integer Graphic3d_StructureManager::CurrentId ( )
static

Returns a current identifier available.

virtual void Graphic3d_StructureManager::Destroy ( )
virtual

Deletes the manager <me>.

Reimplemented in Visual3d_ViewManager.

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

Disconnects the structures <AMother> and <ADaughter>.

Implemented in Visual3d_ViewManager.

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

Display the structure <AStructure>.

Implemented in Visual3d_ViewManager.

void Graphic3d_StructureManager::DisplayedStructures ( Graphic3d_MapOfStructure SG) const

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

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

Erases the structure <AStructure>.

Implemented in Visual3d_ViewManager.

Handle_Graphic3d_AspectFillArea3d Graphic3d_StructureManager::FillArea3dAspect ( ) const

Returns the values of the current default attributes.

virtual void Graphic3d_StructureManager::GetAllZLayers ( TColStd_SequenceOfInteger theLayerSeq) const
pure virtual

 Return all Z layer ids in sequence ordered by level <br>

from lowest layer to highest. The first layer ID in sequence is
the default layer that can't be removed.

Implemented in Visual3d_ViewManager.

virtual Standard_Integer Graphic3d_StructureManager::GetZLayer ( const Handle< Graphic3d_Structure > &  theStructure) const
pure virtual

 Get Z layer ID assigned to structure. If the structure <br>

has no layer ID (deleted from graphic driver), the method returns -1.

Implemented in Visual3d_ViewManager.

const Handle_Graphic3d_GraphicDriver& Graphic3d_StructureManager::GraphicDriver ( ) const

Returns the graphic driver of <me>.

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

Highlights the structure <AStructure>.

Implemented in Visual3d_ViewManager.

void Graphic3d_StructureManager::HighlightedStructures ( Graphic3d_MapOfStructure SG) const

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

virtual Standard_Integer Graphic3d_StructureManager::Identification ( ) const
virtual

Returns the identification number of the manager.

Reimplemented in Visual3d_ViewManager.

virtual Handle_Graphic3d_Structure Graphic3d_StructureManager::Identification ( const Standard_Integer  AId) const
virtual

Returns the structure with the identification number <AId>.

Reimplemented in Visual3d_ViewManager.

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.

void Graphic3d_StructureManager::MinMaxValues ( Standard_Real XMin,
Standard_Real YMin,
Standard_Real ZMin,
Standard_Real XMax,
Standard_Real YMax,
Standard_Real ZMax 
) const

Returns the coordinates of the boundary box of all
structures displayed in the manager <me>.

Standard_Integer Graphic3d_StructureManager::NumberOfDisplayedStructures ( ) const
protected

Returns the number of structures displayed in
visualiser <me>.
//! Returns the structure displayed in visualiser <me>.

void Graphic3d_StructureManager::PickStructures ( Graphic3d_MapOfStructure SG) const

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

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 > &  AStructure)
pure virtual

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

Implemented in Visual3d_ViewManager.

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

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

Implemented in Visual3d_ViewManager.

void Graphic3d_StructureManager::RecomputeStructures ( )
virtual Standard_Boolean Graphic3d_StructureManager::RemoveZLayer ( const Standard_Integer  theLayerId)
pure virtual

 Remove Z layer with ID <theLayerId>. Method returns <br>

Standard_False if the layer can not be removed or doesn't exists.
By default, there is always a default bottom-level layer that can't
be removed.

Implemented in Visual3d_ViewManager.

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 > &  AStructure,
const TColStd_Array2OfReal ATrsf 
)
pure virtual

Transforms the structure <AStructure>.

Implemented in Visual3d_ViewManager.

void Graphic3d_StructureManager::SetUpdateMode ( const Aspect_TypeOfUpdate  AType)

 Modifies the screen update mode. <br>


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:

virtual void Graphic3d_StructureManager::SetZLayerSettings ( const Standard_Integer  theLayerId,
const Graphic3d_ZLayerSettings  theSettings 
)
pure virtual

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

Implemented in Visual3d_ViewManager.

Handle_Graphic3d_AspectText3d Graphic3d_StructureManager::Text3dAspect ( ) const

Returns the values of the current default attributes.

virtual void Graphic3d_StructureManager::UnHighlight ( )
pure virtual

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

Implemented in Visual3d_ViewManager.

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

Suppress the highlighting on the structure <AStructure>.

Implemented in Visual3d_ViewManager.

virtual void Graphic3d_StructureManager::Update ( ) const
pure virtual

 Updates screen in function of modifications of <br>
   the structures. <br>

Warning: Not necessary if the update mode is TOU_ASAP.

Implemented in Visual3d_ViewManager.

Aspect_TypeOfUpdate Graphic3d_StructureManager::UpdateMode ( ) const

 Returns the screen update mode. <br>


TOU_ASAP as soon as possible
TOU_WAIT on demand (Update)

virtual Graphic3d_ZLayerSettings Graphic3d_StructureManager::ZLayerSettings ( const Standard_Integer  theLayerId)
pure virtual

Returns the settings of a single Z layer.

Implemented in Visual3d_ViewManager.

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_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_MapOfStructure Graphic3d_StructureManager::MyPickStructure
protected
Aspect_GenId Graphic3d_StructureManager::MyStructGenId
protected
Aspect_TypeOfUpdate Graphic3d_StructureManager::MyUpdateMode
protected

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