This class is introduced just for compatibility with old code. More...
#include <SVTK_View.h>
Public Member Functions | |
SVTK_View (SVTK_ViewWindow *theMainWindow) | |
virtual | ~SVTK_View () |
void | highlight (const Handle(SALOME_InteractiveObject)&IObject, bool highlight, bool immediatly=true) |
To highlight a VTK presentation with the same SALOME_InteractiveObject. More... | |
void | unHighlightAll () |
To unhighlight all VTK presentations. More... | |
Handle (SALOME_InteractiveObject) FindIObject(const char *Entry) | |
Try to find a SALOME_InteractiveObject in the view that corresponds to the entry. More... | |
bool | isInViewer (const Handle(SALOME_InteractiveObject)&IObject) |
Check, if the viewer contains a presentatin with defined SALOME_InteractiveObject. More... | |
bool | isVisible (const Handle(SALOME_InteractiveObject)&IObject) |
Check, if a presentatin with defined SALOME_InteractiveObject is visible. More... | |
void | rename (const Handle(SALOME_InteractiveObject)&IObject, const QString &newName) |
int | GetDisplayMode () |
Get current display mode (obsolete) More... | |
void | SetDisplayMode (int) |
Set current display mode. More... | |
void | SetDisplayMode (const Handle(SALOME_InteractiveObject)&IObject, int theMode) |
Switch representation wireframe/shading. More... | |
void | ChangeRepresentationToWireframe () |
Change all actors to wireframe. More... | |
void | ChangeRepresentationToSurface () |
Change all actors to surface. More... | |
void | ChangeRepresentationToSurfaceWithEdges () |
Change all actors to surface with edges. More... | |
void | ChangeRepresentationToWireframe (vtkActorCollection *theListofActors) |
Change to wireframe a list of vtkactor. More... | |
void | ChangeRepresentationToSurface (vtkActorCollection *theListofActors) |
Change to surface a list of vtkactor. More... | |
void | ChangeRepresentationToSurfaceWithEdges (vtkActorCollection *theListofActors) |
Change to surface with edges a list of vtkactor. More... | |
void | SetTransparency (const Handle(SALOME_InteractiveObject)&theIObject, float trans) |
Change transparency. More... | |
float | GetTransparency (const Handle(SALOME_InteractiveObject)&theIObject) |
Get current transparency. More... | |
void | SetColor (const Handle(SALOME_InteractiveObject)&theIObject, const QColor &theColor) |
Change color. More... | |
QColor | GetColor (const Handle(SALOME_InteractiveObject)&theIObject) |
Get current color. More... | |
void | SetMaterial (const Handle(SALOME_InteractiveObject)&theIObject, vtkProperty *thePropF, vtkProperty *thePropB) |
Change material. More... | |
vtkProperty * | GetFrontMaterial (const Handle(SALOME_InteractiveObject)&theIObject) |
Get current front material. More... | |
vtkProperty * | GetBackMaterial (const Handle(SALOME_InteractiveObject)&theIObject) |
Get current back material. More... | |
void | EraseAll () |
To erase all existing VTK presentations. More... | |
void | DisplayAll () |
To display all existing VTK presentations. More... | |
void | RemoveAll (const bool immediatly) |
To remove from the view all existing VTK presentations. More... | |
void | Erase (const Handle(SALOME_InteractiveObject)&IObject, bool immediatly=true) |
To erase VTK presentation with defined SALOME_InteractiveObject. More... | |
void | Remove (const Handle(SALOME_InteractiveObject)&IObject, bool immediatly=true) |
void | Display (const Handle(SALOME_InteractiveObject)&IObject, bool immediatly=true) |
To display VTK presentation with defined SALOME_InteractiveObject. More... | |
void | DisplayOnly (const Handle(SALOME_InteractiveObject)&IObject) |
To display VTK presentation with defined SALOME_InteractiveObject and erase all anothers. More... | |
void | Display (SALOME_Actor *SActor, bool immediatly=true) |
To display the VTK presentation. More... | |
void | Erase (SALOME_Actor *SActor, bool immediatly=true) |
To erase the VTK presentation. More... | |
void | Remove (SALOME_Actor *SActor, bool updateViewer=true) |
To remove the VTK presentation. More... | |
void | GetVisible (SALOME_ListIO &theList) |
Collect objects visible in viewer. More... | |
void | SetSelectionProp (const double &theRed=1, const double &theGreen=1, const double &theBlue=0, const int &theWidth=5) |
Redirect the request to SVTK_Renderer::SetPreselectionProp. More... | |
void | SetPreselectionProp (const double &theRed=0, const double &theGreen=1, const double &theBlue=1, const int &theWidth=5) |
Redirect the request to SVTK_Renderer::SetPreselectionProp. More... | |
void | SetSelectionTolerance (const double &theTolNodes=0.025, const double &theTolCell=0.001, const double &theTolObjects=0.025) |
Redirect the request to SVTK_Renderer::SetPreselectionProp. More... | |
Public Member Functions inherited from SVTK_SignalHandler | |
SVTK_SignalHandler (SVTK_ViewWindow *theMainWindow) | |
virtual | ~SVTK_SignalHandler () |
SVTK_ViewWindow * | GetMainWindow () |
Get reference to its SVTK_ViewWindow. More... | |
void | Repaint (bool theUpdateTrihedron=true) |
Redirect the request to SVTK_ViewWindow::Repaint (just for flexibility) More... | |
SVTK_Renderer * | GetRenderer () |
Redirect the request to SVTK_ViewWindow::GetRenderer (just for flexibility) More... | |
vtkRenderer * | getRenderer () |
Redirect the request to SVTK_ViewWindow::getRenderer (just for flexibility) More... | |
Protected Attributes | |
int | myDisplayMode |
Protected Attributes inherited from SVTK_SignalHandler | |
SVTK_ViewWindow * | myMainWindow |
Additional Inherited Members | |
Public Slots inherited from SVTK_SignalHandler | |
void | onSelectionChanged () |
Signals inherited from SVTK_SignalHandler | |
void | MouseMove (QMouseEvent *) |
void | MouseButtonPressed (QMouseEvent *) |
void | MouseButtonReleased (QMouseEvent *) |
void | MouseDoubleClicked (QMouseEvent *) |
void | ButtonPressed (const QMouseEvent *event) |
void | ButtonReleased (const QMouseEvent *event) |
void | WheelMoved (QWheelEvent *) |
void | KeyPressed (QKeyEvent *) |
void | KeyReleased (QKeyEvent *) |
void | contextMenuRequested (QContextMenuEvent *e) |
void | selectionChanged () |
This class is introduced just for compatibility with old code.
This class contains frequantly used functionality in old code. Now, you are supposed to extend existing functionality through writing corresponding functors (see SVTK_Functor.h for example).
SVTK_View::SVTK_View | ( | SVTK_ViewWindow * | theMainWindow | ) |
Constructor
|
virtual |
Destructor
void SVTK_View::ChangeRepresentationToSurface | ( | ) |
Change all actors to surface.
Change all actors to shading
References VTK::ActorCollectionCopy::GetActors(), and SVTK_SignalHandler::getRenderer().
void SVTK_View::ChangeRepresentationToSurface | ( | vtkActorCollection * | theCollection | ) |
Change to surface a list of vtkactor.
Change to shading a list of vtkactor theCollection - list of vtkactor
References SVTK_SignalHandler::Repaint(), and VTKViewer_Actor::setDisplayMode().
void SVTK_View::ChangeRepresentationToSurfaceWithEdges | ( | ) |
Change all actors to surface with edges.
Change all actors to shading with edges
References VTK::ActorCollectionCopy::GetActors(), and SVTK_SignalHandler::getRenderer().
void SVTK_View::ChangeRepresentationToSurfaceWithEdges | ( | vtkActorCollection * | theCollection | ) |
Change to surface with edges a list of vtkactor.
Change to shading with edges a list of vtkactor theCollection - list of vtkactor
References SVTK_SignalHandler::Repaint(), and VTKViewer_Actor::setDisplayMode().
void SVTK_View::ChangeRepresentationToWireframe | ( | ) |
Change all actors to wireframe.
Change all actors to wireframe
References VTK::ActorCollectionCopy::GetActors(), and SVTK_SignalHandler::getRenderer().
void SVTK_View::ChangeRepresentationToWireframe | ( | vtkActorCollection * | theCollection | ) |
Change to wireframe a list of vtkactor.
Change to wireframe a list of vtkactor theCollection - list of vtkactor
References SVTK_SignalHandler::Repaint(), and VTKViewer_Actor::setDisplayMode().
void SVTK_View::Display | ( | const Handle(SALOME_InteractiveObject)& | theIObject, |
bool | theIsUpdate = true |
||
) |
To display VTK presentation with defined SALOME_InteractiveObject.
To display the VTK presentation
References VTK::ActorCollectionCopy::GetActors(), SVTK_SignalHandler::getRenderer(), and SVTK_SignalHandler::Repaint().
void SVTK_View::Display | ( | SALOME_Actor * | theActor, |
bool | theIsUpdate = true |
||
) |
To display the VTK presentation.
To display the VTK presentation
References SVTK_Renderer::AddActor(), SVTK_SignalHandler::GetRenderer(), SVTK_SignalHandler::Repaint(), and SALOME_Actor::SetVisibility().
void SVTK_View::DisplayAll | ( | ) |
To display all existing VTK presentations.
To display all existing VTK presentations
References VTK::ActorCollectionCopy::GetActors(), SVTK_SignalHandler::getRenderer(), and SVTK_SignalHandler::Repaint().
void SVTK_View::DisplayOnly | ( | const Handle(SALOME_InteractiveObject)& | theIObject | ) |
To display VTK presentation with defined SALOME_InteractiveObject and erase all anothers.
To display VTK presentation with defined SALOME_InteractiveObject and erase all others
References Display(), and EraseAll().
void SVTK_View::Erase | ( | const Handle(SALOME_InteractiveObject)& | theIObject, |
bool | theIsUpdate = true |
||
) |
To erase VTK presentation with defined SALOME_InteractiveObject.
To erase VTK presentation
theIObject | - object |
theIsUpdate | - updates current viewer |
References VTK::ActorCollectionCopy::GetActors(), SVTK_SignalHandler::getRenderer(), and SVTK_SignalHandler::Repaint().
void SVTK_View::Erase | ( | SALOME_Actor * | theActor, |
bool | theIsUpdate = true |
||
) |
To erase the VTK presentation.
To erase VTK presentation
theActor | - actor |
theIsUpdate | - updates current viewer |
References SVTK_SignalHandler::Repaint().
void SVTK_View::EraseAll | ( | ) |
To erase all existing VTK presentations.
To erase all existing VTK presentations
References VTK::ActorCollectionCopy::GetActors(), SVTK_SignalHandler::getRenderer(), and SVTK_SignalHandler::Repaint().
vtkProperty * SVTK_View::GetBackMaterial | ( | const Handle(SALOME_InteractiveObject)& | theIObject | ) |
Get current back material.
Get current back material
theIObject | - object |
References VTK::ActorCollectionCopy::GetActors(), VTKViewer_Actor::GetBackMaterial(), and SVTK_SignalHandler::getRenderer().
QColor SVTK_View::GetColor | ( | const Handle(SALOME_InteractiveObject)& | theIObject | ) |
Get current color.
theIObject | - object |
References VTK::ActorCollectionCopy::GetActors(), VTKViewer_Actor::GetColor(), and SVTK_SignalHandler::getRenderer().
int SVTK_View::GetDisplayMode | ( | ) |
Get current display mode (obsolete)
References myDisplayMode.
vtkProperty * SVTK_View::GetFrontMaterial | ( | const Handle(SALOME_InteractiveObject)& | theIObject | ) |
Get current front material.
Get current front material
theIObject | - object |
References VTK::ActorCollectionCopy::GetActors(), VTKViewer_Actor::GetFrontMaterial(), and SVTK_SignalHandler::getRenderer().
float SVTK_View::GetTransparency | ( | const Handle(SALOME_InteractiveObject)& | theIObject | ) |
Get current transparency.
theIObject | - object |
References VTK::ActorCollectionCopy::GetActors(), VTKViewer_Actor::GetOpacity(), and SVTK_SignalHandler::getRenderer().
void SVTK_View::GetVisible | ( | SALOME_ListIO & | theList | ) |
Collect objects visible in viewer.
\Collect objects visible in viewer
theList | - visible objects collection |
References VTK::ActorCollectionCopy::GetActors(), and SVTK_SignalHandler::getRenderer().
SVTK_View::Handle | ( | SALOME_InteractiveObject | ) | const |
Try to find a SALOME_InteractiveObject in the view that corresponds to the entry.
void SVTK_View::highlight | ( | const Handle(SALOME_InteractiveObject)& | theIO, |
bool | theIsHighlight, | ||
bool | immediatly = true |
||
) |
To highlight a VTK presentation with the same SALOME_InteractiveObject.
Hilights/unhilights object in viewer
theIO | - object to be updated |
theIsHighlight | - if it is true, object will be hilighted, otherwise it will be unhilighted |
theIsUpdate | - update current viewer |
References VTK::ActorCollectionCopy::GetActors().
bool SVTK_View::isInViewer | ( | const Handle(SALOME_InteractiveObject)& | theIObject | ) |
Check, if the viewer contains a presentatin with defined SALOME_InteractiveObject.
theIO | - object to be checked |
References VTK::ActorCollectionCopy::GetActors(), and SVTK_SignalHandler::getRenderer().
bool SVTK_View::isVisible | ( | const Handle(SALOME_InteractiveObject)& | theIObject | ) |
Check, if a presentatin with defined SALOME_InteractiveObject is visible.
theIO | - object to be checked |
References VTK::ActorCollectionCopy::GetActors(), and SVTK_SignalHandler::getRenderer().
void SVTK_View::Remove | ( | const Handle(SALOME_InteractiveObject)& | theIObject, |
bool | theIsUpdate = true |
||
) |
To remove the VTK presentation
References VTK::ActorCollectionCopy::GetActors(), SVTK_SignalHandler::GetRenderer(), SVTK_SignalHandler::getRenderer(), and SVTK_SignalHandler::Repaint().
void SVTK_View::Remove | ( | SALOME_Actor * | theActor, |
bool | theIsUpdate = true |
||
) |
To remove the VTK presentation.
To remove the VTK presentation
References SVTK_SignalHandler::GetRenderer(), SVTK_Renderer::RemoveActor(), and SVTK_SignalHandler::Repaint().
void SVTK_View::RemoveAll | ( | const bool | immediatly | ) |
To remove from the view all existing VTK presentations.
To remove all VTK presentations
References VTK::ActorCollectionCopy::GetActors(), SVTK_SignalHandler::getRenderer(), and SVTK_SignalHandler::Repaint().
void SVTK_View::rename | ( | const Handle(SALOME_InteractiveObject)& | theIObject, |
const QString & | theName | ||
) |
Changes name of object
theIObject | - object to be renamed |
theName | - new name |
References VTK::ActorCollectionCopy::GetActors(), SVTK_SignalHandler::getRenderer(), and SALOME_Actor::setName().
void SVTK_View::SetColor | ( | const Handle(SALOME_InteractiveObject)& | theIObject, |
const QColor & | theColor | ||
) |
Change color.
Change color
theIObject | - object |
theColor | - new color |
References VTK::ActorCollectionCopy::GetActors(), SVTK_SignalHandler::getRenderer(), and VTKViewer_Actor::SetColor().
void SVTK_View::SetDisplayMode | ( | const Handle(SALOME_InteractiveObject)& | theIObject, |
int | theMode | ||
) |
Switch representation wireframe/shading.
Set current display mode
theIObject | - object |
theMode | - new display mode |
References VTK::ActorCollectionCopy::GetActors(), SVTK_SignalHandler::getRenderer(), and VTKViewer_Actor::setDisplayMode().
void SVTK_View::SetDisplayMode | ( | int | theMode | ) |
Set current display mode.
Set current display mode
theMode | - new display mode |
References ChangeRepresentationToSurface(), ChangeRepresentationToSurfaceWithEdges(), ChangeRepresentationToWireframe(), and myDisplayMode.
void SVTK_View::SetMaterial | ( | const Handle(SALOME_InteractiveObject)& | theIObject, |
vtkProperty * | thePropF, | ||
vtkProperty * | thePropB | ||
) |
Change material.
Change material
theIObject | - object |
thePropF | - property contained new properties of front material |
thePropB | - property contained new properties of back material |
References VTK::ActorCollectionCopy::GetActors(), SVTK_SignalHandler::getRenderer(), and VTKViewer_Actor::SetMaterial().
void SVTK_View::SetPreselectionProp | ( | const double & | theRed = 0 , |
const double & | theGreen = 1 , |
||
const double & | theBlue = 1 , |
||
const int & | theWidth = 5 |
||
) |
Redirect the request to SVTK_Renderer::SetPreselectionProp.
Redirect the request to SVTK_Renderer::SetPreselectionProp
References SVTK_SignalHandler::GetRenderer(), and SVTK_Renderer::SetPreselectionProp().
void SVTK_View::SetSelectionProp | ( | const double & | theRed = 1 , |
const double & | theGreen = 1 , |
||
const double & | theBlue = 0 , |
||
const int & | theWidth = 5 |
||
) |
Redirect the request to SVTK_Renderer::SetPreselectionProp.
Redirect the request to SVTK_Renderer::SetPreselectionProp
References SVTK_SignalHandler::GetRenderer(), and SVTK_Renderer::SetSelectionProp().
void SVTK_View::SetSelectionTolerance | ( | const double & | theTolNodes = 0.025 , |
const double & | theTolCell = 0.001 , |
||
const double & | theTolObjects = 0.025 |
||
) |
Redirect the request to SVTK_Renderer::SetPreselectionProp.
Redirect the request to SVTK_Renderer::SetPreselectionProp
References SVTK_SignalHandler::GetRenderer(), and SVTK_Renderer::SetSelectionTolerance().
void SVTK_View::SetTransparency | ( | const Handle(SALOME_InteractiveObject)& | theIObject, |
float | theTrans | ||
) |
Change transparency.
Sets current transparency
theIObject | - object |
theTrans | - new transparency |
References VTK::ActorCollectionCopy::GetActors(), SVTK_SignalHandler::getRenderer(), and VTKViewer_Actor::SetOpacity().
void SVTK_View::unHighlightAll | ( | ) |
To unhighlight all VTK presentations.
Unhilights all objects in viewer
References VTK::ActorCollectionCopy::GetActors().
|
protected |