- if( !theSelectionEvent->myIsRectangle ) {
- switch(aSelectionMode){
- case NodeSelection: {
- SVTK::TPickLimiter aPickLimiter( myPointPicker, this );
- myPointPicker->Pick( x, y, z, aRenderer );
-
- int aVtkId = myPointPicker->GetPointId();
- if( aVtkId >= 0 && mySelector->IsValid( this, aVtkId, true ) ) {
- int anObjId = GetNodeObjId( aVtkId );
- if( hasIO() && anObjId >= 0 ) {
- mySelector->AddOrRemoveIndex( myIO, anObjId, anIsShift );
- mySelector->AddIObject( this );
- }
- }
- break;
- }
- case CellSelection:
- case EdgeSelection:
- case FaceSelection:
- case VolumeSelection:
- {
- SVTK::TPickLimiter aPickLimiter( myCellPicker, this );
- myCellPicker->Pick( x, y, z, aRenderer );
-
- int aVtkId = myCellPicker->GetCellId();
- if( aVtkId >= 0 && mySelector->IsValid( this, aVtkId ) ) {
- int anObjId = GetElemObjId( aVtkId );
- if( anObjId >= 0 ) {
- if ( hasIO() && CheckDimensionId(aSelectionMode,this,anObjId) ) {
- mySelector->AddOrRemoveIndex( myIO, anObjId, anIsShift );
- mySelector->AddIObject( this );
- }
- }
- }
- break;
- }
- case EdgeOfCellSelection:
- {
- SVTK::TPickLimiter aPickLimiter( myCellPicker, this );
- myCellPicker->Pick( x, y, z, aRenderer );
-
- int aVtkId = myCellPicker->GetCellId();
- if( aVtkId >= 0 && mySelector->IsValid( this, aVtkId ) ) {
- int anObjId = GetElemObjId( aVtkId );
- if( anObjId >= 0 ) {
- int anEdgeId = GetEdgeId(this,myCellPicker.GetPointer(),anObjId);
- if( hasIO() && anEdgeId < 0 ) {
- mySelector->AddOrRemoveIndex( myIO, anObjId, false );
- mySelector->AddOrRemoveIndex( myIO, anEdgeId, true );
- mySelector->AddIObject( this );
- }
- }
- }
- break;
- }
- case ActorSelection :
- {
- if ( hasIO() ) {
- if( mySelector->IsSelected( myIO ) && anIsShift )
- mySelector->RemoveIObject( this );
- else {
- mySelector->AddIObject( this );
- }
- }
- break;
- }
- default:
- break;
- }
- }else{
- vtkFloatingPointType xLast = theSelectionEvent->myLastX;
- vtkFloatingPointType yLast = theSelectionEvent->myLastY;
- vtkFloatingPointType zLast = 0.0;