Open CASCADE Technology 6.6.0
|
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>
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. Category: Methods to modify the class definition | |
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. | |
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. | |
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. | |
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_GenId & | getZLayerGenId () |
Returns global instance of z layer ids generator. |
Visual3d_ViewManager::Visual3d_ViewManager | ( | const Handle< Graphic3d_GraphicDriver > & | theDriver | ) |
Visual3d_ViewManager::~Visual3d_ViewManager | ( | ) | [inline] |
void Visual3d_ViewManager::Activate | ( | ) |
Handle_Visual3d_HSetOfView Visual3d_ViewManager::ActivatedView | ( | ) | const |
Standard_Boolean Visual3d_ViewManager::AddZLayer | ( | Standard_Integer & | theLayerId | ) | [virtual] |
Implements Graphic3d_StructureManager.
void Visual3d_ViewManager::ChangeDisplayPriority | ( | const Handle< Graphic3d_Structure > & | AStructure, |
const Standard_Integer | OldPriority, | ||
const Standard_Integer | NewPriority | ||
) | [virtual] |
Implements Graphic3d_StructureManager.
void Visual3d_ViewManager::ChangeZLayer | ( | const Handle< Graphic3d_Structure > & | theStructure, |
const Standard_Integer | theLayerId | ||
) | [virtual] |
Implements Graphic3d_StructureManager.
void Visual3d_ViewManager::Clear | ( | const Handle< Graphic3d_Structure > & | AStructure, |
const Standard_Boolean | WithDestruction | ||
) | [virtual] |
Implements Graphic3d_StructureManager.
void Visual3d_ViewManager::Connect | ( | const Handle< Graphic3d_Structure > & | AMother, |
const Handle< Graphic3d_Structure > & | ADaughter | ||
) | [virtual] |
Implements Graphic3d_StructureManager.
void Visual3d_ViewManager::ConvertCoord | ( | const Handle< Aspect_Window > & | AWindow, |
const Graphic3d_Vertex & | AVertex, | ||
Standard_Integer & | AU, | ||
Standard_Integer & | AV | ||
) | const |
-- Bad Window, Numeric error...
Graphic3d_Vertex Visual3d_ViewManager::ConvertCoord | ( | const Handle< Aspect_Window > & | AWindow, |
const Standard_Integer | AU, | ||
const Standard_Integer | AV | ||
) | const |
-- Bad Window, Numeric error...
void Visual3d_ViewManager::ConvertCoordWithProj | ( | const Handle< Aspect_Window > & | AWindow, |
const Standard_Integer | AU, | ||
const Standard_Integer | AV, | ||
Graphic3d_Vertex & | Point, | ||
Graphic3d_Vector & | Proj | ||
) | const |
-- Bad Window, Numeric error...
void Visual3d_ViewManager::Deactivate | ( | ) |
Handle_Visual3d_HSetOfView Visual3d_ViewManager::DefinedView | ( | ) | const |
virtual void Visual3d_ViewManager::Destroy | ( | ) | [virtual] |
Reimplemented from Graphic3d_StructureManager.
void Visual3d_ViewManager::Disconnect | ( | const Handle< Graphic3d_Structure > & | AMother, |
const Handle< Graphic3d_Structure > & | ADaughter | ||
) | [virtual] |
Implements Graphic3d_StructureManager.
void Visual3d_ViewManager::Display | ( | const Handle< Graphic3d_Structure > & | AStructure | ) | [virtual] |
Implements Graphic3d_StructureManager.
void Visual3d_ViewManager::Erase | ( | ) |
void Visual3d_ViewManager::Erase | ( | const Handle< Graphic3d_Structure > & | AStructure | ) | [virtual] |
Implements Graphic3d_StructureManager.
void Visual3d_ViewManager::GetAllZLayers | ( | TColStd_SequenceOfInteger & | theLayerSeq | ) | const [virtual] |
Implements Graphic3d_StructureManager.
Standard_Integer Visual3d_ViewManager::GetZLayer | ( | const Handle< Graphic3d_Structure > & | theStructure | ) | const [virtual] |
Implements Graphic3d_StructureManager.
static Aspect_GenId& Visual3d_ViewManager::getZLayerGenId | ( | ) | [static, protected] |
void Visual3d_ViewManager::Highlight | ( | const Handle< Graphic3d_Structure > & | AStructure, |
const Aspect_TypeOfHighlightMethod | AMethod | ||
) | [virtual] |
Implements Graphic3d_StructureManager.
Handle_Graphic3d_Structure Visual3d_ViewManager::Identification | ( | const Standard_Integer | AId | ) | const [virtual] |
Reimplemented from Graphic3d_StructureManager.
Standard_Integer Visual3d_ViewManager::Identification | ( | ) | const [virtual] |
Reimplemented from Graphic3d_StructureManager.
Standard_Integer Visual3d_ViewManager::Identification | ( | const Handle< Visual3d_View > & | AView | ) |
Standard_Integer Visual3d_ViewManager::MaxNumOfViews | ( | ) | const |
const Handle_Visual3d_Layer& Visual3d_ViewManager::OverLayer | ( | ) | const |
void Visual3d_ViewManager::ReCompute | ( | const Handle< Graphic3d_Structure > & | AStructure | ) | [virtual] |
Implements Graphic3d_StructureManager.
void Visual3d_ViewManager::ReCompute | ( | const Handle< Graphic3d_Structure > & | AStructure, |
const Handle< Graphic3d_DataStructureManager > & | AProjector | ||
) | [virtual] |
Implements Graphic3d_StructureManager.
void Visual3d_ViewManager::Redraw | ( | ) | const |
void Visual3d_ViewManager::Remove | ( | ) |
Standard_Boolean Visual3d_ViewManager::RemoveZLayer | ( | const Standard_Integer | theLayerId | ) | [virtual] |
Implements Graphic3d_StructureManager.
void Visual3d_ViewManager::SetTransform | ( | const Handle< Graphic3d_Structure > & | AStructure, |
const TColStd_Array2OfReal & | ATrsf | ||
) | [virtual] |
Implements Graphic3d_StructureManager.
void Visual3d_ViewManager::SetTransparency | ( | const Standard_Boolean | AFlag | ) |
void Visual3d_ViewManager::SetZBufferAuto | ( | const Standard_Boolean | AFlag | ) |
Standard_Boolean Visual3d_ViewManager::Transparency | ( | ) | const |
const Handle_Visual3d_Layer& Visual3d_ViewManager::UnderLayer | ( | ) | const |
void Visual3d_ViewManager::UnHighlight | ( | ) | [virtual] |
Implements Graphic3d_StructureManager.
void Visual3d_ViewManager::UnHighlight | ( | const Handle< Graphic3d_Structure > & | AStructure | ) | [virtual] |
Implements Graphic3d_StructureManager.
void Visual3d_ViewManager::UnIdentification | ( | const Standard_Integer | aViewId | ) |
void Visual3d_ViewManager::Update | ( | ) | const [virtual] |
Implements Graphic3d_StructureManager.
Standard_Boolean Visual3d_ViewManager::ViewExists | ( | const Handle< Aspect_Window > & | AWindow, |
Graphic3d_CView & | TheCView | ||
) | const |
Standard_Boolean Visual3d_ViewManager::ZBufferAuto | ( | ) | const |