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 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 shading
References VTK::ActorCollectionCopy::GetActors().
void SVTK_View::ChangeRepresentationToSurface | ( | vtkActorCollection * | theCollection | ) |
Change to shading a list of vtkactor theCollection - list of vtkactor
References VTKViewer_Actor::setDisplayMode().
void SVTK_View::ChangeRepresentationToSurfaceWithEdges | ( | ) |
Change all actors to shading with edges
References VTK::ActorCollectionCopy::GetActors().
void SVTK_View::ChangeRepresentationToSurfaceWithEdges | ( | vtkActorCollection * | theCollection | ) |
Change to shading with edges a list of vtkactor theCollection - list of vtkactor
References VTKViewer_Actor::setDisplayMode().
void SVTK_View::ChangeRepresentationToWireframe | ( | ) |
Change all actors to wireframe
References VTK::ActorCollectionCopy::GetActors().
void SVTK_View::ChangeRepresentationToWireframe | ( | vtkActorCollection * | theCollection | ) |
Change to wireframe a list of vtkactor theCollection - list of vtkactor
References VTKViewer_Actor::setDisplayMode().
void SVTK_View::Display | ( | const Handle(SALOME_InteractiveObject)& | theIObject, |
bool | theIsUpdate = true |
||
) |
To display the VTK presentation
References VTK::ActorCollectionCopy::GetActors().
void SVTK_View::Display | ( | SALOME_Actor * | theActor, |
bool | theIsUpdate = true |
||
) |
To display the VTK presentation
References SALOME_Actor::SetVisibility().
void SVTK_View::DisplayAll | ( | ) |
To display all existing VTK presentations
References VTK::ActorCollectionCopy::GetActors().
void SVTK_View::DisplayOnly | ( | const Handle(SALOME_InteractiveObject)& | theIObject | ) |
To display VTK presentation with defined SALOME_InteractiveObject and erase all others
void SVTK_View::Erase | ( | const Handle(SALOME_InteractiveObject)& | theIObject, |
bool | theIsUpdate = true |
||
) |
To erase VTK presentation
theIObject | - object |
theIsUpdate | - updates current viewer |
References VTK::ActorCollectionCopy::GetActors().
void SVTK_View::Erase | ( | SALOME_Actor * | theActor, |
bool | theIsUpdate = true |
||
) |
To erase VTK presentation
theActor | - actor |
theIsUpdate | - updates current viewer |
void SVTK_View::EraseAll | ( | ) |
To erase all existing VTK presentations
References VTK::ActorCollectionCopy::GetActors().
vtkProperty * SVTK_View::GetBackMaterial | ( | const Handle(SALOME_InteractiveObject)& | theIObject | ) |
Get current back material
theIObject | - object |
References VTK::ActorCollectionCopy::GetActors().
QColor SVTK_View::GetColor | ( | const Handle(SALOME_InteractiveObject)& | theIObject | ) |
int SVTK_View::GetDisplayMode | ( | ) |
vtkProperty * SVTK_View::GetFrontMaterial | ( | const Handle(SALOME_InteractiveObject)& | theIObject | ) |
Get current front material
theIObject | - object |
References VTK::ActorCollectionCopy::GetActors().
float SVTK_View::GetTransparency | ( | const Handle(SALOME_InteractiveObject)& | theIObject | ) |
theIObject | - object |
References VTK::ActorCollectionCopy::GetActors().
void SVTK_View::GetVisible | ( | SALOME_ListIO & | theList | ) |
objects visible in viewer
theList | - visible objects collection |
References VTK::ActorCollectionCopy::GetActors(), and SVTK_SignalHandler::getRenderer().
SVTK_View::Handle | ( | SALOME_InteractiveObject | ) | const |
void SVTK_View::highlight | ( | const Handle(SALOME_InteractiveObject)& | theIO, |
bool | theIsHighlight, | ||
bool | theIsUpdate = true |
||
) |
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 | ) |
theIO | - object to be checked |
References VTK::ActorCollectionCopy::GetActors().
bool SVTK_View::isVisible | ( | const Handle(SALOME_InteractiveObject)& | theIObject | ) |
theIO | - object to be checked |
References VTK::ActorCollectionCopy::GetActors().
void SVTK_View::Remove | ( | const Handle(SALOME_InteractiveObject)& | theIObject, |
bool | theIsUpdate = true |
||
) |
To remove the VTK presentation
References VTK::ActorCollectionCopy::GetActors().
void SVTK_View::Remove | ( | SALOME_Actor * | theActor, |
bool | theIsUpdate = true |
||
) |
To remove the VTK presentation
void SVTK_View::RemoveAll | ( | const bool | immediatly | ) |
To remove all VTK presentations
References VTK::ActorCollectionCopy::GetActors().
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(), and SALOME_Actor::setName().
void SVTK_View::SetColor | ( | const Handle(SALOME_InteractiveObject)& | theIObject, |
const QColor & | theColor | ||
) |
Change color
theIObject | - object |
theColor | - new color |
References VTK::ActorCollectionCopy::GetActors(), and VTKViewer_Actor::SetColor().
void SVTK_View::SetDisplayMode | ( | int | theMode | ) |
Set current display mode
theMode | - new display mode |
void SVTK_View::SetDisplayMode | ( | const Handle(SALOME_InteractiveObject)& | theIObject, |
int | theMode | ||
) |
Set current display mode
theIObject | - object |
theMode | - new display mode |
References VTK::ActorCollectionCopy::GetActors(), and VTKViewer_Actor::setDisplayMode().
void SVTK_View::SetMaterial | ( | const Handle(SALOME_InteractiveObject)& | theIObject, |
vtkProperty * | thePropF, | ||
vtkProperty * | thePropB | ||
) |
Change material
theIObject | - object |
thePropF | - property contained new properties of front material |
thePropB | - property contained new properties of back material |
References VTK::ActorCollectionCopy::GetActors(), 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
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
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
void SVTK_View::SetTransparency | ( | const Handle(SALOME_InteractiveObject)& | theIObject, |
float | theTrans | ||
) |
Sets current transparency
theIObject | - object |
theTrans | - new transparency |
References VTK::ActorCollectionCopy::GetActors(), and VTKViewer_Actor::SetOpacity().
void SVTK_View::unHighlightAll | ( | ) |
Unhilights all objects in viewer
References VTK::ActorCollectionCopy::GetActors().
|
protected |