From 162cad8beefefc071b3432437108d1afd11d118a Mon Sep 17 00:00:00 2001 From: ouv Date: Mon, 8 Sep 2008 07:44:35 +0000 Subject: [PATCH] Merging from branch For_CTH_V12 --- src/VTKViewer/VTKViewer_Actor.cxx | 3 +- src/VTKViewer/VTKViewer_ConvexTool.cxx | 4 +-- src/VTKViewer/VTKViewer_GeometryFilter.cxx | 3 +- src/VTKViewer/VTKViewer_ShrinkFilter.cxx | 2 +- src/VTKViewer/VTKViewer_Utilities.cxx | 32 ---------------------- 5 files changed, 7 insertions(+), 37 deletions(-) diff --git a/src/VTKViewer/VTKViewer_Actor.cxx b/src/VTKViewer/VTKViewer_Actor.cxx index 5c65df651..985e05920 100755 --- a/src/VTKViewer/VTKViewer_Actor.cxx +++ b/src/VTKViewer/VTKViewer_Actor.cxx @@ -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); diff --git a/src/VTKViewer/VTKViewer_ConvexTool.cxx b/src/VTKViewer/VTKViewer_ConvexTool.cxx index 0689ab67a..68a6ec3b3 100644 --- a/src/VTKViewer/VTKViewer_ConvexTool.cxx +++ b/src/VTKViewer/VTKViewer_ConvexTool.cxx @@ -32,9 +32,9 @@ #include #include -#ifdef WIN32 +//#ifdef WIN32 #include -#endif +//#endif #include #include diff --git a/src/VTKViewer/VTKViewer_GeometryFilter.cxx b/src/VTKViewer/VTKViewer_GeometryFilter.cxx index 3d6182e96..306737955 100755 --- a/src/VTKViewer/VTKViewer_GeometryFilter.cxx +++ b/src/VTKViewer/VTKViewer_GeometryFilter.cxx @@ -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]; diff --git a/src/VTKViewer/VTKViewer_ShrinkFilter.cxx b/src/VTKViewer/VTKViewer_ShrinkFilter.cxx index 3391c08c7..8751cd5eb 100755 --- a/src/VTKViewer/VTKViewer_ShrinkFilter.cxx +++ b/src/VTKViewer/VTKViewer_ShrinkFilter.cxx @@ -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]; } diff --git a/src/VTKViewer/VTKViewer_Utilities.cxx b/src/VTKViewer/VTKViewer_Utilities.cxx index 09b764236..9133ee012 100755 --- a/src/VTKViewer/VTKViewer_Utilities.cxx +++ b/src/VTKViewer/VTKViewer_Utilities.cxx @@ -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;*/ } -- 2.39.2