]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Merging from branch For_CTH_V12
authorouv <ouv@opencascade.com>
Mon, 8 Sep 2008 07:44:35 +0000 (07:44 +0000)
committerouv <ouv@opencascade.com>
Mon, 8 Sep 2008 07:44:35 +0000 (07:44 +0000)
src/VTKViewer/VTKViewer_Actor.cxx
src/VTKViewer/VTKViewer_ConvexTool.cxx
src/VTKViewer/VTKViewer_GeometryFilter.cxx
src/VTKViewer/VTKViewer_ShrinkFilter.cxx
src/VTKViewer/VTKViewer_Utilities.cxx

index 5c65df651e9af2a7568725a23f388ed2269345cb..985e05920a33259b978d58ef370bfa1b7f7c8580 100755 (executable)
@@ -77,7 +77,8 @@ VTKViewer_Actor
   myIsResolveCoincidentTopology(true),
   myStoreMapping(false),
   myGeomFilter(VTKViewer_GeometryFilter::New()),
-  myTransformFilter(VTKViewer_TransformFilter::New())
+  myTransformFilter(VTKViewer_TransformFilter::New()),
+  myOpacity( 1. )
 {
   vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor,
                                                                 myPolygonOffsetUnits);
index 0689ab67aef41c6bebcae46b0758a824725c86e8..68a6ec3b3779705753ea53973c1b7749559ef22b 100644 (file)
@@ -32,9 +32,9 @@
 #include <set>
 #include <map>
 
-#ifdef WIN32
+//#ifdef WIN32
 #include <algorithm>
-#endif
+//#endif
 
 #include <vtkUnstructuredGrid.h>
 #include <vtkGeometryFilter.h>
index 3d6182e96292a3728780c2d937093f38bd210fa9..3067379557f9585c7b0c8e36a4fd5a5f40f5c47b 100755 (executable)
@@ -912,7 +912,8 @@ VTKViewer_GeometryFilter
 
 vtkIdType VTKViewer_GeometryFilter::GetElemObjId( int theVtkID )
 {
-  if( myVTK2ObjIds.empty() || theVtkID > (int)myVTK2ObjIds.size() )
+// RKV  if( myVTK2ObjIds.empty() || theVtkID > (int)myVTK2ObjIds.size() )
+  if( myVTK2ObjIds.empty() || theVtkID >= (int)myVTK2ObjIds.size() ) // RKV
     return -1;
 #if defined __GNUC_2__
   return myVTK2ObjIds[theVtkID];
index 3391c08c7cad9eae79e8ad96d46edcdf39466f8a..8751cd5eb9c8f6bb86b71b8cf22ca8384b4cd368 100755 (executable)
@@ -185,5 +185,5 @@ vtkIdType VTKViewer_ShrinkFilter::GetNodeObjId(int theVtkID)
 {
   if ( myVTK2ObjIds.empty() || theVtkID > (int)myVTK2ObjIds.size() )
     return -1;
-  return myVTK2ObjIds.at(theVtkID);
+  return myVTK2ObjIds[theVtkID];
 }
index 09b7642363244dcf98a10192fc24b02e18368ac6..9133ee012af0979757be2cceedf8f85fd5b15ac9 100755 (executable)
@@ -316,36 +316,4 @@ bool ComputeBBCenter(vtkRenderer* theRenderer, vtkFloatingPointType theCenter[3]
   }
 
   return false;
-
-  /*
-  vtkFloatingPointType aBounds[6];
-  int aCount = ComputeVisiblePropBounds(theRenderer,aBounds);
-  printf("aNewBndBox[0] = %f, aNewBndBox[1] = %f,\naNewBndBox[2] = %f, aNewBndBox[3] = %f,\naNewBndBox[4] = %f, aNewBndBox[5] = %f\n",
-          aBounds[0],aBounds[1],aBounds[2],aBounds[3],aBounds[4],aBounds[5]);
-  printf("aCount = %d\n",aCount);
-
-  if(aCount){
-    static vtkFloatingPointType MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT;
-
-    vtkFloatingPointType aLength = aBounds[1]-aBounds[0];
-    aLength = max((aBounds[3]-aBounds[2]),aLength);
-    aLength = max((aBounds[5]-aBounds[4]),aLength);
-    
-    if(aLength < MIN_DISTANCE)
-      return false;
-
-    vtkFloatingPointType aWidth = 
-      sqrt((aBounds[1]-aBounds[0])*(aBounds[1]-aBounds[0]) +
-          (aBounds[3]-aBounds[2])*(aBounds[3]-aBounds[2]) +
-          (aBounds[5]-aBounds[4])*(aBounds[5]-aBounds[4]));
-    
-    if(aWidth < MIN_DISTANCE)
-      return false;
-
-    theCenter[0] = (aBounds[0] + aBounds[1])/2.0;
-    theCenter[1] = (aBounds[2] + aBounds[3])/2.0;
-    theCenter[2] = (aBounds[4] + aBounds[5])/2.0;
-    return true;
-  }
-  return false;*/
 }