return aSelectionEvent;
}
+//----------------------------------------------------------------------------
+SVTK_SelectionEvent
+SVTK_InteractorStyle
+::GetSelectionEventFlipY()
+{
+ SVTK_SelectionEvent aSelectionEvent;
+ int x, y;
+ //GetEventPosition( this->Interactor, x, y );
+ Interactor->GetEventPosition(x, y);
+ aSelectionEvent.myX = x;
+ aSelectionEvent.myY = y;
+ aSelectionEvent.myIsCtrl = Interactor->GetControlKey();
+ aSelectionEvent.myIsShift = Interactor->GetShiftKey();
+ aSelectionEvent.mySelectionMode = GetSelector()->SelectionMode();
+
+ return aSelectionEvent;
+}
//----------------------------------------------------------------------------
void
SVTK_InteractorStyle
myPicker->Pick(x, y, 0.0, GetCurrentRenderer());
if(SALOME_Actor* aSActor = SALOME_Actor::SafeDownCast(myPicker->GetActor())){
- SVTK_SelectionEvent aSelectionEvent = GetSelectionEvent();
+ SVTK_SelectionEvent aSelectionEvent = GetSelectionEventFlipY();
aSelectionEvent.mySelectionMode = aSelectionMode;
aSelectionEvent.myIsRectangle = false;
aSActor->Highlight( GetSelector(), this, aSelectionEvent, true );
myRectPicker->SetTolerance(0.001);
myRectPicker->Pick(x1, y1, 0.0, x2, y2, 0.0, GetCurrentRenderer());
-
- SVTK_SelectionEvent aSelectionEvent = GetSelectionEvent();
+ SVTK_SelectionEvent aSelectionEvent = GetSelectionEventFlipY();
aSelectionEvent.mySelectionMode = aSelectionMode;
aSelectionEvent.myIsRectangle = true;
aSelectionEvent.myLastX = x1;
aSelectionEvent.myLastY = y1;
-
vtkActorCollection* aListActors = myRectPicker->GetActors();
aListActors->InitTraversal();
while(vtkActor* aActor = aListActors->GetNextActor()){
virtual int GetState();
SVTK_SelectionEvent GetSelectionEvent();
-
+ SVTK_SelectionEvent GetSelectionEventFlipY();
// redefined in order to add an observer (callback) for custorm event (space mouse event)
virtual void SetInteractor( vtkRenderWindowInteractor* );
// [5] Dominant Combined Switch
QWidget* myRenderWidget;
- vtkSmartPointer<SVTK_Selector> mySelector;
vtkSmartPointer<SVTK_GenericRenderWindowInteractor> myInteractor;
vtkSmartPointer<vtkPicker> myPicker;