1 // SALOME VTKViewer : build VTK viewer into Salome desktop
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : VTKViewer_RenderWindowInteractor.cxx
25 // Author : Nicolas REJNERI
29 #include "SVTK_RenderWindowInteractor.h"
31 #include "SVTK_InteractorStyle.h"
32 #include "SVTK_RenderWindow.h"
33 #include "SVTK_ViewWindow.h"
35 #include "VTKViewer_Algorithm.h"
36 #include "SVTK_Functor.h"
37 #include "SVTK_Actor.h"
45 #include <vtkObjectFactory.h>
46 #include <vtkPicker.h>
47 #include <vtkCellPicker.h>
48 #include <vtkPointPicker.h>
49 #include <vtkRendererCollection.h>
50 #include <vtkRenderWindow.h>
55 #include <TColStd_IndexedMapOfInteger.hxx>
57 #include "utilities.h"
62 static int MYDEBUG = 0;
64 static int MYDEBUG = 0;
68 SVTK_RenderWindowInteractor*
69 SVTK_RenderWindowInteractor
72 vtkObject *ret = vtkObjectFactory::CreateInstance("SVTK_RenderWindowInteractor") ;
74 return dynamic_cast<SVTK_RenderWindowInteractor *>(ret) ;
76 return new SVTK_RenderWindowInteractor;
79 SVTK_RenderWindowInteractor
80 ::SVTK_RenderWindowInteractor()
83 this->mTimer = new QTimer( this ) ;
87 myBasicPicker = vtkPicker::New();
88 myCellPicker = vtkCellPicker::New();
89 myPointPicker = vtkPointPicker::New();
91 myCellActor = SVTK_Actor::New();
92 myCellActor->PickableOff();
93 myCellActor->GetProperty()->SetColor(1,1,0);
94 myCellActor->GetProperty()->SetLineWidth(5);
95 myCellActor->GetProperty()->SetRepresentationToSurface();
97 myEdgeActor = SVTK_Actor::New();
98 myEdgeActor->PickableOff();
99 myEdgeActor->GetProperty()->SetColor(1,0,0);
100 myEdgeActor->GetProperty()->SetLineWidth(5);
101 myEdgeActor->GetProperty()->SetRepresentationToWireframe();
103 myPointActor = SVTK_Actor::New();
104 myPointActor->PickableOff();
105 myPointActor->GetProperty()->SetColor(1,1,0);
106 myPointActor->GetProperty()->SetPointSize(5);
107 myPointActor->GetProperty()->SetRepresentationToPoints();
109 connect(mTimer, SIGNAL(timeout()), this, SLOT(TimerFunc())) ;
113 SVTK_RenderWindowInteractor
114 ::~SVTK_RenderWindowInteractor()
116 if(MYDEBUG) INFOS("SVTK_RenderWindowInteractor::~SVTK_RenderWindowInteractor()");
120 myViewWindow->RemoveActor(myCellActor);
121 myViewWindow->RemoveActor(myEdgeActor);
122 myViewWindow->RemoveActor(myPointActor);
124 myCellActor->Delete();
125 myEdgeActor->Delete();
126 myPointActor->Delete();
128 myBasicPicker->Delete();
129 myCellPicker->Delete();
130 myPointPicker->Delete();
134 // We never allow the SVTK_RenderWindowInteractor to control
135 // the event loop. The application always has the control.
138 SVTK_RenderWindowInteractor
142 // We cannot do much unless there is a render window
143 // associated with this interactor.
145 if( ! RenderWindow ) {
146 vtkErrorMacro(<< "SVTK_RenderWindowInteractor::Initialize(): No render window attached!") ;
151 // We cannot hand a render window which is not a VTKViewer_RenderWindow.
152 // One way to force this is to use dynamic_cast and hope that
153 // it works. If the dynamic_cast does not work, we flag an error
154 // and get the hell out.
156 vtkRenderWindow *aRenderWindow = dynamic_cast<vtkRenderWindow *>(RenderWindow) ;
157 if( !aRenderWindow ) {
158 vtkErrorMacro(<< "SVTK_RenderWindowInteractor::Initialize() can only handle VTKViewer_RenderWindow.") ;
163 // If the render window has zero size, then set it to a default
166 int* aSize = aRenderWindow->GetSize();
167 this->Size[0] = ((aSize[0] > 0) ? aSize[0] : 300);
168 this->Size[1] = ((aSize[1] > 0) ? aSize[1] : 300);
170 this->SetPicker(myBasicPicker);
172 SetSelectionTolerance();
175 // Enable the interactor.
180 // Start the rendering of the window.
182 aRenderWindow->Start() ;
185 // The interactor has been initialized.
187 this->Initialized = 1 ;
193 //----------------------------------------------------------------------------
195 SVTK_RenderWindowInteractor
196 ::setGUIWindow(QWidget* theWindow)
198 myGUIWindow = theWindow;
201 //----------------------------------------------------------------------------
203 SVTK_RenderWindowInteractor
204 ::setViewWindow(SVTK_ViewWindow* theViewWindow)
206 myViewWindow = theViewWindow;
208 myViewWindow->InsertActor(myCellActor);
209 myViewWindow->InsertActor(myEdgeActor);
210 myViewWindow->InsertActor(myPointActor);
213 //----------------------------------------------------------------------------
215 SVTK_RenderWindowInteractor
216 ::MoveInternalActors()
218 myViewWindow->MoveActor(myCellActor);
219 myViewWindow->MoveActor(myEdgeActor);
220 myViewWindow->MoveActor(myPointActor);
223 //----------------------------------------------------------------------------
225 SVTK_RenderWindowInteractor
226 ::SetInteractorStyle(vtkInteractorObserver *theInteractor)
228 myInteractorStyle = dynamic_cast<SVTK_InteractorStyle*>(theInteractor);
229 vtkRenderWindowInteractor::SetInteractorStyle(theInteractor);
234 SVTK_RenderWindowInteractor
235 ::SetSelectionMode(Selection_Mode theMode)
237 myCellActor->SetVisibility(false);
238 myEdgeActor->SetVisibility(false);
239 myPointActor->SetVisibility(false);
243 this->SetPicker(myBasicPicker);
246 this->SetPicker(myPointPicker);
251 case VolumeSelection:
252 case EdgeOfCellSelection:
253 this->SetPicker(myCellPicker);
257 myInteractorStyle->OnSelectionModeChanged();
261 SVTK_RenderWindowInteractor
262 ::SetSelectionProp(const double& theRed,
263 const double& theGreen,
264 const double& theBlue,
267 myCellActor->GetProperty()->SetColor(theRed, theGreen, theBlue);
268 myCellActor->GetProperty()->SetLineWidth(theWidth);
270 myPointActor->GetProperty()->SetColor(theRed, theGreen, theBlue);
271 myPointActor->GetProperty()->SetPointSize(theWidth);
275 SVTK_RenderWindowInteractor
276 ::SetSelectionTolerance(const double& theTolNodes,
277 const double& theTolItems)
279 myTolNodes = theTolNodes;
280 myTolItems = theTolItems;
282 myBasicPicker->SetTolerance(myTolItems);
283 myCellPicker->SetTolerance(myTolItems);
284 myPointPicker->SetTolerance(myTolNodes);
288 // ==================================
290 SVTK_RenderWindowInteractor
294 // We do not allow this interactor to control the
295 // event loop. Only the QtApplication objects are
296 // allowed to do that.
298 vtkErrorMacro(<<"SVTK_RenderWindowInteractor::Start() not allowed to start event loop.") ;
303 SVTK_RenderWindowInteractor
304 ::UpdateSize(int w, int h)
306 // if the size changed send this on to the RenderWindow
307 if ((w != this->Size[0])||(h != this->Size[1])) {
310 this->RenderWindow->SetSize(w,h);
315 SVTK_RenderWindowInteractor
316 ::CreateTimer(int vtkNotUsed(timertype))
319 // Start a one-shot timer for 10ms.
321 mTimer->start(10, TRUE) ;
326 SVTK_RenderWindowInteractor
330 // :TRICKY: Tue May 2 00:17:32 2000 Pagey
332 // QTimer will automatically expire after 10ms. So
333 // we do not need to do anything here. In fact, we
334 // should not even Stop() the QTimer here because doing
335 // this will skip some of the processing that the TimerFunc()
336 // does and will result in undesirable effects. For
337 // example, this will result in vtkLODActor to leave
338 // the models in low-res mode after the mouse stops
345 SVTK_RenderWindowInteractor
348 if( ! this->Enabled ) {
352 myInteractorStyle->OnTimer();
354 emit RenderWindowModified();
358 SVTK_RenderWindowInteractor
359 ::MouseMove(const QMouseEvent *event)
361 if( ! this->Enabled ) {
364 myInteractorStyle->OnMouseMove(0, 0, event->x(), event->y()/*this->Size[1] - event->y() - 1*/) ;
365 if (myInteractorStyle->needsRedrawing() )
366 emit RenderWindowModified() ;
370 SVTK_RenderWindowInteractor
371 ::LeftButtonPressed(const QMouseEvent *event)
373 if( ! this->Enabled ) {
376 myInteractorStyle->OnLeftButtonDown((event->state() & ControlButton),
377 (event->state() & ShiftButton),
378 event->x(), event->y());
382 SVTK_RenderWindowInteractor
383 ::LeftButtonReleased(const QMouseEvent *event) {
384 if( ! this->Enabled ) {
387 myInteractorStyle->OnLeftButtonUp( (event->state() & ControlButton),
388 (event->state() & ShiftButton),
389 event->x(), event->y() ) ;
393 SVTK_RenderWindowInteractor
394 ::MiddleButtonPressed(const QMouseEvent *event)
396 if( ! this->Enabled ) {
399 myInteractorStyle->OnMiddleButtonDown((event->state() & ControlButton),
400 (event->state() & ShiftButton),
401 event->x(), event->y() ) ;
405 SVTK_RenderWindowInteractor
406 ::MiddleButtonReleased(const QMouseEvent *event)
408 if( ! this->Enabled ) {
411 myInteractorStyle->OnMiddleButtonUp( (event->state() & ControlButton),
412 (event->state() & ShiftButton),
413 event->x(), event->y() ) ;
417 SVTK_RenderWindowInteractor
418 ::RightButtonPressed(const QMouseEvent *event)
420 if( ! this->Enabled ) {
423 myInteractorStyle->OnRightButtonDown( (event->state() & ControlButton),
424 (event->state() & ShiftButton),
425 event->x(), event->y() ) ;
429 SVTK_RenderWindowInteractor
430 ::RightButtonReleased(const QMouseEvent *event)
432 if( ! this->Enabled ) {
435 myInteractorStyle->OnRightButtonUp( (event->state() & ControlButton),
436 (event->state() & ShiftButton),
437 event->x(), event->y() ) ;
439 if(myInteractorStyle->GetState() == VTK_INTERACTOR_STYLE_CAMERA_NONE){
440 QContextMenuEvent aEvent( QContextMenuEvent::Mouse,
441 event->pos(), event->globalPos(),
443 emit contextMenuRequested( &aEvent );
448 SVTK_RenderWindowInteractor
449 ::ButtonPressed(const QMouseEvent *event)
455 SVTK_RenderWindowInteractor
456 ::ButtonReleased(const QMouseEvent *event)
463 SVTK_RenderWindowInteractor
466 return myDisplayMode;
470 SVTK_RenderWindowInteractor
471 ::SetDisplayMode(int theMode)
474 ChangeRepresentationToWireframe();
476 ChangeRepresentationToSurface();
477 myDisplayMode = theMode;
482 SVTK_RenderWindowInteractor
483 ::SetDisplayMode(const Handle(SALOME_InteractiveObject)& theIObject,
487 ForEachIf<SALOME_Actor>(GetRenderer()->GetActors(),
488 TIsSameIObject<SALOME_Actor>(theIObject),
489 TSetFunction<SALOME_Actor,int>
490 (&SALOME_Actor::setDisplayMode,theMode));
495 SVTK_RenderWindowInteractor
496 ::ChangeRepresentationToWireframe()
498 ChangeRepresentationToWireframe(GetRenderer()->GetActors());
502 SVTK_RenderWindowInteractor
503 ::ChangeRepresentationToSurface()
505 ChangeRepresentationToSurface(GetRenderer()->GetActors());
510 SVTK_RenderWindowInteractor
511 ::ChangeRepresentationToWireframe(vtkActorCollection* theCollection)
514 ForEach<SALOME_Actor>(theCollection,
515 TSetFunction<SALOME_Actor,int>
516 (&SALOME_Actor::setDisplayMode,0));
517 emit RenderWindowModified();
521 SVTK_RenderWindowInteractor
522 ::ChangeRepresentationToSurface(vtkActorCollection* theCollection)
525 ForEach<SALOME_Actor>(theCollection,
526 TSetFunction<SALOME_Actor,int>
527 (&SALOME_Actor::setDisplayMode,1));
528 emit RenderWindowModified();
533 SVTK_RenderWindowInteractor
536 vtkRendererCollection * theRenderers = this->RenderWindow->GetRenderers();
537 theRenderers->InitTraversal();
538 return theRenderers->GetNextItem();
543 VTK::TSetFunction<vtkActor,int> mySetFunction;
545 mySetFunction(&vtkActor::SetVisibility,false)
547 void operator()(SALOME_Actor* theActor){
548 theActor->SetVisibility(false);
549 // Erase dependent actors
550 vtkActorCollection* aCollection = vtkActorCollection::New();
551 theActor->GetChildActors(aCollection);
552 VTK::ForEach<vtkActor>(aCollection,mySetFunction);
553 aCollection->Delete();
558 SVTK_RenderWindowInteractor
562 ForEach<SALOME_Actor>(GetRenderer()->GetActors(),
565 emit RenderWindowModified() ;
569 SVTK_RenderWindowInteractor
572 vtkActorCollection* aCollection = GetRenderer()->GetActors();
574 ForEach<SALOME_Actor>(aCollection,TSetVisibility<SALOME_Actor>(true));
576 emit RenderWindowModified() ;
581 SVTK_RenderWindowInteractor
582 ::Erase(SALOME_Actor* theActor, bool update)
587 emit RenderWindowModified();
592 SVTK_RenderWindowInteractor
593 ::Erase(const Handle(SALOME_InteractiveObject)& theIObject,
597 ForEachIf<SALOME_Actor>(GetRenderer()->GetActors(),
598 TIsSameIObject<SALOME_Actor>(theIObject),
602 emit RenderWindowModified();
606 struct TRemoveAction{
608 TRemoveAction(vtkRenderer* theRen): myRen(theRen){}
609 void operator()(SALOME_Actor* theActor){
610 myRen->RemoveActor(theActor);
615 SVTK_RenderWindowInteractor
616 ::Remove(const Handle(SALOME_InteractiveObject)& theIObject,
619 vtkRenderer* aRen = GetRenderer();
622 ForEachIf<SALOME_Actor>(aRen->GetActors(),
623 TIsSameIObject<SALOME_Actor>(theIObject),
624 TRemoveAction(aRen));
628 SVTK_RenderWindowInteractor
629 ::Remove( SALOME_Actor* SActor, bool updateViewer )
633 GetRenderer()->RemoveProp( SActor );
635 emit RenderWindowModified();
640 SVTK_RenderWindowInteractor
641 ::RemoveAll( const bool updateViewer )
643 vtkRenderer* aRenderer = GetRenderer();
644 vtkActorCollection* anActors = aRenderer->GetActors();
647 anActors->InitTraversal();
648 while ( vtkActor *anAct = anActors->GetNextActor() )
650 if ( anAct->IsA( "SALOME_Actor" ) )
652 SALOME_Actor* aSAct = (SALOME_Actor*)anAct;
653 if ( aSAct->hasIO() && aSAct->getIO()->hasEntry() )
654 aRenderer->RemoveActor( anAct );
659 emit RenderWindowModified();
665 SVTK_RenderWindowInteractor
666 ::GetTransparency(const Handle(SALOME_InteractiveObject)& theIObject)
669 SALOME_Actor* anActor =
670 Find<SALOME_Actor>(GetRenderer()->GetActors(),
671 TIsSameIObject<SALOME_Actor>(theIObject));
673 return 1.0 - anActor->GetOpacity();
679 SVTK_RenderWindowInteractor
680 ::SetTransparency(const Handle(SALOME_InteractiveObject)& theIObject,
683 float anOpacity = 1.0 - theTrans;
685 ForEachIf<SALOME_Actor>(GetRenderer()->GetActors(),
686 TIsSameIObject<SALOME_Actor>(theIObject),
687 TSetFunction<SALOME_Actor,float>
688 (&SALOME_Actor::SetOpacity,anOpacity));
693 SVTK_RenderWindowInteractor
694 ::Display(SALOME_Actor* theActor, bool update)
696 GetRenderer()->AddActor(theActor);
697 theActor->SetVisibility(true);
700 emit RenderWindowModified();
705 SVTK_RenderWindowInteractor
706 ::Display(const Handle(SALOME_InteractiveObject)& theIObject, bool update)
709 ForEachIf<SALOME_Actor>(GetRenderer()->GetActors(),
710 TIsSameIObject<SALOME_Actor>(theIObject),
711 TSetVisibility<SALOME_Actor>(true));
714 emit RenderWindowModified() ;
719 SVTK_RenderWindowInteractor
720 ::KeyPressed(QKeyEvent *event)
724 struct THighlightAction{
726 SVTK_InteractorStyle* myInteractorStyle;
727 THighlightAction(SVTK_InteractorStyle* theInteractorStyle,
728 bool theIsHighlight):
729 myInteractorStyle(theInteractorStyle),
730 myIsHighlight(theIsHighlight)
732 void operator()(SALOME_Actor* theActor){
733 if(theActor->GetMapper()){
734 if(theActor->hasHighlight())
735 theActor->highlight(myIsHighlight);
737 if(theActor->GetVisibility() && myIsHighlight)
738 myInteractorStyle->HighlightProp(theActor);
739 else if(!myIsHighlight)
740 myInteractorStyle->HighlightProp(NULL);
747 SVTK_RenderWindowInteractor
748 ::highlight( const Handle(SALOME_InteractiveObject)& theIObject,
753 ForEachIf<SALOME_Actor>(GetRenderer()->GetActors(),
754 TIsSameIObject<SALOME_Actor>(theIObject),
755 THighlightAction(myInteractorStyle,hilight));
758 emit RenderWindowModified();
764 struct TUpdateAction{
765 void operator()(vtkActor* theActor){
766 theActor->ApplyProperties();
771 SVTK_RenderWindowInteractor
774 vtkRenderer* aRen = GetRenderer();
777 ForEach<vtkActor>(aRen->GetActors(),TUpdateAction());
781 emit RenderWindowModified();
786 SVTK_RenderWindowInteractor
787 ::unHighlightSubSelection()
789 myPointActor->SetVisibility(false);
790 myEdgeActor->SetVisibility(false);
791 myCellActor->SetVisibility(false);
796 SVTK_RenderWindowInteractor
799 unHighlightSubSelection();
802 ForEach<SALOME_Actor>(GetRenderer()->GetActors(),
803 THighlightAction(myInteractorStyle,false));
805 emit RenderWindowModified() ;
815 SVTK_RenderWindowInteractor
816 ::SetColor(const Handle(SALOME_InteractiveObject)& theIObject,QColor theColor)
818 float aColor[3] = {theColor.red()/255., theColor.green()/255., theColor.blue()/255.};
820 ForEachIf<SALOME_Actor>(GetRenderer()->GetActors(),
821 TIsSameIObject<SALOME_Actor>(theIObject),
822 TSetFunction<SALOME_Actor,const float*>
823 (&SALOME_Actor::SetColor,aColor));
828 SVTK_RenderWindowInteractor
829 ::GetColor(const Handle(SALOME_InteractiveObject)& theIObject)
832 SALOME_Actor* anActor =
833 Find<SALOME_Actor>(GetRenderer()->GetActors(),
834 TIsSameIObject<SALOME_Actor>(theIObject));
837 anActor->GetColor(r,g,b);
838 return QColor(int(r*255),int(g*255),int(b*255));
840 return QColor(0,0,0);
845 SVTK_RenderWindowInteractor
846 ::isInViewer(const Handle(SALOME_InteractiveObject)& theIObject)
849 SALOME_Actor* anActor =
850 Find<SALOME_Actor>(GetRenderer()->GetActors(),
851 TIsSameIObject<SALOME_Actor>(theIObject));
852 return anActor != NULL;
857 SVTK_RenderWindowInteractor
858 ::isVisible(const Handle(SALOME_InteractiveObject)& theIObject)
861 SALOME_Actor* anActor =
862 Find<SALOME_Actor>(GetRenderer()->GetActors(),
863 TIsSameIObject<SALOME_Actor>(theIObject));
864 return anActor != NULL && anActor->GetVisibility();
869 SVTK_RenderWindowInteractor
870 ::rename(const Handle(SALOME_InteractiveObject)& theIObject, QString theName)
873 ForEachIf<SALOME_Actor>(GetRenderer()->GetActors(),
874 TIsSameIObject<SALOME_Actor>(theIObject),
875 TSetFunction<SALOME_Actor,const char*,QString>
876 (&SALOME_Actor::setName,theName.latin1()));
880 //----------------------------------------------------------------------------
882 SVTK_RenderWindowInteractor
883 ::highlight(const TColStd_IndexedMapOfInteger& theMapIndex,
884 SALOME_Actor* theMapActor,
885 SVTK_Actor* theActor,
890 if(theMapIndex.Extent() == 0) return false;
893 setActorData(theMapIndex,theMapActor,theActor,theFun);
894 theActor->SetVisibility(true);
897 theActor->SetVisibility(false);
901 this->RenderWindow->Render();
902 emit RenderWindowModified() ;
909 SVTK_RenderWindowInteractor
910 ::setActorData(const TColStd_IndexedMapOfInteger& theMapIndex,
911 SALOME_Actor* theMapActor,
912 SVTK_Actor *theActor,
915 (*theFun)(theMapIndex,theMapActor,theActor);
919 //----------------------------------------------------------------------------
920 static void CellsUpdateActor(const TColStd_IndexedMapOfInteger& theMapIndex,
921 SALOME_Actor* theMapActor,
922 SVTK_Actor* theActor)
924 theActor->MapCells(theMapActor,theMapIndex);
928 SVTK_RenderWindowInteractor
929 ::highlightCell(const TColStd_IndexedMapOfInteger& theMapIndex,
930 SALOME_Actor* theMapActor,
934 return highlight(theMapIndex,theMapActor,myCellActor,&CellsUpdateActor,hilight,update);
938 SVTK_RenderWindowInteractor
939 ::setCellData(const int& theIndex,
940 SALOME_Actor* theMapActor,
941 SVTK_Actor* theActor)
943 TColStd_IndexedMapOfInteger MapIndex;
944 MapIndex.Add(theIndex);
945 theActor->MapCells(theMapActor,MapIndex);
949 //----------------------------------------------------------------------------
950 static void PointsUpdateActor(const TColStd_IndexedMapOfInteger& theMapIndex,
951 SALOME_Actor* theMapActor,
952 SVTK_Actor* theActor)
954 theActor->MapPoints(theMapActor,theMapIndex);
958 SVTK_RenderWindowInteractor
959 ::highlightPoint(const TColStd_IndexedMapOfInteger& theMapIndex,
960 SALOME_Actor* theMapActor,
964 return highlight(theMapIndex,theMapActor,myPointActor,&PointsUpdateActor,hilight,update);
968 SVTK_RenderWindowInteractor
969 ::setPointData(const int& theIndex,
970 SALOME_Actor* theMapActor,
971 SVTK_Actor* theActor)
973 TColStd_IndexedMapOfInteger MapIndex;
974 MapIndex.Add(theIndex);
975 theActor->MapPoints(theMapActor,MapIndex);
979 //----------------------------------------------------------------------------
980 static void EdgesUpdateActor(const TColStd_IndexedMapOfInteger& theMapIndex,
981 SALOME_Actor* theMapActor,
982 SVTK_Actor* theActor)
984 theActor->MapEdge(theMapActor,theMapIndex);
988 SVTK_RenderWindowInteractor
989 ::highlightEdge(const TColStd_IndexedMapOfInteger& theMapIndex,
990 SALOME_Actor* theMapActor,
994 return highlight(theMapIndex,theMapActor,myEdgeActor,&EdgesUpdateActor,hilight,update);
998 SVTK_RenderWindowInteractor
999 ::setEdgeData(const int& theCellIndex,
1000 SALOME_Actor* theMapActor,
1001 const int& theEdgeIndex,
1002 SVTK_Actor* theActor )
1004 TColStd_IndexedMapOfInteger MapIndex;
1005 MapIndex.Add(theCellIndex);
1006 MapIndex.Add(theEdgeIndex);
1007 theActor->MapEdge(theMapActor,MapIndex);