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>
59 SVTK_RenderWindowInteractor*
60 SVTK_RenderWindowInteractor
63 vtkObject *ret = vtkObjectFactory::CreateInstance("SVTK_RenderWindowInteractor") ;
65 return dynamic_cast<SVTK_RenderWindowInteractor *>(ret) ;
67 return new SVTK_RenderWindowInteractor;
70 SVTK_RenderWindowInteractor
71 ::SVTK_RenderWindowInteractor()
74 this->mTimer = new QTimer( this ) ;
78 myBasicPicker = vtkPicker::New();
79 myCellPicker = vtkCellPicker::New();
80 myPointPicker = vtkPointPicker::New();
82 myCellActor = SVTK_Actor::New();
83 myCellActor->PickableOff();
84 myCellActor->GetProperty()->SetColor(1,1,0);
85 myCellActor->GetProperty()->SetLineWidth(5);
86 myCellActor->GetProperty()->SetRepresentationToSurface();
88 myEdgeActor = SVTK_Actor::New();
89 myEdgeActor->PickableOff();
90 myEdgeActor->GetProperty()->SetColor(1,0,0);
91 myEdgeActor->GetProperty()->SetLineWidth(5);
92 myEdgeActor->GetProperty()->SetRepresentationToWireframe();
94 myPointActor = SVTK_Actor::New();
95 myPointActor->PickableOff();
96 myPointActor->GetProperty()->SetColor(1,1,0);
97 myPointActor->GetProperty()->SetPointSize(5);
98 myPointActor->GetProperty()->SetRepresentationToPoints();
100 connect(mTimer, SIGNAL(timeout()), this, SLOT(TimerFunc())) ;
104 SVTK_RenderWindowInteractor
105 ::~SVTK_RenderWindowInteractor()
109 myViewWindow->RemoveActor(myCellActor);
110 myViewWindow->RemoveActor(myEdgeActor);
111 myViewWindow->RemoveActor(myPointActor);
113 myCellActor->Delete();
114 myEdgeActor->Delete();
115 myPointActor->Delete();
117 myBasicPicker->Delete();
118 myCellPicker->Delete();
119 myPointPicker->Delete();
123 // We never allow the SVTK_RenderWindowInteractor to control
124 // the event loop. The application always has the control.
127 SVTK_RenderWindowInteractor
131 // We cannot do much unless there is a render window
132 // associated with this interactor.
134 if( ! RenderWindow ) {
135 vtkErrorMacro(<< "SVTK_RenderWindowInteractor::Initialize(): No render window attached!") ;
140 // We cannot hand a render window which is not a VTKViewer_RenderWindow.
141 // One way to force this is to use dynamic_cast and hope that
142 // it works. If the dynamic_cast does not work, we flag an error
143 // and get the hell out.
145 vtkRenderWindow *aRenderWindow = dynamic_cast<vtkRenderWindow *>(RenderWindow) ;
146 if( !aRenderWindow ) {
147 vtkErrorMacro(<< "SVTK_RenderWindowInteractor::Initialize() can only handle VTKViewer_RenderWindow.") ;
152 // If the render window has zero size, then set it to a default
155 int* aSize = aRenderWindow->GetSize();
156 this->Size[0] = ((aSize[0] > 0) ? aSize[0] : 300);
157 this->Size[1] = ((aSize[1] > 0) ? aSize[1] : 300);
159 this->SetPicker(myBasicPicker);
161 SetSelectionTolerance();
164 // Enable the interactor.
169 // Start the rendering of the window.
171 aRenderWindow->Start() ;
174 // The interactor has been initialized.
176 this->Initialized = 1 ;
182 //----------------------------------------------------------------------------
184 SVTK_RenderWindowInteractor
185 ::setGUIWindow(QWidget* theWindow)
187 myGUIWindow = theWindow;
190 //----------------------------------------------------------------------------
192 SVTK_RenderWindowInteractor
193 ::setViewWindow(SVTK_ViewWindow* theViewWindow)
195 myViewWindow = theViewWindow;
197 myViewWindow->InsertActor(myCellActor);
198 myViewWindow->InsertActor(myEdgeActor);
199 myViewWindow->InsertActor(myPointActor);
202 //----------------------------------------------------------------------------
204 SVTK_RenderWindowInteractor
205 ::MoveInternalActors()
207 myViewWindow->MoveActor(myCellActor);
208 myViewWindow->MoveActor(myEdgeActor);
209 myViewWindow->MoveActor(myPointActor);
212 //----------------------------------------------------------------------------
214 SVTK_RenderWindowInteractor
215 ::SetInteractorStyle(vtkInteractorObserver *theInteractor)
217 myInteractorStyle = dynamic_cast<SVTK_InteractorStyle*>(theInteractor);
218 vtkRenderWindowInteractor::SetInteractorStyle(theInteractor);
223 SVTK_RenderWindowInteractor
224 ::SetSelectionMode(Selection_Mode theMode)
226 myCellActor->SetVisibility(false);
227 myEdgeActor->SetVisibility(false);
228 myPointActor->SetVisibility(false);
232 this->SetPicker(myBasicPicker);
235 this->SetPicker(myPointPicker);
240 case VolumeSelection:
241 case EdgeOfCellSelection:
242 this->SetPicker(myCellPicker);
246 myInteractorStyle->OnSelectionModeChanged();
250 SVTK_RenderWindowInteractor
251 ::SetSelectionProp(const double& theRed,
252 const double& theGreen,
253 const double& theBlue,
256 myCellActor->GetProperty()->SetColor(theRed, theGreen, theBlue);
257 myCellActor->GetProperty()->SetLineWidth(theWidth);
259 myPointActor->GetProperty()->SetColor(theRed, theGreen, theBlue);
260 myPointActor->GetProperty()->SetPointSize(theWidth);
264 SVTK_RenderWindowInteractor
265 ::SetSelectionTolerance(const double& theTolNodes,
266 const double& theTolItems)
268 myTolNodes = theTolNodes;
269 myTolItems = theTolItems;
271 myBasicPicker->SetTolerance(myTolItems);
272 myCellPicker->SetTolerance(myTolItems);
273 myPointPicker->SetTolerance(myTolNodes);
277 // ==================================
279 SVTK_RenderWindowInteractor
283 // We do not allow this interactor to control the
284 // event loop. Only the QtApplication objects are
285 // allowed to do that.
287 vtkErrorMacro(<<"SVTK_RenderWindowInteractor::Start() not allowed to start event loop.") ;
292 SVTK_RenderWindowInteractor
293 ::UpdateSize(int w, int h)
295 // if the size changed send this on to the RenderWindow
296 if ((w != this->Size[0])||(h != this->Size[1])) {
299 this->RenderWindow->SetSize(w,h);
304 SVTK_RenderWindowInteractor
305 ::CreateTimer(int vtkNotUsed(timertype))
308 // Start a one-shot timer for 10ms.
310 mTimer->start(10, TRUE) ;
315 SVTK_RenderWindowInteractor
319 // :TRICKY: Tue May 2 00:17:32 2000 Pagey
321 // QTimer will automatically expire after 10ms. So
322 // we do not need to do anything here. In fact, we
323 // should not even Stop() the QTimer here because doing
324 // this will skip some of the processing that the TimerFunc()
325 // does and will result in undesirable effects. For
326 // example, this will result in vtkLODActor to leave
327 // the models in low-res mode after the mouse stops
334 SVTK_RenderWindowInteractor
337 if( ! this->Enabled ) {
341 myInteractorStyle->OnTimer();
343 emit RenderWindowModified();
347 SVTK_RenderWindowInteractor
348 ::MouseMove(const QMouseEvent *event)
350 if( ! this->Enabled ) {
353 myInteractorStyle->OnMouseMove(0, 0, event->x(), event->y()/*this->Size[1] - event->y() - 1*/) ;
354 if (myInteractorStyle->needsRedrawing() )
355 emit RenderWindowModified() ;
359 SVTK_RenderWindowInteractor
360 ::LeftButtonPressed(const QMouseEvent *event)
362 if( ! this->Enabled ) {
365 myInteractorStyle->OnLeftButtonDown((event->state() & ControlButton),
366 (event->state() & ShiftButton),
367 event->x(), event->y());
371 SVTK_RenderWindowInteractor
372 ::LeftButtonReleased(const QMouseEvent *event) {
373 if( ! this->Enabled ) {
376 myInteractorStyle->OnLeftButtonUp( (event->state() & ControlButton),
377 (event->state() & ShiftButton),
378 event->x(), event->y() ) ;
382 SVTK_RenderWindowInteractor
383 ::MiddleButtonPressed(const QMouseEvent *event)
385 if( ! this->Enabled ) {
388 myInteractorStyle->OnMiddleButtonDown((event->state() & ControlButton),
389 (event->state() & ShiftButton),
390 event->x(), event->y() ) ;
394 SVTK_RenderWindowInteractor
395 ::MiddleButtonReleased(const QMouseEvent *event)
397 if( ! this->Enabled ) {
400 myInteractorStyle->OnMiddleButtonUp( (event->state() & ControlButton),
401 (event->state() & ShiftButton),
402 event->x(), event->y() ) ;
406 SVTK_RenderWindowInteractor
407 ::RightButtonPressed(const QMouseEvent *event)
409 if( ! this->Enabled ) {
412 myInteractorStyle->OnRightButtonDown( (event->state() & ControlButton),
413 (event->state() & ShiftButton),
414 event->x(), event->y() ) ;
418 SVTK_RenderWindowInteractor
419 ::RightButtonReleased(const QMouseEvent *event)
421 if( ! this->Enabled ) {
424 myInteractorStyle->OnRightButtonUp( (event->state() & ControlButton),
425 (event->state() & ShiftButton),
426 event->x(), event->y() ) ;
428 if(myInteractorStyle->GetState() == VTK_INTERACTOR_STYLE_CAMERA_NONE && !( event->state() & KeyButtonMask )){
429 QContextMenuEvent aEvent( QContextMenuEvent::Mouse,
430 event->pos(), event->globalPos(),
432 emit contextMenuRequested( &aEvent );
437 SVTK_RenderWindowInteractor
438 ::ButtonPressed(const QMouseEvent *event)
444 SVTK_RenderWindowInteractor
445 ::ButtonReleased(const QMouseEvent *event)
452 SVTK_RenderWindowInteractor
455 return myDisplayMode;
459 SVTK_RenderWindowInteractor
460 ::SetDisplayMode(int theMode)
463 ChangeRepresentationToWireframe();
465 ChangeRepresentationToSurface();
466 myDisplayMode = theMode;
471 SVTK_RenderWindowInteractor
472 ::SetDisplayMode(const Handle(SALOME_InteractiveObject)& theIObject,
476 ForEachIf<SALOME_Actor>(GetRenderer()->GetActors(),
477 TIsSameIObject<SALOME_Actor>(theIObject),
478 TSetFunction<SALOME_Actor,int>
479 (&SALOME_Actor::setDisplayMode,theMode));
484 SVTK_RenderWindowInteractor
485 ::ChangeRepresentationToWireframe()
487 ChangeRepresentationToWireframe(GetRenderer()->GetActors());
491 SVTK_RenderWindowInteractor
492 ::ChangeRepresentationToSurface()
494 ChangeRepresentationToSurface(GetRenderer()->GetActors());
499 SVTK_RenderWindowInteractor
500 ::ChangeRepresentationToWireframe(vtkActorCollection* theCollection)
503 ForEach<SALOME_Actor>(theCollection,
504 TSetFunction<SALOME_Actor,int>
505 (&SALOME_Actor::setDisplayMode,0));
506 emit RenderWindowModified();
510 SVTK_RenderWindowInteractor
511 ::ChangeRepresentationToSurface(vtkActorCollection* theCollection)
514 ForEach<SALOME_Actor>(theCollection,
515 TSetFunction<SALOME_Actor,int>
516 (&SALOME_Actor::setDisplayMode,1));
517 emit RenderWindowModified();
522 SVTK_RenderWindowInteractor
525 vtkRendererCollection * theRenderers = this->RenderWindow->GetRenderers();
526 theRenderers->InitTraversal();
527 return theRenderers->GetNextItem();
532 VTK::TSetFunction<vtkActor,int> mySetFunction;
534 mySetFunction(&vtkActor::SetVisibility,false)
536 void operator()(SALOME_Actor* theActor){
537 theActor->SetVisibility(false);
538 // Erase dependent actors
539 vtkActorCollection* aCollection = vtkActorCollection::New();
540 theActor->GetChildActors(aCollection);
541 VTK::ForEach<vtkActor>(aCollection,mySetFunction);
542 aCollection->Delete();
547 SVTK_RenderWindowInteractor
551 ForEach<SALOME_Actor>(GetRenderer()->GetActors(),
554 emit RenderWindowModified() ;
558 SVTK_RenderWindowInteractor
561 vtkActorCollection* aCollection = GetRenderer()->GetActors();
563 ForEach<SALOME_Actor>(aCollection,TSetVisibility<SALOME_Actor>(true));
565 emit RenderWindowModified() ;
570 SVTK_RenderWindowInteractor
571 ::Erase(SALOME_Actor* theActor, bool update)
576 emit RenderWindowModified();
581 SVTK_RenderWindowInteractor
582 ::Erase(const Handle(SALOME_InteractiveObject)& theIObject,
586 ForEachIf<SALOME_Actor>(GetRenderer()->GetActors(),
587 TIsSameIObject<SALOME_Actor>(theIObject),
591 emit RenderWindowModified();
595 struct TRemoveAction{
597 TRemoveAction(vtkRenderer* theRen): myRen(theRen){}
598 void operator()(SALOME_Actor* theActor){
599 myRen->RemoveActor(theActor);
604 SVTK_RenderWindowInteractor
605 ::Remove(const Handle(SALOME_InteractiveObject)& theIObject,
608 vtkRenderer* aRen = GetRenderer();
611 ForEachIf<SALOME_Actor>(aRen->GetActors(),
612 TIsSameIObject<SALOME_Actor>(theIObject),
613 TRemoveAction(aRen));
617 SVTK_RenderWindowInteractor
618 ::Remove( SALOME_Actor* SActor, bool updateViewer )
622 GetRenderer()->RemoveProp( SActor );
624 emit RenderWindowModified();
629 SVTK_RenderWindowInteractor
630 ::RemoveAll( const bool updateViewer )
632 vtkRenderer* aRenderer = GetRenderer();
633 vtkActorCollection* anActors = aRenderer->GetActors();
636 anActors->InitTraversal();
637 while ( vtkActor *anAct = anActors->GetNextActor() )
639 if ( anAct->IsA( "SALOME_Actor" ) )
641 SALOME_Actor* aSAct = (SALOME_Actor*)anAct;
642 if ( aSAct->hasIO() && aSAct->getIO()->hasEntry() )
643 aRenderer->RemoveActor( anAct );
648 emit RenderWindowModified();
654 SVTK_RenderWindowInteractor
655 ::GetTransparency(const Handle(SALOME_InteractiveObject)& theIObject)
658 SALOME_Actor* anActor =
659 Find<SALOME_Actor>(GetRenderer()->GetActors(),
660 TIsSameIObject<SALOME_Actor>(theIObject));
662 return 1.0 - anActor->GetOpacity();
668 SVTK_RenderWindowInteractor
669 ::SetTransparency(const Handle(SALOME_InteractiveObject)& theIObject,
672 float anOpacity = 1.0 - theTrans;
674 ForEachIf<SALOME_Actor>(GetRenderer()->GetActors(),
675 TIsSameIObject<SALOME_Actor>(theIObject),
676 TSetFunction<SALOME_Actor,float>
677 (&SALOME_Actor::SetOpacity,anOpacity));
682 SVTK_RenderWindowInteractor
683 ::Display(SALOME_Actor* theActor, bool update)
685 GetRenderer()->AddActor(theActor);
686 theActor->SetVisibility(true);
689 emit RenderWindowModified();
694 SVTK_RenderWindowInteractor
695 ::Display(const Handle(SALOME_InteractiveObject)& theIObject, bool update)
698 ForEachIf<SALOME_Actor>(GetRenderer()->GetActors(),
699 TIsSameIObject<SALOME_Actor>(theIObject),
700 TSetVisibility<SALOME_Actor>(true));
703 emit RenderWindowModified() ;
708 SVTK_RenderWindowInteractor
709 ::KeyPressed(QKeyEvent *event)
713 struct THighlightAction{
715 SVTK_InteractorStyle* myInteractorStyle;
716 THighlightAction(SVTK_InteractorStyle* theInteractorStyle,
717 bool theIsHighlight):
718 myInteractorStyle(theInteractorStyle),
719 myIsHighlight(theIsHighlight)
721 void operator()(SALOME_Actor* theActor){
722 if(theActor->GetMapper()){
723 if(theActor->hasHighlight())
724 theActor->highlight(myIsHighlight);
726 if(theActor->GetVisibility() && myIsHighlight)
727 myInteractorStyle->HighlightProp(theActor);
728 else if(!myIsHighlight)
729 myInteractorStyle->HighlightProp(NULL);
736 SVTK_RenderWindowInteractor
737 ::highlight( const Handle(SALOME_InteractiveObject)& theIObject,
742 ForEachIf<SALOME_Actor>(GetRenderer()->GetActors(),
743 TIsSameIObject<SALOME_Actor>(theIObject),
744 THighlightAction(myInteractorStyle,hilight));
747 emit RenderWindowModified();
753 struct TUpdateAction{
754 void operator()(vtkActor* theActor){
755 theActor->ApplyProperties();
760 SVTK_RenderWindowInteractor
763 vtkRenderer* aRen = GetRenderer();
766 ForEach<vtkActor>(aRen->GetActors(),TUpdateAction());
770 emit RenderWindowModified();
775 SVTK_RenderWindowInteractor
776 ::unHighlightSubSelection()
778 myPointActor->SetVisibility(false);
779 myEdgeActor->SetVisibility(false);
780 myCellActor->SetVisibility(false);
785 SVTK_RenderWindowInteractor
788 unHighlightSubSelection();
791 ForEach<SALOME_Actor>(GetRenderer()->GetActors(),
792 THighlightAction(myInteractorStyle,false));
794 emit RenderWindowModified() ;
804 SVTK_RenderWindowInteractor
805 ::SetColor(const Handle(SALOME_InteractiveObject)& theIObject,QColor theColor)
807 float aColor[3] = {theColor.red()/255., theColor.green()/255., theColor.blue()/255.};
809 ForEachIf<SALOME_Actor>(GetRenderer()->GetActors(),
810 TIsSameIObject<SALOME_Actor>(theIObject),
811 TSetFunction<SALOME_Actor,const float*>
812 (&SALOME_Actor::SetColor,aColor));
817 SVTK_RenderWindowInteractor
818 ::GetColor(const Handle(SALOME_InteractiveObject)& theIObject)
821 SALOME_Actor* anActor =
822 Find<SALOME_Actor>(GetRenderer()->GetActors(),
823 TIsSameIObject<SALOME_Actor>(theIObject));
826 anActor->GetColor(r,g,b);
827 return QColor(int(r*255),int(g*255),int(b*255));
829 return QColor(0,0,0);
834 SVTK_RenderWindowInteractor
835 ::isInViewer(const Handle(SALOME_InteractiveObject)& theIObject)
838 SALOME_Actor* anActor =
839 Find<SALOME_Actor>(GetRenderer()->GetActors(),
840 TIsSameIObject<SALOME_Actor>(theIObject));
841 return anActor != NULL;
846 SVTK_RenderWindowInteractor
847 ::isVisible(const Handle(SALOME_InteractiveObject)& theIObject)
850 SALOME_Actor* anActor =
851 Find<SALOME_Actor>(GetRenderer()->GetActors(),
852 TIsSameIObject<SALOME_Actor>(theIObject));
853 return anActor != NULL && anActor->GetVisibility();
858 SVTK_RenderWindowInteractor
859 ::rename(const Handle(SALOME_InteractiveObject)& theIObject, QString theName)
862 ForEachIf<SALOME_Actor>(GetRenderer()->GetActors(),
863 TIsSameIObject<SALOME_Actor>(theIObject),
864 TSetFunction<SALOME_Actor,const char*,QString>
865 (&SALOME_Actor::setName,theName.latin1()));
869 //----------------------------------------------------------------------------
871 SVTK_RenderWindowInteractor
872 ::highlight(const TColStd_IndexedMapOfInteger& theMapIndex,
873 SALOME_Actor* theMapActor,
874 SVTK_Actor* theActor,
879 if(theMapIndex.Extent() == 0) return false;
882 setActorData(theMapIndex,theMapActor,theActor,theFun);
883 theActor->SetVisibility(true);
886 theActor->SetVisibility(false);
890 this->RenderWindow->Render();
891 emit RenderWindowModified() ;
898 SVTK_RenderWindowInteractor
899 ::setActorData(const TColStd_IndexedMapOfInteger& theMapIndex,
900 SALOME_Actor* theMapActor,
901 SVTK_Actor *theActor,
904 (*theFun)(theMapIndex,theMapActor,theActor);
906 theMapActor->GetPosition(aPos);
907 theActor->SetPosition(aPos);
911 //----------------------------------------------------------------------------
912 static void CellsUpdateActor(const TColStd_IndexedMapOfInteger& theMapIndex,
913 SALOME_Actor* theMapActor,
914 SVTK_Actor* theActor)
916 theActor->MapCells(theMapActor,theMapIndex);
920 SVTK_RenderWindowInteractor
921 ::highlightCell(const TColStd_IndexedMapOfInteger& theMapIndex,
922 SALOME_Actor* theMapActor,
926 return highlight(theMapIndex,theMapActor,myCellActor,&CellsUpdateActor,hilight,update);
930 SVTK_RenderWindowInteractor
931 ::setCellData(const int& theIndex,
932 SALOME_Actor* theMapActor,
933 SVTK_Actor* theActor)
935 TColStd_IndexedMapOfInteger MapIndex;
936 MapIndex.Add(theIndex);
937 theActor->MapCells(theMapActor,MapIndex);
941 //----------------------------------------------------------------------------
942 static void PointsUpdateActor(const TColStd_IndexedMapOfInteger& theMapIndex,
943 SALOME_Actor* theMapActor,
944 SVTK_Actor* theActor)
946 theActor->MapPoints(theMapActor,theMapIndex);
950 SVTK_RenderWindowInteractor
951 ::highlightPoint(const TColStd_IndexedMapOfInteger& theMapIndex,
952 SALOME_Actor* theMapActor,
956 return highlight(theMapIndex,theMapActor,myPointActor,&PointsUpdateActor,hilight,update);
960 SVTK_RenderWindowInteractor
961 ::setPointData(const int& theIndex,
962 SALOME_Actor* theMapActor,
963 SVTK_Actor* theActor)
965 TColStd_IndexedMapOfInteger MapIndex;
966 MapIndex.Add(theIndex);
967 theActor->MapPoints(theMapActor,MapIndex);
971 //----------------------------------------------------------------------------
972 static void EdgesUpdateActor(const TColStd_IndexedMapOfInteger& theMapIndex,
973 SALOME_Actor* theMapActor,
974 SVTK_Actor* theActor)
976 theActor->MapEdge(theMapActor,theMapIndex);
980 SVTK_RenderWindowInteractor
981 ::highlightEdge(const TColStd_IndexedMapOfInteger& theMapIndex,
982 SALOME_Actor* theMapActor,
986 return highlight(theMapIndex,theMapActor,myEdgeActor,&EdgesUpdateActor,hilight,update);
990 SVTK_RenderWindowInteractor
991 ::setEdgeData(const int& theCellIndex,
992 SALOME_Actor* theMapActor,
993 const int& theEdgeIndex,
994 SVTK_Actor* theActor )
996 TColStd_IndexedMapOfInteger MapIndex;
997 MapIndex.Add(theCellIndex);
998 MapIndex.Add(theEdgeIndex);
999 theActor->MapEdge(theMapActor,MapIndex);