Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Protected 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.
It activates the pick.

#include <Visual3d_ViewManager.hxx>

Inheritance diagram for Visual3d_ViewManager:
Inheritance graph
[legend]

Public Member Functions

 Visual3d_ViewManager (const Handle< Aspect_GraphicDevice > &aDevice)
 Creates a 3D visualizer.

void Activate ()
 Activates all the views of the manager <me>.

void Deactivate ()
 Deactivates all the views of the manager <me>.

virtual void Destroy ()
 Deletes and erases the 3D visualiser <me>.

 ~Visual3d_ViewManager ()
void Erase ()
 Erases all of the structures displayed in the
visualiser <me>.

void Redraw () const
 Redraws all the displayed structures.

void Remove ()
 Deletes and erases the 3D visualiser <me>.

void Update () const
 Updates screen in function of modifications of
the structures.
Category: Methods to modify the class definition
Warning: Not necessary if the update mode is TOU_ASAP.

Handle_Visual3d_HSetOfView ActivatedView () const
 Returns the group of views activated in the visualiser <me>.

void ConvertCoord (const Handle< Aspect_Window > &AWindow, const Graphic3d_Vertex &AVertex, Standard_Integer &AU, Standard_Integer &AV) const
 Applies the view orientation transformation, the
view mapping transformation and view clip, the
display transformation to the vertex <AVertex>.
Returns the pixel coordinates <AU>, <AV>.
Warning: Returns <AU> = <AV> = IntegerLast () if the
evaluation is impossible.
-- Bad Window, Numeric error...

Graphic3d_Vertex ConvertCoord (const Handle< Aspect_Window > &AWindow, const Standard_Integer AU, const Standard_Integer AV) const
 Applies the inverse of the display transformation, the
inverse of the view mapping transformation and view clip,
the inverse of the view orientation transformation to
the pixel coordinates <AU>, <AV>.
Returns the world coordinates <AVertex>.
Warning: Returns AVertex (X, Y, Z) with X = Y = Z = RealLast ()
if the evaluation is impossible.
-- Bad Window, Numeric error...

void ConvertCoordWithProj (const Handle< Aspect_Window > &AWindow, const Standard_Integer AU, const Standard_Integer AV, Graphic3d_Vertex &Point, Graphic3d_Vector &Proj) const
 Applies the inverse of the display transformation, the
inverse of the view mapping transformation and view clip,
the inverse of the view orientation transformation to
the pixel coordinates <AU>, <AV>.
Returns the world coordinates <AVertex> and projection ray <AVector>.
Warning: Returns AVertex (X, Y, Z) with X = Y = Z = RealLast () and
AVector (VX, VY, VZ) with VX = VY = VZ = 0.
if the evaluation is impossible.
-- Bad Window, Numeric error...

Handle_Visual3d_HSetOfView DefinedView () const
 Returns the group of views defined in the visualiser <me>.

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.

Standard_Integer Identification (const Handle< Visual3d_View > &AView)
 Returns :
a new identification number for a new view
in the visualiser.

void UnIdentification (const Standard_Integer aViewId)
 Release a unique ID of the view reserved for the view on its creation.

Handle_Graphic3d_Structure Identification (const Standard_Integer AId) const
 Returns the structure with the identification number <AId>.

Standard_Integer Identification () const
 Returns the identification number of the visualiser.

void ChangeDisplayPriority (const Handle< Graphic3d_Structure > &AStructure, const Standard_Integer OldPriority, const Standard_Integer NewPriority)
 Changes the display priority of the structure <AStructure>.

void ChangeZLayer (const Handle< Graphic3d_Structure > &theStructure, const Standard_Integer theLayerId)
 Change Z layer for structure. The layer mechanism allows
to display structures in higher layers in overlay of structures in
lower layers.

Standard_Integer GetZLayer (const Handle< Graphic3d_Structure > &theStructure) const
 Get Z layer ID assigned for the structure.

Standard_Boolean AddZLayer (Standard_Integer &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.

Standard_Boolean RemoveZLayer (const Standard_Integer 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.

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.

void Clear (const Handle< Graphic3d_Structure > &AStructure, const Standard_Boolean WithDestruction)
 Clears the structure <AStructure>.

void Connect (const Handle< Graphic3d_Structure > &AMother, const Handle< Graphic3d_Structure > &ADaughter)
 Connects the structures <AMother> and <ADaughter>.

void Disconnect (const Handle< Graphic3d_Structure > &AMother, const Handle< Graphic3d_Structure > &ADaughter)
 Disconnects the structures <AMother> and <ADaughter>.

void Display (const Handle< Graphic3d_Structure > &AStructure)
 Display of the structure <AStructure>.

void Erase (const Handle< Graphic3d_Structure > &AStructure)
 Erases the structure <AStructure>.

void Highlight (const Handle< Graphic3d_Structure > &AStructure, const Aspect_TypeOfHighlightMethod AMethod)
 Highlights the structure <AStructure>.

void SetTransform (const Handle< Graphic3d_Structure > &AStructure, const TColStd_Array2OfReal &ATrsf)
 Transforms the structure <AStructure>.

void UnHighlight ()
 Suppress the highlighting on all the structures.

void UnHighlight (const Handle< Graphic3d_Structure > &AStructure)
 Suppress the highlighting on the structure <AStructure>.

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.

const Handle_Visual3d_Layer & UnderLayer () const
 Returns the underlay of the viewer <me>.

const Handle_Visual3d_Layer & OverLayer () const
 Returns the underlay of the viewer <me>.

void ReCompute (const Handle< Graphic3d_Structure > &AStructure)
 Forces a new construction of the structure <AStructure>
if <AStructure> is displayed and TOS_COMPUTED.

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.

Standard_Boolean Transparency () const
 Returns Standard_True if the transparency
is activated in all activated views.
Default Standard_False

void SetTransparency (const Standard_Boolean AFlag)
 if <AFlag> is Standard_True then the transparency
is managed.
Default Standard_False

Standard_Boolean ZBufferAuto () const
 Returns Standard_True if the zbuffer activity
is managed automatically.
Default Standard_False

void SetZBufferAuto (const Standard_Boolean AFlag)
 if <AFlag> is Standard_True then the zbuffer activity
is managed automatically.
Default Standard_False

Static Protected Member Functions

static Aspect_GenIdgetZLayerGenId ()
 Returns global instance of z layer ids generator.


Constructor & Destructor Documentation


Member Function Documentation

Handle_Visual3d_HSetOfView Visual3d_ViewManager::ActivatedView ( ) const
void Visual3d_ViewManager::Clear ( const Handle< Graphic3d_Structure > &  AStructure,
const Standard_Boolean  WithDestruction 
) [virtual]
Handle_Visual3d_HSetOfView Visual3d_ViewManager::DefinedView ( ) const
virtual void Visual3d_ViewManager::Destroy ( ) [virtual]

Reimplemented from Graphic3d_StructureManager.

static Aspect_GenId& Visual3d_ViewManager::getZLayerGenId ( ) [static, protected]
Handle_Graphic3d_Structure Visual3d_ViewManager::Identification ( const Standard_Integer  AId) const [virtual]

Reimplemented from Graphic3d_StructureManager.

Reimplemented from Graphic3d_StructureManager.

const Handle_Visual3d_Layer& Visual3d_ViewManager::OverLayer ( ) const
const Handle_Visual3d_Layer& Visual3d_ViewManager::UnderLayer ( ) const
void Visual3d_ViewManager::Update ( ) const [virtual]

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