]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Implementation of the "21459: EDF 1495 SMESH: Manipulation of discrete elements with...
authorrnv <rnv@opencascade.com>
Fri, 28 Sep 2012 11:01:10 +0000 (11:01 +0000)
committerrnv <rnv@opencascade.com>
Fri, 28 Sep 2012 11:01:10 +0000 (11:01 +0000)
src/SVTK/SALOME_Actor.cxx
src/SVTK/SVTK_Selection.h

index 8af1876fc9af1cfd43cc2c387f896f431d57bdce..74c57f9e9ee5f8d95d026c9323a8681c1e3ee134 100644 (file)
@@ -108,7 +108,7 @@ namespace
                    SALOME_Actor *theActor, 
                    vtkIdType theObjId)
   {
-    switch(theMode){
+    switch(theMode) {
     case CellSelection:
       return true;
     case EdgeSelection:
@@ -117,6 +117,15 @@ namespace
       return ( theActor->GetObjDimension( theObjId ) == 2 );
     case VolumeSelection:
       return ( theActor->GetObjDimension( theObjId ) == 3 );
+    case Elem0DSelection:        
+      return ((theActor->GetObjDimension( theObjId ) == 0) &&
+               theActor->GetElemCell(theObjId) && 
+              (theActor->GetElemCell(theObjId)->GetCellType() == VTK_VERTEX));
+    case BallSelection:
+      return ((theActor->GetObjDimension( theObjId ) == 0) &&
+               theActor->GetElemCell(theObjId) && 
+              (theActor->GetElemCell(theObjId)->GetCellType() == VTK_POLY_VERTEX));
+
     };
     return false;
   }
@@ -442,6 +451,8 @@ SALOME_Actor
       case EdgeSelection:
       case FaceSelection:
       case VolumeSelection:
+      case Elem0DSelection: 
+      case BallSelection: 
         myHighlightActor->GetProperty()->SetRepresentationToSurface();
         myHighlightActor->MapCells( this, aMapIndex );
         break;
@@ -538,6 +549,8 @@ SALOME_Actor
     case EdgeSelection:
     case FaceSelection:
     case VolumeSelection: 
+    case Elem0DSelection:        
+    case BallSelection: 
     {
       SVTK::TPickLimiter aPickLimiter( myCellPicker, this );
       myCellPicker->Pick( x, y, z, aRenderer );
@@ -675,6 +688,8 @@ SALOME_Actor
     case EdgeSelection:
     case FaceSelection:
     case VolumeSelection: 
+    case Elem0DSelection:        
+    case BallSelection: 
     {
       SVTK::TPickLimiter aPickLimiter( myCellPicker, this );
       myCellPicker->Pick( x, y, z, aRenderer );
@@ -798,6 +813,8 @@ SALOME_Actor
     case EdgeSelection:
     case FaceSelection:
     case VolumeSelection: 
+    case Elem0DSelection:        
+    case BallSelection: 
     {
       SVTK::TPickLimiter aPickLimiter( myCellRectPicker, this );
       myCellRectPicker->Pick( x1, y1, z1, x2, y2, z2, aRenderer );
index a985fc397f9612b568807bbe5d7e7f637001e051..92d86fde8b882b303c8caa2e86d467c1cb181fe9 100644 (file)
@@ -38,6 +38,8 @@ const Selection_Mode EdgeSelection = 3;
 const Selection_Mode FaceSelection = 4;
 const Selection_Mode VolumeSelection = 5;
 const Selection_Mode ActorSelection = 6;
+const Selection_Mode Elem0DSelection = 7;
+const Selection_Mode BallSelection = 8;
 
 
 #endif