]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Merge from BR_PORTING_VTK6 01/03/2013 V7_1_0b1
authorvsr <vsr@opencascade.com>
Fri, 1 Mar 2013 13:05:59 +0000 (13:05 +0000)
committervsr <vsr@opencascade.com>
Fri, 1 Mar 2013 13:05:59 +0000 (13:05 +0000)
76 files changed:
adm_local/cmake_files/deprecated/FindVTK.cmake
configure.ac
src/SALOME_PY/Makefile.am
src/SVTK/Makefile.am
src/SVTK/SALOME_Actor.cxx
src/SVTK/SALOME_Actor.h
src/SVTK/SVTK_Actor.cxx
src/SVTK/SVTK_CubeAxesActor2D.cxx
src/SVTK/SVTK_CubeAxesActor2D.h
src/SVTK/SVTK_CubeAxesDlg.cxx
src/SVTK/SVTK_DeviceActor.cxx
src/SVTK/SVTK_DeviceActor.h
src/SVTK/SVTK_ImageWriter.cxx
src/SVTK/SVTK_ImageWriter.h
src/SVTK/SVTK_ImageWriterMgr.cxx
src/SVTK/SVTK_ImageWriterMgr.h
src/SVTK/SVTK_InteractorStyle.cxx
src/SVTK/SVTK_InteractorStyle.h
src/SVTK/SVTK_Recorder.cxx
src/SVTK/SVTK_Recorder.h
src/SVTK/SVTK_RectPicker.cxx
src/SVTK/SVTK_RectPicker.h
src/SVTK/SVTK_Renderer.cxx
src/SVTK/SVTK_Renderer.h
src/SVTK/SVTK_SetRotationPointDlg.cxx
src/SVTK/SVTK_SetRotationPointDlg.h
src/SVTK/SVTK_UpdateRateDlg.cxx
src/SVTK/SVTK_UpdateRateDlg.h
src/SVTK/SVTK_View.cxx
src/SVTK/SVTK_ViewModel.cxx
src/SVTK/SVTK_ViewModel.h
src/SVTK/SVTK_ViewParameterDlg.cxx
src/SVTK/SVTK_ViewParameterDlg.h
src/SVTK/SVTK_ViewWindow.cxx
src/SVTK/SVTK_ViewWindow.h
src/SVTK/vtkPVAxesActor.cxx
src/SVTK/vtkPVAxesActor.h
src/SVTK/vtkPVAxesWidget.cxx
src/SVTK/vtkPVAxesWidget.h
src/VTKViewer/Makefile.am
src/VTKViewer/VTKViewer.h
src/VTKViewer/VTKViewer_Actor.cxx
src/VTKViewer/VTKViewer_Actor.h
src/VTKViewer/VTKViewer_AppendFilter.cxx
src/VTKViewer/VTKViewer_AppendFilter.h
src/VTKViewer/VTKViewer_ArcBuilder.cxx
src/VTKViewer/VTKViewer_ArcBuilder.h
src/VTKViewer/VTKViewer_CellCenters.cxx
src/VTKViewer/VTKViewer_CellCenters.h
src/VTKViewer/VTKViewer_CellLocationsArray.h
src/VTKViewer/VTKViewer_ConvexTool.cxx
src/VTKViewer/VTKViewer_ConvexTool.h
src/VTKViewer/VTKViewer_DataSetMapper.cxx
src/VTKViewer/VTKViewer_DataSetMapper.h
src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx
src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.h
src/VTKViewer/VTKViewer_FramedTextActor.cxx
src/VTKViewer/VTKViewer_FramedTextActor.h
src/VTKViewer/VTKViewer_GeometryFilter.cxx
src/VTKViewer/VTKViewer_GeometryFilter.h
src/VTKViewer/VTKViewer_InteractorStyle.cxx
src/VTKViewer/VTKViewer_InteractorStyle.h
src/VTKViewer/VTKViewer_MarkerUtils.cxx
src/VTKViewer/VTKViewer_PolyDataMapper.cxx
src/VTKViewer/VTKViewer_PolyDataMapper.h
src/VTKViewer/VTKViewer_RenderWindow.cxx
src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx
src/VTKViewer/VTKViewer_ShrinkFilter.cxx
src/VTKViewer/VTKViewer_ShrinkFilter.h
src/VTKViewer/VTKViewer_Trihedron.cxx
src/VTKViewer/VTKViewer_Trihedron.h
src/VTKViewer/VTKViewer_Utilities.cxx
src/VTKViewer/VTKViewer_Utilities.h
src/VTKViewer/VTKViewer_ViewWindow.cxx
tools/vtkEDFOverloads/vtkEDFCutter.cxx
tools/vtkEDFOverloads/vtkEDFCutter.h

index 4e0871c89316d07b0b5914bc9244fa9bba55707e..ee3b3b99d5bf1ee71a929c2b5fd15c1e67c8a39e 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(FindVTK)
-
-SET(VTK_INCLUDES)
-FOREACH(dir ${VTK_INCLUDE_DIRS})
-  SET(VTK_INCLUDES ${VTK_INCLUDES} -I${dir})
-ENDFOREACH(dir ${VTK_INCLUDE_DIRS})
-
-SET(VTK_LIBS)
-FIND_LIBRARY(VTK_COMMON vtkCommon PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH)
-SET(VTK_LIBS ${VTK_LIBS} ${VTK_COMMON})
-FIND_LIBRARY(VTK_GRAPHICS vtkGraphics PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH)
-SET(VTK_LIBS ${VTK_LIBS} ${VTK_GRAPHICS})
-FIND_LIBRARY(VTK_IMAGING vtkImaging PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH)
-SET(VTK_LIBS ${VTK_LIBS} ${VTK_IMAGING})
-FIND_LIBRARY(VTK_FILTERING vtkFiltering PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH)
-SET(VTK_LIBS ${VTK_LIBS} ${VTK_FILTERING})
-FIND_LIBRARY(VTK_IO vtkIO PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH)
-SET(VTK_LIBS ${VTK_LIBS} ${VTK_IO})
-FIND_LIBRARY(VTK_RENDERING vtkRendering PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH)
-SET(VTK_LIBS ${VTK_LIBS} ${VTK_RENDERING})
-FIND_LIBRARY(VTK_HYBRID vtkHybrid PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH)
-SET(VTK_LIBS ${VTK_LIBS} ${VTK_HYBRID})
-FIND_LIBRARY(VTK_PARALLEL vtkParallel PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH)
-SET(VTK_LIBS ${VTK_LIBS} ${VTK_PARALLEL})
-FIND_LIBRARY(VTK_WIDGETS vtkWidgets PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH)
-SET(VTK_LIBS ${VTK_LIBS} ${VTK_WIDGETS})
-FIND_LIBRARY(VTK_GENERIC_FILTERING vtkGenericFiltering PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH)
-SET(VTK_LIBS ${VTK_LIBS} ${VTK_GENERIC_FILTERING})
-FIND_LIBRARY(VTK_INFOVIS vtkInfovis PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH)
-SET(VTK_LIBS ${VTK_LIBS} ${VTK_INFOVIS})
-FIND_LIBRARY(VTK_VOLUME_RENDERING vtkVolumeRendering PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH)
-SET(VTK_LIBS ${VTK_LIBS} ${VTK_VOLUME_RENDERING})
-
-FIND_LIBRARY(vtkCommonPythonD vtkCommonPythonD PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH)
-FIND_LIBRARY(vtkGraphicsPythonD vtkGraphicsPythonD PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH)
-FIND_LIBRARY(vtkImagingPythonD vtkImagingPythonD PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH)
-FIND_LIBRARY(vtkPythonCore vtkPythonCore PATHS ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH)
-
-
-#IF(NOT WINDOWS)
-#  IF(VTK_MAJOR_VERSION STREQUAL 5)
-#    IF(VTK_MINOR_VERSION STREQUAL 0)
-#      SET(VTK_INCLUDES ${VTK_INCLUDES} -Wno-deprecated)
-#    ENDIF(VTK_MINOR_VERSION STREQUAL 0)
-#  ENDIF(VTK_MAJOR_VERSION STREQUAL 5)
-#ENDIF(NOT WINDOWS)
-
-SET(VTK_INCLUDES ${VTK_INCLUDES} -DVTK_EXCLUDE_STRSTREAM_HEADERS)
-SET(VTK_DEFINITIONS -DVTK_EXCLUDE_STRSTREAM_HEADERS)
\ No newline at end of file
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7 FATAL_ERROR)
+FIND_PACKAGE(VTK 6.0 REQUIRED NO_MODULE)
+INCLUDE(${VTK_USE_FILE})
index 2f2b435a3c7f6827ad7ce9ad86dc5cd535785657..49ace52fb8744dfc636b7b6c6dae8e4c500211f2 100644 (file)
@@ -323,7 +323,7 @@ echo testing VTK
 echo ---------------------------------------------
 echo
 
-CHECK_VTK
+CHECK_PYVTK
 
 echo
 echo ---------------------------------------------
index a9292e6b3012d04d428fc4a2a7927d17e4092b11..222d066504d0d58957f32531e0a159546815623f 100755 (executable)
@@ -38,6 +38,5 @@ libSalomePy_la_CPPFLAGS = $(QT_INCLUDES) $(PYTHON_INCLUDES) $(VTK_INCLUDES) \
        -I$(srcdir)/../STD -I$(srcdir)/../VTKViewer -I$(srcdir)/../OBJECT \
        @CAS_CPPFLAGS@ 
 
-libSalomePy_la_LDFLAGS = $(PYTHON_LIBS) $(QT_MT_LIBS) $(VTK_LIBS) $(OGL_LIBS) \
-       ../LightApp/libLightApp.la \
-       -lvtkCommonPythonD -lvtkGraphicsPythonD -lvtkImagingPythonD -lvtkPythonCore
+libSalomePy_la_LDFLAGS = $(PYTHON_LIBS) $(QT_MT_LIBS) $(VTK_LIBS) ${VTK_PYLIBS} $(OGL_LIBS) \
+       ../LightApp/libLightApp.la
index ad697f4fae752ab2b2447610f49eafd69dc57286..e11dfa66c57665e98d36a008b7f846e4ece52ba4 100755 (executable)
@@ -148,7 +148,8 @@ libSVTK_la_CPPFLAGS =               \
        -I$(srcdir)/../OBJECT   \
        -I$(srcdir)/../Prs      \
        -I$(srcdir)/../VTKViewer \
-       -I$(srcdir)/../OpenGLUtils
+       -I$(srcdir)/../OpenGLUtils \
+       -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingOpenGL,vtkRenderingFreeTypeOpenGL)"
 
 libSVTK_la_LDFLAGS =                   \
        $(VTK_LIBS) $(OGL_LIBS)         \
index 74c57f9e9ee5f8d95d026c9323a8681c1e3ee134..e6a89d09805909952664c684c9cad80e09c5cfcc 100644 (file)
@@ -84,13 +84,13 @@ namespace
   {
     int anEdgeId = 0;
     if (vtkCell* aPickedCell = theActor->GetElemCell(theObjId)) {
-      vtkFloatingPointType aPickPosition[3];
+      double aPickPosition[3];
       thePicker->GetPickPosition(aPickPosition);
-      vtkFloatingPointType aMinDist = 1000000.0, aDist = 0;
+      double aMinDist = 1000000.0, aDist = 0;
       for (int i = 0, iEnd = aPickedCell->GetNumberOfEdges(); i < iEnd; i++){
         if(vtkLine* aLine = vtkLine::SafeDownCast(aPickedCell->GetEdge(i))){
           int subId;  
-          vtkFloatingPointType pcoords[3], closestPoint[3], weights[3];
+          double pcoords[3], closestPoint[3], weights[3];
           aLine->EvaluatePosition(aPickPosition,closestPoint,subId,pcoords,aDist,weights);
           if (aDist < aMinDist) {
             aMinDist = aDist;
@@ -185,7 +185,7 @@ SALOME_Actor
   myOutline->Delete();
 
   vtkPolyDataMapper* anOutlineMapper = vtkPolyDataMapper::New();
-  anOutlineMapper->SetInput(myOutline->GetOutput());
+  anOutlineMapper->SetInputConnection(myOutline->GetOutputPort());
 
   myOutlineActor->Delete();
   myOutlineActor->SetMapper( anOutlineMapper );
@@ -212,7 +212,7 @@ SALOME_Actor
                                   aForegroundColor.greenF(),
                                   aForegroundColor.blueF());
 
-  vtkFloatingPointType aGroupNamesTransparency = 0.5;
+  double aGroupNamesTransparency = 0.5;
   aGroupNamesTransparency = aResourceMgr->doubleValue( "VTKViewer", "group_names_transparency", aGroupNamesTransparency );
   myNameActor->SetTransparency(aGroupNamesTransparency);
 }
@@ -357,9 +357,9 @@ SALOME_Actor
 */
 void
 SALOME_Actor
-::SetPosition(vtkFloatingPointType _arg1, 
-              vtkFloatingPointType _arg2, 
-              vtkFloatingPointType _arg3)
+::SetPosition(double _arg1, 
+              double _arg2, 
+              double _arg3)
 {
   Superclass::SetPosition(_arg1,_arg2,_arg3);
 
@@ -373,7 +373,7 @@ SALOME_Actor
 */
 void
 SALOME_Actor
-::SetPosition(vtkFloatingPointType _arg[3])
+::SetPosition(double _arg[3])
 {
   SetPosition(_arg[0],_arg[1],_arg[2]);
 }
@@ -471,10 +471,11 @@ void
 SALOME_Actor
 ::highlight(bool theIsHighlight)
 {
-  vtkFloatingPointType aBounds[6];
+  double aBounds[6];
   vtkDataSet * aDataSet = GetHighlightedDataSet();
   aDataSet->GetBounds(aBounds);
   myOutline->SetBounds(aBounds);
+  myOutline->Update();
   myOutlineActor->SetVisibility( GetVisibility() && theIsHighlight );
 
   Superclass::highlight(theIsHighlight);
@@ -504,9 +505,9 @@ SALOME_Actor
 
   myPreHighlightActor->SetMarkerEnabled( aSelectionMode == NodeSelection );
 
-  vtkFloatingPointType x = theSelectionEvent->myX;
-  vtkFloatingPointType y = theSelectionEvent->myY;
-  vtkFloatingPointType z = 0.0;
+  double x = theSelectionEvent->myX;
+  double y = theSelectionEvent->myY;
+  double z = 0.0;
 
   if( !theIsHighlight ) {
     if ( hasIO() ) {
@@ -664,9 +665,9 @@ SALOME_Actor
 
   myHighlightActor->SetMarkerEnabled( aSelectionMode == NodeSelection );
 
-  vtkFloatingPointType x = theSelectionEvent->myX;
-  vtkFloatingPointType y = theSelectionEvent->myY;
-  vtkFloatingPointType z = 0.0;
+  double x = theSelectionEvent->myX;
+  double y = theSelectionEvent->myY;
+  double z = 0.0;
 
   if( !theSelectionEvent->myIsRectangle ) {
     switch(aSelectionMode){
@@ -740,16 +741,16 @@ SALOME_Actor
       break;
     }
   }else{
-    vtkFloatingPointType xLast = theSelectionEvent->myLastX;
-    vtkFloatingPointType yLast = theSelectionEvent->myLastY;
-    vtkFloatingPointType zLast = 0.0;
+    double xLast = theSelectionEvent->myLastX;
+    double yLast = theSelectionEvent->myLastY;
+    double zLast = 0.0;
 
-    vtkFloatingPointType x1 = x < xLast ? x : xLast;
-    vtkFloatingPointType y1 = y < yLast ? y : yLast;
-    vtkFloatingPointType z1 = z < zLast ? z : zLast;
-    vtkFloatingPointType x2 = x > xLast ? x : xLast;
-    vtkFloatingPointType y2 = y > yLast ? y : yLast;
-    vtkFloatingPointType z2 = z > zLast ? z : zLast;
+    double x1 = x < xLast ? x : xLast;
+    double y1 = y < yLast ? y : yLast;
+    double z1 = z < zLast ? z : zLast;
+    double x2 = x > xLast ? x : xLast;
+    double y2 = y > yLast ? y : yLast;
+    double z2 = z > zLast ? z : zLast;
 
     switch(aSelectionMode){
     case NodeSelection: {
@@ -785,8 +786,8 @@ SALOME_Actor
     }
     case ActorSelection :
     {
-      vtkFloatingPointType aPnt[3];
-      vtkFloatingPointType* aBounds = GetBounds();
+      double aPnt[3];
+      double* aBounds = GetBounds();
 
       bool anIsPicked = true;
       for( int i = 0; i <= 1; i++ ) {
index bb86575c7bcc7016a991637132825937869c6bcc..84a48c4b433ab235758e073c9f143dedf3d2aab2 100644 (file)
@@ -106,14 +106,14 @@ class SVTK_EXPORT SALOME_Actor : public VTKViewer_Actor
   //! Apply additional position
   virtual
   void
-  SetPosition(vtkFloatingPointType _arg1, 
-              vtkFloatingPointType _arg2, 
-              vtkFloatingPointType _arg3);
+  SetPosition(double _arg1, 
+              double _arg2, 
+              double _arg3);
 
   //! Apply additional position
   virtual
   void
-  SetPosition(vtkFloatingPointType _arg[3]);
+  SetPosition(double _arg[3]);
 
   //----------------------------------------------------------------------------
   //! Visibility management
index 0155b629a94f532e04538253dc08979ba957582e..3180a5c60191f15cdf635c28d49f6ec165965dc5 100644 (file)
@@ -157,7 +157,7 @@ SVTK_Actor
     aPoints->SetNumberOfPoints(aNbOfParts);
     for(vtkIdType i = 0; i < aNbOfParts; i++){
       int aPartId = theMapIndex( i+1 );
-      if(vtkFloatingPointType* aCoord = theMapActor->GetNodeCoord(aPartId)){
+      if(double* aCoord = theMapActor->GetNodeCoord(aPartId)){
         aPoints->SetPoint(i,aCoord);
         // Change the type from int to vtkIdType in order to avoid compilation errors while using VTK
         // from ParaView-3.4.0 compiled on 64-bit Debian platform with VTK_USE_64BIT_IDS = ON
index 0364c257affd4ddb7e89bb834fc4e1bba2735f56..8c2f75d7c1e86ab2a31768b66ed36103aaf21eca 100644 (file)
@@ -43,7 +43,6 @@
 #include <vtkProperty.h>
 #include <vtkProperty2D.h>
 
-vtkCxxRevisionMacro(SVTK_CubeAxesActor2D, "$Revision$");
 vtkStandardNewMacro(SVTK_CubeAxesActor2D);
 
 // Instantiate this object.
@@ -61,9 +60,9 @@ SVTK_CubeAxesActor2D::SVTK_CubeAxesActor2D()
   this->rgridMapperYZ = vtkPolyDataMapper::New();
   this->rgridMapperXZ = vtkPolyDataMapper::New();
 
-  this->rgridMapperXY->SetInput(this->planeXY->GetOutput());
-  this->rgridMapperYZ->SetInput(this->planeYZ->GetOutput());
-  this->rgridMapperXZ->SetInput(this->planeXZ->GetOutput());
+  this->rgridMapperXY->SetInputConnection(this->planeXY->GetOutputPort());
+  this->rgridMapperYZ->SetInputConnection(this->planeYZ->GetOutputPort());
+  this->rgridMapperXZ->SetInputConnection(this->planeXZ->GetOutputPort());
 
   this->wireActorXY->SetMapper(rgridMapperXY);
   this->wireActorYZ->SetMapper(rgridMapperYZ);
@@ -192,13 +191,13 @@ int SVTK_CubeAxesActor2D::RenderOverlay(vtkViewport *viewport)
   return renderedSomething;
 }
 
-static void ChangeValues(vtkFloatingPointType* aArray1,
-                         vtkFloatingPointType* aArray2,
-                         vtkFloatingPointType *aRange1,
-                         vtkFloatingPointType* aRange2,
+static void ChangeValues(double* aArray1,
+                         double* aArray2,
+                         double *aRange1,
+                         double* aRange2,
                          bool theY)
 {
-  vtkFloatingPointType tmp=-1000;
+  double tmp=-1000;
   if (!theY){
     for (int i=0; i<4; i++){
       tmp = aArray1[i]; aArray1[i] = aArray2[i]; aArray2[i] = tmp;
@@ -218,12 +217,12 @@ static void ChangeValues(vtkFloatingPointType* aArray1,
   }
 }
 
-static void ChangeArrays(vtkFloatingPointType* xCoords,
-                         vtkFloatingPointType* yCoords,
-                         vtkFloatingPointType* zCoords,
-                         vtkFloatingPointType* xRange,
-                         vtkFloatingPointType* yRange,
-                         vtkFloatingPointType* zRange,
+static void ChangeArrays(double* xCoords,
+                         double* yCoords,
+                         double* zCoords,
+                         double* xRange,
+                         double* yRange,
+                         double* zRange,
                          const int xAxes,
                          const int yAxes, 
                          const int zAxes)
@@ -249,8 +248,8 @@ static void ChangeArrays(vtkFloatingPointType* xCoords,
 // with the boundary of the viewport (minus borders).
 int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
 {
-  vtkFloatingPointType bounds[6], slope = 0.0, minSlope, num, den;
-  vtkFloatingPointType pts[8][3], d2, d2Min, min;
+  double bounds[6], slope = 0.0, minSlope, num, den;
+  double pts[8][3], d2, d2Min, min;
   int i, idx = 0;
   int xIdx, yIdx = 0, zIdx = 0, zIdx2, renderedSomething=0;
   int xAxes = 0, yAxes, zAxes;
@@ -308,7 +307,7 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
       }
     else
       {
-      vtkFloatingPointType e1[2], e2[2], e3[2];
+      double e1[2], e2[2], e3[2];
 
       // Find distance to origin
       d2Min = VTK_LARGE_FLOAT;
@@ -401,7 +400,7 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
     }
 
   // Setup the axes for plotting
-  vtkFloatingPointType xCoords[4], yCoords[4], zCoords[4], xRange[2], yRange[2], zRange[2];
+  double xCoords[4], yCoords[4], zCoords[4], xRange[2], yRange[2], zRange[2];
   this->AdjustAxes(pts, bounds, idx, xIdx, yIdx, zIdx, zIdx2, 
                    xAxes, yAxes, zAxes, 
                    xCoords, yCoords, zCoords, xRange, yRange, zRange);
@@ -445,19 +444,19 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
   // XCoords coordinates for X grid
   vtkFloatArray *XCoords = vtkFloatArray::New();
   for(int i=0;i<numOfLabelsX;i++){
-    vtkFloatingPointType val = bounds[0]+i*(bounds[1]-bounds[0])/(numOfLabelsX-1);
+    double val = bounds[0]+i*(bounds[1]-bounds[0])/(numOfLabelsX-1);
     XCoords->InsertNextValue(val);
   }
   // YCoords coordinates for Y grid
   vtkFloatArray *YCoords = vtkFloatArray::New();
   for(int i=0;i<numOfLabelsX;i++){
-    vtkFloatingPointType val = bounds[2]+i*(bounds[3]-bounds[2])/(numOfLabelsY-1);
+    double val = bounds[2]+i*(bounds[3]-bounds[2])/(numOfLabelsY-1);
     YCoords->InsertNextValue(val);
   }
   // ZCoords coordinates for Z grid
   vtkFloatArray *ZCoords = vtkFloatArray::New();
   for(int i=0;i<numOfLabelsZ;i++){
-    vtkFloatingPointType val = bounds[4]+i*(bounds[5]-bounds[4])/(numOfLabelsZ-1);
+    double val = bounds[4]+i*(bounds[5]-bounds[4])/(numOfLabelsZ-1);
     ZCoords->InsertNextValue(val);
   }
 
@@ -467,14 +466,14 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
   rgrid->SetYCoordinates(YCoords);
   rgrid->SetZCoordinates(ZCoords);
 
-  this->planeXY->SetInput(rgrid);
-  this->planeYZ->SetInput(rgrid);
-  this->planeXZ->SetInput(rgrid);
+  this->planeXY->SetInputData(rgrid);
+  this->planeYZ->SetInputData(rgrid);
+  this->planeXZ->SetInputData(rgrid);
 
   rgrid->Delete();
 
-  vtkFloatingPointType aCPosition[3];
-  vtkFloatingPointType aCDirection[3];
+  double aCPosition[3];
+  double aCDirection[3];
   this->Camera->GetPosition(aCPosition);
   this->Camera->GetDirectionOfProjection(aCDirection);
 
@@ -482,12 +481,12 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
   bool replaceXY=false;
   bool replaceYZ=false;
   bool replaceXZ=false;
-  vtkFloatingPointType p[6][3]; // centers of planes
-  vtkFloatingPointType vecs[6][3]; // 6 vectors from camera position to centers
+  double p[6][3]; // centers of planes
+  double vecs[6][3]; // 6 vectors from camera position to centers
 
-  vtkFloatingPointType aMiddleX = (XCoords->GetValue(0) + XCoords->GetValue(numOfLabelsX-1))/2;
-  vtkFloatingPointType aMiddleY = (YCoords->GetValue(0) + YCoords->GetValue(numOfLabelsY-1))/2;
-  vtkFloatingPointType aMiddleZ = (ZCoords->GetValue(0) + ZCoords->GetValue(numOfLabelsZ-1))/2;
+  double aMiddleX = (XCoords->GetValue(0) + XCoords->GetValue(numOfLabelsX-1))/2;
+  double aMiddleY = (YCoords->GetValue(0) + YCoords->GetValue(numOfLabelsY-1))/2;
+  double aMiddleZ = (ZCoords->GetValue(0) + ZCoords->GetValue(numOfLabelsZ-1))/2;
 
   // plane XY
   p[0][0] = aMiddleX; // plane X=0.5 Y=0.5 Z=0
@@ -539,7 +538,7 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
   YCoords->Delete();
   ZCoords->Delete();
 
-  vtkFloatingPointType color[3];
+  double color[3];
 
   this->GetProperty()->GetColor(color);
   this->wireActorXY->GetProperty()->SetColor(color);
index 51b315903c23802ae14a358997e811bc945b1396..aa8d021e801d03c44a1f922be3800dc340480cdb 100644 (file)
@@ -47,13 +47,13 @@ class VTKViewer_Transform;
 #endif
 
 #ifndef WIN32
-class VTK_HYBRID_EXPORT SVTK_CubeAxesActor2D : public vtkCubeAxesActor2D
+class VTKRENDERINGANNOTATION_EXPORT SVTK_CubeAxesActor2D : public vtkCubeAxesActor2D
 #else
 class SVTK_EXPORT SVTK_CubeAxesActor2D : public vtkCubeAxesActor2D
 #endif
 {
 public:
-  vtkTypeRevisionMacro(SVTK_CubeAxesActor2D,vtkCubeAxesActor2D);
+  vtkTypeMacro(SVTK_CubeAxesActor2D,vtkCubeAxesActor2D);
 
   // Description:
   // Instantiate object with bold, italic, and shadow enabled; font family
index 74788d8782db74f3ed1cd15e6b1113db09368093..250d21fa7452319a84515046788a43f05cdab246 100644 (file)
@@ -89,7 +89,7 @@ bool SVTK_AxisWidget::ReadData(vtkAxisActor2D* theActor)
   vtkTextProperty* aTitleProp = theActor->GetTitleTextProperty();
   if (aTitleProp !=0)
   {
-    vtkFloatingPointType c[ 3 ];
+    double c[ 3 ];
     aTitleProp->GetColor(c);
     aTitleColor.setRgb((int)(c[ 0 ] * 255), (int)(c[ 1 ] * 255), (int)(c[ 2 ] * 255));
     aTitleFontFamily = aTitleProp->GetFontFamily();
@@ -117,7 +117,7 @@ bool SVTK_AxisWidget::ReadData(vtkAxisActor2D* theActor)
   vtkTextProperty* aLabelsProp = theActor->GetLabelTextProperty();
   if (aLabelsProp !=0)
   {
-    vtkFloatingPointType c[ 3 ];
+    double c[ 3 ];
     aLabelsProp->GetColor(c);
     aLabelsColor.setRgb((int)(c[ 0 ] * 255), (int)(c[ 1 ] * 255), (int)(c[ 2 ] * 255));
     aLabelsFontFamily = aLabelsProp->GetFontFamily();
index 4a803ccc54a1b94372a651f5135cb578e0595b38..9b15c76f5fe51f93ab6f767f017473e2826d6383 100644 (file)
@@ -120,29 +120,25 @@ SVTK_DeviceActor
 {
   if(theMapper){
     int anId = 0;
-    myPassFilter[ anId ]->SetInput( theMapper->GetInput() );
-    myPassFilter[ anId + 1]->SetInput( myPassFilter[ anId ]->GetOutput() );
+    myPassFilter[ anId ]->SetInputData( theMapper->GetInput() );
+    myPassFilter[ anId + 1]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
     
     anId++; // 1
-    myGeomFilter->SetInput( myPassFilter[ anId ]->GetOutput() );
+    myGeomFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
 
     anId++; // 2
-    myPassFilter[ anId ]->SetInput( myGeomFilter->GetOutput() ); 
-    myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() );
+    myPassFilter[ anId ]->SetInputConnection( myGeomFilter->GetOutputPort() ); 
+    myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
 
     anId++; // 3
-    myTransformFilter->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+    myTransformFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
 
     anId++; // 4
-    myPassFilter[ anId ]->SetInput( myTransformFilter->GetOutput() );
-    myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() );
+    myPassFilter[ anId ]->SetInputConnection( myTransformFilter->GetOutputPort() );
+    myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
 
     anId++; // 5
-    if(VTKViewer_DataSetMapper* aMapper = dynamic_cast<VTKViewer_DataSetMapper*>(theMapper)){
-      aMapper->SetInput(myPassFilter[anId]->GetOutput());
-    }else if(VTKViewer_PolyDataMapper* aMapper = dynamic_cast<VTKViewer_PolyDataMapper*>(theMapper)){
-      aMapper->SetInput(myPassFilter[anId]->GetPolyDataOutput());
-    }
+    theMapper->SetInputConnection(myPassFilter[anId]->GetOutputPort());
   }
   Superclass::SetMapper(theMapper);
 }
@@ -164,7 +160,7 @@ void
 SVTK_DeviceActor
 ::SetInput(vtkDataSet* theDataSet)
 {
-  myMapper->SetInput(theDataSet);
+  myMapper->SetInputData(theDataSet);
   InitPipeLine(myMapper);
 }
 
@@ -256,16 +252,19 @@ SVTK_DeviceActor
   if ( !myIsShrinkable ) 
     return;
   
-  if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() )
+  if ( vtkAlgorithmOutput* anOutput = myPassFilter[ 0 ]->GetOutputPort() )
   {     
-    aDataSet->Update();
-    int numCells=aDataSet->GetNumberOfCells();
-    int numPts = aDataSet->GetNumberOfPoints();
-    //It's impossible to use to apply "shrink" for "empty" dataset
-    if (numCells < 1 || numPts < 1)
-            return;
-    myShrinkFilter->SetInput( aDataSet );
-    myPassFilter[ 1 ]->SetInput( myShrinkFilter->GetOutput() );
+    myPassFilter[ 0 ]->Update();
+    if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() )
+    {
+      int numCells=aDataSet->GetNumberOfCells();
+      int numPts = aDataSet->GetNumberOfPoints();
+      //It's impossible to use to apply "shrink" for "empty" dataset
+      if (numCells < 1 || numPts < 1)
+        return;
+    }
+    myShrinkFilter->SetInputConnection( anOutput );
+    myPassFilter[ 1 ]->SetInputConnection( myShrinkFilter->GetOutputPort() );
     myIsShrunk = true;
   }
 }
@@ -278,9 +277,9 @@ SVTK_DeviceActor
 ::UnShrink() 
 {
   if ( !myIsShrunk ) return;
-  if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() )
+  if ( vtkAlgorithmOutput* anOutput = myPassFilter[ 0 ]->GetOutputPort() )
   {    
-    myPassFilter[ 1 ]->SetInput( aDataSet );
+    myPassFilter[ 1 ]->SetInputConnection( anOutput );
     myIsShrunk = false;
   }
 }
@@ -288,7 +287,7 @@ SVTK_DeviceActor
 /*!
   \return shrink factor
 */
-vtkFloatingPointType
+double
 SVTK_DeviceActor
 ::GetShrinkFactor()
 {
@@ -301,7 +300,7 @@ SVTK_DeviceActor
 */
 void 
 SVTK_DeviceActor
-::SetShrinkFactor(vtkFloatingPointType theValue)
+::SetShrinkFactor(double theValue)
 {
   myShrinkFilter->SetShrinkFactor(theValue);
 }
@@ -348,18 +347,18 @@ SVTK_DeviceActor
   if ( !myIsFeatureEdgesAllowed || myIsFeatureEdgesEnabled == theIsFeatureEdgesEnabled ) 
     return;
 
-  if ( vtkPolyData* aPolyData = myPassFilter[ 2 ]->GetPolyDataOutput() )
+  if ( vtkAlgorithmOutput* aPolyData = myPassFilter[ 2 ]->GetOutputPort() )
   {
     if( theIsFeatureEdgesEnabled )
     {
-      aPolyData->Update();
-      myFeatureEdges->SetInput( aPolyData );
-      myPassFilter[ 3 ]->SetInput( myFeatureEdges->GetOutput() );
+      myPassFilter[ 2 ]->Update();
+      myFeatureEdges->SetInputConnection( aPolyData );
+      myPassFilter[ 3 ]->SetInputConnection( myFeatureEdges->GetOutputPort() );
       myIsFeatureEdgesEnabled = true;
     }
     else
     {
-      myPassFilter[3]->SetInput( aPolyData );
+      myPassFilter[3]->SetInputConnection( aPolyData );
       myIsFeatureEdgesEnabled = false;
     }
     myIsFeatureEdgesEnabled = theIsFeatureEdgesEnabled;
@@ -369,7 +368,7 @@ SVTK_DeviceActor
 /*!
   \return angle of feature edges' filter
 */
-vtkFloatingPointType
+double
 SVTK_DeviceActor
 ::GetFeatureEdgesAngle()
 {
@@ -382,7 +381,7 @@ SVTK_DeviceActor
 */
 void
 SVTK_DeviceActor
-::SetFeatureEdgesAngle(vtkFloatingPointType theAngle)
+::SetFeatureEdgesAngle(double theAngle)
 {
   myFeatureEdges->SetFeatureAngle(theAngle);
 }
@@ -525,7 +524,7 @@ SVTK_DeviceActor
 /*!
   \return default point size
 */
-vtkFloatingPointType
+double
 SVTK_DeviceActor
 ::GetDefaultPointSize()
 {
@@ -535,7 +534,7 @@ SVTK_DeviceActor
 /*!
   \return default line width
 */
-vtkFloatingPointType
+double
 SVTK_DeviceActor
 ::GetDefaultLineWidth()
 {
@@ -576,7 +575,7 @@ SVTK_DeviceActor
 /*!
   Get coordinates of a node for given object index
 */
-vtkFloatingPointType* 
+double* 
 SVTK_DeviceActor
 ::GetNodeCoord(int theObjID)
 {
@@ -613,7 +612,7 @@ SVTK_DeviceActor
 {
   if(myIsResolveCoincidentTopology){
     int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology();
-    vtkFloatingPointType aFactor, aUnit; 
+    double aFactor, aUnit; 
     vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
     
     vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
@@ -634,8 +633,8 @@ SVTK_DeviceActor
 */
 void
 SVTK_DeviceActor
-::SetPolygonOffsetParameters(vtkFloatingPointType factor, 
-                             vtkFloatingPointType units)
+::SetPolygonOffsetParameters(double factor, 
+                             double units)
 {
   myPolygonOffsetFactor = factor;
   myPolygonOffsetUnits = units;
@@ -647,8 +646,8 @@ SVTK_DeviceActor
 */
 void
 SVTK_DeviceActor
-::GetPolygonOffsetParameters(vtkFloatingPointType& factor, 
-                             vtkFloatingPointType& units)
+::GetPolygonOffsetParameters(double& factor, 
+                             double& units)
 {
   factor = myPolygonOffsetFactor;
   units = myPolygonOffsetUnits;
@@ -675,14 +674,14 @@ bool SVTK_DeviceActor::GetQuadraticArcMode(){
 /*!
  * Set Max angle for representation 2D quadratic element as arked polygon
  */
-void SVTK_DeviceActor::SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle){
+void SVTK_DeviceActor::SetQuadraticArcAngle(double theMaxAngle){
   myGeomFilter->SetQuadraticArcAngle(theMaxAngle);
 }
 
 /*!
  * Return Max angle of the representation 2D quadratic element as arked polygon
  */
-vtkFloatingPointType SVTK_DeviceActor::GetQuadraticArcAngle(){
+double SVTK_DeviceActor::GetQuadraticArcAngle(){
   return myGeomFilter->GetQuadraticArcAngle();
 }
 
index 681f25263a7525427cff173d2aa349b9ab187779..366ed9ae4cc8deaa9cc986f4371cf9016c5d112b 100644 (file)
@@ -88,7 +88,7 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor
   GetNodeObjId(int theVtkID);
 
   virtual
-  vtkFloatingPointType* 
+  double* 
   GetNodeCoord(int theObjID);
 
   virtual
@@ -111,12 +111,12 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor
 
   /** @name For shrink mamnagement purpose */
   //@{
-  vtkFloatingPointType
+  double
   GetShrinkFactor();
 
   virtual 
   void  
-  SetShrinkFactor(vtkFloatingPointType value);
+  SetShrinkFactor(double value);
 
   virtual
   void
@@ -156,12 +156,12 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor
   SetFeatureEdgesEnabled(bool theIsFeatureEdgesEnabled);
 
   virtual
-  vtkFloatingPointType
+  double
   GetFeatureEdgesAngle();
 
   virtual
   void
-  SetFeatureEdgesAngle(vtkFloatingPointType theAngle); 
+  SetFeatureEdgesAngle(double theAngle); 
 
   virtual
   void
@@ -194,11 +194,11 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor
   GetRepresentation();
 
   virtual
-  vtkFloatingPointType
+  double
   GetDefaultPointSize();
 
   virtual
-  vtkFloatingPointType
+  double
   GetDefaultLineWidth();
 
   bool
@@ -239,8 +239,8 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor
   virtual void SetQuadraticArcMode(bool theFlag);
   virtual bool GetQuadraticArcMode();
 
-  virtual void SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle);
-  virtual vtkFloatingPointType GetQuadraticArcAngle();
+  virtual void SetQuadraticArcAngle(double theMaxAngle);
+  virtual double GetQuadraticArcAngle();
 
   virtual
   void
@@ -278,13 +278,13 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor
   bool myIsFeatureEdgesEnabled;
 
   bool myIsResolveCoincidentTopology;
-  vtkFloatingPointType myPolygonOffsetFactor;
-  vtkFloatingPointType myPolygonOffsetUnits;
+  double myPolygonOffsetFactor;
+  double myPolygonOffsetUnits;
 
-  void SetPolygonOffsetParameters(vtkFloatingPointType factor, 
-                                  vtkFloatingPointType units);
-  void GetPolygonOffsetParameters(vtkFloatingPointType& factor, 
-                                  vtkFloatingPointType& units);
+  void SetPolygonOffsetParameters(double factor, 
+                                  double units);
+  void GetPolygonOffsetParameters(double& factor, 
+                                  double& units);
 
   SVTK_DeviceActor();
   ~SVTK_DeviceActor();
index 581111ba6dfd65678fa688634b722e482d2efde5..87b9680cdb453613d75a6cce586600632bca0067 100755 (executable)
@@ -21,6 +21,7 @@
 
 #include <QSemaphore>
 
+#include <vtkAlgorithm.h>
 #include <vtkImageData.h>
 #include <vtkImageClip.h>
 #include <vtkJPEGWriter.h>
@@ -36,11 +37,13 @@ static int MYDEBUG = 0;
 //----------------------------------------------------------------------------
 SVTK_ImageWriter
 ::SVTK_ImageWriter(QSemaphore* theSemaphore,
+                   vtkAlgorithm* theAlgorithm,
                    vtkImageData* theImageData,
                    const std::string& theName,
                    int theProgressive,
                    int theQuality):
   mySemaphore(theSemaphore),
+  myAlgorithm(theAlgorithm),
   myImageData(theImageData),
   myName(theName),
   myProgressive(theProgressive),
@@ -62,13 +65,13 @@ SVTK_ImageWriter
 ::run()
 {
   vtkJPEGWriter *aWriter = vtkJPEGWriter::New();
-  vtkImageData *anImageData = myImageData;
+  vtkAlgorithmOutput *anImageData = 0;
   vtkSmartPointer<vtkImageClip> anImageClip;
   //
   if(myConstraint16Flag){ 
     int uExtent[6];
-    myImageData->UpdateInformation();
-    myImageData->GetUpdateExtent(uExtent);
+    myAlgorithm->UpdateInformation();
+    myAlgorithm->GetUpdateExtent(uExtent);
     unsigned int width = uExtent[1] - uExtent[0] + 1;
     unsigned int height = uExtent[3] - uExtent[2] + 1;
     width = (width / 16) * 16;
@@ -79,17 +82,20 @@ SVTK_ImageWriter
     anImageClip = vtkImageClip::New();
     anImageClip->Delete();
 
-    anImageClip->SetInput(myImageData);
+    anImageClip->SetInputData(myImageData);
     anImageClip->SetOutputWholeExtent(uExtent);
     anImageClip->ClipDataOn();
-    anImageData = anImageClip->GetOutput();
+    anImageData = anImageClip->GetOutputPort();
   }
   //
   aWriter->WriteToMemoryOff();
   aWriter->SetFileName(myName.c_str());
   aWriter->SetQuality(myQuality);
   aWriter->SetProgressive(myProgressive);
-  aWriter->SetInput(anImageData);
+  if(myConstraint16Flag)
+    aWriter->SetInputConnection(anImageData);
+  else
+    aWriter->SetInputData(myImageData);
   aWriter->Write();
 
   aWriter->Delete();
index 5973b9f44baf55948253c355f61859e71d61cc96..2ca2f9ca0b49e1fc8073209214b4d74f81adc953 100755 (executable)
@@ -23,6 +23,7 @@
 #include <QThread>
 #include <string>
 
+class vtkAlgorithm;
 class vtkImageData;
 class QSemaphore;
 
@@ -30,6 +31,7 @@ class SVTK_ImageWriter : public QThread
 {
 public:
   SVTK_ImageWriter(QSemaphore* theSemaphore,
+                   vtkAlgorithm* theAlgorithm,
                    vtkImageData* theImageData,
                    const std::string& theName,
                    int theProgressive,
@@ -44,6 +46,7 @@ public:
   
  protected:
   QSemaphore* mySemaphore;
+  vtkAlgorithm *myAlgorithm;
   vtkImageData *myImageData;
   std::string myName;
   int   myProgressive;
index 22e7b97ba7957953894e455f1f5d689758483653..97e0717e293617987f29dbbd7484225e7efa4368 100755 (executable)
@@ -20,6 +20,7 @@
 #include "SVTK_ImageWriterMgr.h"
 #include "SVTK_ImageWriter.h"
 
+#include <vtkAlgorithm.h>
 #include <vtkImageData.h>
 
 #include <QSemaphore>
@@ -58,13 +59,15 @@ SVTK_ImageWriterMgr
 //----------------------------------------------------------------------------
 void
 SVTK_ImageWriterMgr
-::StartImageWriter(vtkImageData *theImageData,
+::StartImageWriter(vtkAlgorithm *theAlgorithm,
+                   vtkImageData *theImageData,
                    const std::string& theName,
                    const int theProgressive,
                    const int theQuality)
 {
   SVTK_ImageWriter *anImageWriter = 
     new SVTK_ImageWriter(mySemaphore,
+                         theAlgorithm,
                          theImageData,
                          theName,
                          theProgressive,
index 86a4459463576a15f020a0364da15cc349967eed..09a909bd25a78b8842f8bcc9d5e3a16d525c141c 100755 (executable)
@@ -24,6 +24,7 @@
 #include <vector>
 
 class QString;
+class vtkAlgorithm;
 class vtkImageData;
 class SVTK_ImageWriter;
 class QSemaphore;
@@ -35,7 +36,8 @@ class SVTK_ImageWriterMgr
   ~SVTK_ImageWriterMgr();
   
   void
-  StartImageWriter(vtkImageData *theImageData,
+  StartImageWriter(vtkAlgorithm *theAlgorithm,
+                   vtkImageData *theImageData,
                    const std::string& theName,
                    const int theProgressive,
                    const int theQuality);
index 40b784cf91a44c77afaa34728ff37a432215591a..db068bbbefdeb15084503d4ee6984e9ff56267fa 100644 (file)
@@ -224,7 +224,7 @@ void SVTK_InteractorStyle::RotateXY(int dx, int dy)
 
   if ( myCurrRotationPointType == SVTK::SetRotateGravity )
   {
-    vtkFloatingPointType aCenter[3];
+    double aCenter[3];
     if ( ComputeBBCenter(GetCurrentRenderer(),aCenter) ) 
     {
       myRotationPointX = aCenter[0];
@@ -511,7 +511,7 @@ void SVTK_InteractorStyle::OnLeftButtonDown(int ctrl, int shift,
             if ( aVtkId >= 0 )
             {
               int anObjId = anActor->GetNodeObjId( aVtkId );
-              vtkFloatingPointType* aCoords = anActor->GetNodeCoord(anObjId);
+              double* aCoords = anActor->GetNodeCoord(anObjId);
               
               if (myCurrRotationPointType == SVTK::StartPointSelection) {
                 myCurrRotationPointType = SVTK::SetRotateSelected;
@@ -810,7 +810,7 @@ void SVTK_InteractorStyle::startPointSelection()
 
   if(GetCurrentRenderer() != NULL) {
     GetCurrentRenderer()->AddActor( myHighlightSelectionPointActor.GetPointer() );
-    vtkFloatingPointType aColor[3];
+    double aColor[3];
     GetCurrentRenderer()->GetBackground( aColor );
     myHighlightSelectionPointActor->GetProperty()->SetColor(1. - aColor[0],
                                                             1. - aColor[1],
@@ -829,7 +829,7 @@ void SVTK_InteractorStyle::startFocalPointSelection()
 
   if(GetCurrentRenderer() != NULL) {
     GetCurrentRenderer()->AddActor( myHighlightSelectionPointActor.GetPointer() );
-    vtkFloatingPointType aColor[3];
+    double aColor[3];
     GetCurrentRenderer()->GetBackground( aColor );
     myHighlightSelectionPointActor->GetProperty()->SetColor(1. - aColor[0],
                                                             1. - aColor[1],
@@ -1313,7 +1313,7 @@ void SVTK_InteractorStyle::TranslateView(int toX, int toY, int fromX, int fromY)
 
   vtkCamera *cam = GetCurrentRenderer()->GetActiveCamera();
   double viewFocus[4], focalDepth, viewPoint[3];
-  vtkFloatingPointType newPickPoint[4], oldPickPoint[4], motionVector[3];
+  double newPickPoint[4], oldPickPoint[4], motionVector[3];
   cam->GetFocalPoint(viewFocus);
 
   this->ComputeWorldToDisplay(viewFocus[0], viewFocus[1],
@@ -1414,7 +1414,7 @@ void SVTK_InteractorStyle::OnTimer()
   // check if bounding box was changed
   if ( GetCurrentRenderer() )
   {
-    vtkFloatingPointType aCurrBBCenter[3];
+    double aCurrBBCenter[3];
     if ( ComputeBBCenter(GetCurrentRenderer(),aCurrBBCenter) )
     {
       if ( !myBBFirstCheck )
@@ -1516,8 +1516,8 @@ void SVTK_InteractorStyle::ProcessEvents( vtkObject* object,
     vtkObject* anObject = reinterpret_cast<vtkObject*>( clientData );
     SVTK_InteractorStyle* self = dynamic_cast<SVTK_InteractorStyle*>( anObject );
     int aSpeedIncrement=self->ControllerIncrement()->Current();
-    vtkFloatingPointType aCenter[3];
-    vtkFloatingPointType* aSelectedPoint;
+    double aCenter[3];
+    double* aSelectedPoint;
     if ( self ) {
       switch ( event ) {
       case SVTK::SpaceMouseMoveEvent : 
@@ -1620,7 +1620,7 @@ void SVTK_InteractorStyle::ProcessEvents( vtkObject* object,
         }
         self->myPrevRotationPointType = self->myCurrRotationPointType;
         self->myCurrRotationPointType = SVTK::SetRotateSelected;
-        aSelectedPoint = (vtkFloatingPointType*)callData;
+        aSelectedPoint = (double*)callData;
         self->myRotationPointX = aSelectedPoint[0];
         self->myRotationPointY = aSelectedPoint[1];
         self->myRotationPointZ = aSelectedPoint[2];
index 38c7278a7ba8979220e2be9404f1898d5b16f516..e862ee9b2be6f3e487dab33a0f33ed153fd22fcf 100644 (file)
@@ -354,7 +354,7 @@ class SVTK_EXPORT SVTK_InteractorStyle: public vtkInteractorStyle
   vtkSmartPointer<SVTK_Actor>     myHighlightSelectionPointActor;
   vtkSmartPointer<vtkPointPicker> myPointPicker;
   
-  vtkFloatingPointType            myBBCenter[3];
+  double            myBBCenter[3];
   bool                            myBBFirstCheck;
 
   QRubberBand*                    myRectBand; //!< selection rectangle rubber band
index 0be0147b3995793612310677d48c8f1289e9c000..666c4b6e69c3eaec0bd1c58fde248d86bbd39c05 100755 (executable)
@@ -68,7 +68,6 @@ namespace
 }
 
 //----------------------------------------------------------------------------
-vtkCxxRevisionMacro(SVTK_Recorder,"$Revision$");
 vtkStandardNewMacro(SVTK_Recorder);
 
 
@@ -376,7 +375,7 @@ SVTK_Recorder
   vtkImageData *anImageData = vtkImageData::New(); 
   anImageData->DeepCopy(myFilter->GetOutput());
 
-  myWriterMgr->StartImageWriter(anImageData,aName,myProgressiveMode,myQuality);
+  myWriterMgr->StartImageWriter(myFilter,anImageData,aName,myProgressiveMode,myQuality);
   myNbWrittenFrames++;
 
   myRenderWindow->AddObserver(vtkCommand::EndEvent,
@@ -396,12 +395,9 @@ SVTK_Recorder
     myErrorStatus = 20;
     return;
   }
-  anImageData->UpdateInformation();
-  int *anExtent = anImageData->GetWholeExtent();
-  anImageData->SetUpdateExtent(anExtent[0], anExtent[1],
-                               anExtent[2], anExtent[3],
-                               0,0);
-  anImageData->UpdateData();
+  myFilter->UpdateInformation();
+  myFilter->SetUpdateExtentToWholeExtent();
+  myFilter->Update();
 }
 
 
index bfc2aaced5e2c822fc3ba876258c0fa878abd343..1bf26644264b8eddee8ea6bfb03b02b24ad0185f 100755 (executable)
@@ -42,7 +42,7 @@ class SVTK_Recorder : public vtkObject
   
  public:
   static SVTK_Recorder *New();
-  vtkTypeRevisionMacro(SVTK_Recorder,vtkObject);
+  vtkTypeMacro(SVTK_Recorder,vtkObject);
 
   void
   SetRenderWindow(vtkRenderWindow* theRenderWindow);
index 77640da9dfb25848443216f8087ca546e09b232b..820ed717fcbe4d4baf7a0869474c7776d27c0ed3 100644 (file)
@@ -51,7 +51,7 @@ namespace
 {
   //----------------------------------------------------------------------------
   inline
-  vtkFloatingPointType
+  double
   GetZ(float* theZPtr,
        int theSelection[4],
        int theDX,
@@ -66,13 +66,13 @@ namespace
   int
   Check(float* theZPtr,
         int theSelection[4],
-        vtkFloatingPointType theTolerance,
-        vtkFloatingPointType theDZ,
+        double theTolerance,
+        double theDZ,
         int theDX,
         int theDY)
   {
     int aRet = 0;
-    vtkFloatingPointType aZ = -1.0;
+    double aZ = -1.0;
     if(theDX >= theSelection[0] && theDX <= theSelection[2] &&
        theDY >= theSelection[1] && theDY <= theSelection[3])
     {
@@ -97,7 +97,7 @@ namespace
                       vtkDataSet *theInput,
                       SVTK_RectPicker::TVectorIds& theVisibleIds,
                       SVTK_RectPicker::TVectorIds& theInVisibleIds,
-                      vtkFloatingPointType theTolerance)
+                      double theTolerance)
   {
     theVisibleIds.clear();
     theInVisibleIds.clear();
@@ -140,10 +140,10 @@ namespace
 
     for(vtkIdType aPntId = 0; aPntId < aNumPts; aPntId++){
       // perform conversion
-      vtkFloatingPointType aX[4] = {1.0, 1.0, 1.0, 1.0};
+      double aX[4] = {1.0, 1.0, 1.0, 1.0};
       theInput->GetPoint(aPntId,aX);
 
-      vtkFloatingPointType aView[4];
+      double aView[4];
       aMatrix->MultiplyPoint(aX,aView);
       if(aView[3] == 0.0)
         continue;
@@ -152,7 +152,7 @@ namespace
                                 aView[2]/aView[3]);
       theRenderer->ViewToDisplay();
 
-      vtkFloatingPointType aDX[3];
+      double aDX[3];
       theRenderer->GetDisplayPoint(aDX);
       
       // check whether visible and in selection window 
@@ -218,8 +218,8 @@ namespace
   //----------------------------------------------------------------------------
   inline
   void
-  GetCenter(const vtkFloatingPointType theBounds[6],
-            vtkFloatingPointType theCenter[3])
+  GetCenter(const double theBounds[6],
+            double theCenter[3])
   {
     theCenter[0] = (theBounds[1] + theBounds[0]) / 2.0;
     theCenter[1] = (theBounds[3] + theBounds[2]) / 2.0;
@@ -231,7 +231,7 @@ namespace
                      vtkRenderer *theRenderer,
                      vtkDataSet *theInput,
                      SVTK_RectPicker::TVectorIds& theVectorIds,
-                     vtkFloatingPointType theTolerance)
+                     double theTolerance)
   {
     theVectorIds.clear();
 
@@ -266,14 +266,14 @@ namespace
     for(vtkIdType aCellId = 0; aCellId < aNumCells; aCellId++){
       vtkCell* aCell = theInput->GetCell(aCellId);
 
-      vtkFloatingPointType aBounds[6];
+      double aBounds[6];
       aCell->GetBounds(aBounds);
 
-      vtkFloatingPointType aCenter[3];
+      double aCenter[3];
       GetCenter(aBounds,aCenter);
 
-      vtkFloatingPointType aView[4];
-      vtkFloatingPointType aX[4] = {aCenter[0], aCenter[1], aCenter[2], 1.0};
+      double aView[4];
+      double aX[4] = {aCenter[0], aCenter[1], aCenter[2], 1.0};
       aMatrix->MultiplyPoint(aX,aView);
 
       if(aView[3] == 0.0)
@@ -284,7 +284,7 @@ namespace
                                 aView[2]/aView[3]);
       theRenderer->ViewToDisplay();
 
-      vtkFloatingPointType aDX[3];
+      double aDX[3];
       theRenderer->GetDisplayPoint(aDX);
       
       // check whether visible and in selection window 
@@ -312,16 +312,16 @@ namespace
   //----------------------------------------------------------------------------
   void
   CalculatePickPosition(vtkRenderer *theRenderer,
-                        vtkFloatingPointType theSelectionX, 
-                        vtkFloatingPointType theSelectionY, 
-                        vtkFloatingPointType theSelectionZ,
-                        vtkFloatingPointType thePickPosition[3])
+                        double theSelectionX, 
+                        double theSelectionY, 
+                        double theSelectionZ,
+                        double thePickPosition[3])
   {
     // Convert the selection point into world coordinates.
     //
     theRenderer->SetDisplayPoint(theSelectionX, theSelectionY, theSelectionZ);
     theRenderer->DisplayToWorld();
-    vtkFloatingPointType* aWorldCoords = theRenderer->GetWorldPoint();
+    double* aWorldCoords = theRenderer->GetWorldPoint();
     if ( aWorldCoords[3] != 0.0 ) {
       for (int i=0; i < 3; i++) {
         thePickPosition[i] = aWorldCoords[i] / aWorldCoords[3];
@@ -345,9 +345,9 @@ SVTK_RectPicker
 
 int
 SVTK_RectPicker
-::Pick(vtkFloatingPointType, 
-       vtkFloatingPointType, 
-       vtkFloatingPointType, 
+::Pick(double, 
+       double, 
+       double, 
        vtkRenderer*)
 {
   return 0;
@@ -355,8 +355,8 @@ SVTK_RectPicker
 
 int
 SVTK_RectPicker
-::Pick(vtkFloatingPointType theSelection[3], 
-       vtkFloatingPointType theSelection2[3], 
+::Pick(double theSelection[3], 
+       double theSelection2[3], 
        vtkRenderer *theRenderer)
 {
   return Pick(theSelection[0], theSelection[1], theSelection[2], 
@@ -366,12 +366,12 @@ SVTK_RectPicker
 
 int 
 SVTK_RectPicker
-::Pick(vtkFloatingPointType theSelectionX, 
-       vtkFloatingPointType theSelectionY, 
-       vtkFloatingPointType theSelectionZ, 
-       vtkFloatingPointType theSelectionX2, 
-       vtkFloatingPointType theSelectionY2, 
-       vtkFloatingPointType theSelectionZ2,
+::Pick(double theSelectionX, 
+       double theSelectionY, 
+       double theSelectionZ, 
+       double theSelectionX2, 
+       double theSelectionY2, 
+       double theSelectionZ2,
        vtkRenderer *theRenderer)
 {
   //  Initialize picking process
@@ -385,14 +385,14 @@ SVTK_RectPicker
   //
   vtkCamera* aCamera = theRenderer->GetActiveCamera();
 
-  vtkFloatingPointType aCameraFP[4];
+  double aCameraFP[4];
   aCamera->GetFocalPoint(aCameraFP); 
   aCameraFP[3] = 1.0;
 
   theRenderer->SetWorldPoint(aCameraFP);
   theRenderer->WorldToDisplay();
-  vtkFloatingPointType* aDisplayCoords = theRenderer->GetDisplayPoint();
-  vtkFloatingPointType aSelectionZ = aDisplayCoords[2];
+  double* aDisplayCoords = theRenderer->GetDisplayPoint();
+  double aSelectionZ = aDisplayCoords[2];
 
   this->SelectionPoint[0] = theSelectionX;
   this->SelectionPoint[1] = theSelectionY;
index 1e9975e9467a4c674a79f848572a31badf15594e..7cede53219a062ac6a7c6609a00d2ec04251336b 100644 (file)
@@ -61,8 +61,8 @@ class SVTK_EXPORT SVTK_RectPicker : public vtkAbstractPropPicker
     as fraction of rendering window size. (Rendering window size is measured
     across diagonal.)
   */
-  vtkSetMacro(Tolerance,vtkFloatingPointType);
-  vtkGetMacro(Tolerance,vtkFloatingPointType);
+  vtkSetMacro(Tolerance,double);
+  vtkGetMacro(Tolerance,double);
 
   //! Use these methods to pick points or points and cells
   vtkSetMacro(PickPoints,int);
@@ -71,17 +71,17 @@ class SVTK_EXPORT SVTK_RectPicker : public vtkAbstractPropPicker
 
   virtual 
   int
-  Pick(vtkFloatingPointType theSelectionX, 
-       vtkFloatingPointType theSelectionY, 
-       vtkFloatingPointType theSelectionZ, 
-       vtkFloatingPointType theSelectionX2, 
-       vtkFloatingPointType theSelectionY2, 
-       vtkFloatingPointType theSelectionZ2,
+  Pick(double theSelectionX, 
+       double theSelectionY, 
+       double theSelectionZ, 
+       double theSelectionX2, 
+       double theSelectionY2, 
+       double theSelectionZ2,
        vtkRenderer *theRenderer);  
 
   int
-  Pick(vtkFloatingPointType theSelection[3], 
-       vtkFloatingPointType theSelection2[3], 
+  Pick(double theSelection[3], 
+       double theSelection2[3], 
        vtkRenderer *theRenderer);
 
   typedef std::vector<vtkIdType> TVectorIds;
@@ -98,16 +98,16 @@ class SVTK_EXPORT SVTK_RectPicker : public vtkAbstractPropPicker
   ~SVTK_RectPicker();
 
   //! tolerance for computation (% of window)
-  vtkFloatingPointType Tolerance;
+  double Tolerance;
 
   //! use the following to control picking mode
   int PickPoints;
 
   //! second rectangle selection point in window (pixel) coordinates
-  vtkFloatingPointType SelectionPoint2[3]; 
+  double SelectionPoint2[3]; 
 
   //! second rectangle selection point in world coordinates
-  vtkFloatingPointType PickPosition2[3]; 
+  double PickPosition2[3]; 
 
   TVectorIdsMap myPointIdsMap;
   TVectorIdsMap myCellIdsMap;
@@ -115,9 +115,9 @@ class SVTK_EXPORT SVTK_RectPicker : public vtkAbstractPropPicker
  private:
   virtual 
   int
-  Pick(vtkFloatingPointType, 
-       vtkFloatingPointType, 
-       vtkFloatingPointType, 
+  Pick(double, 
+       double, 
+       double, 
        vtkRenderer*);
 };
 
index 6584727de0fc0b63c587616a942a126021fd79ac..d0417b2d14180fd13373c26b60291f3ca9893a11 100644 (file)
@@ -382,7 +382,7 @@ SVTK_Renderer
 
 inline
 bool
-CheckBndBox(const vtkFloatingPointType theBounds[6])
+CheckBndBox(const double theBounds[6])
 {
   if(theBounds[0] > -VTK_LARGE_FLOAT && theBounds[1] < VTK_LARGE_FLOAT &&
      theBounds[2] > -VTK_LARGE_FLOAT && theBounds[3] < VTK_LARGE_FLOAT &&
@@ -401,7 +401,7 @@ SVTK_Renderer
   bool aTDisplayed = IsTrihedronDisplayed();
   bool aCDisplayed = IsCubeAxesDisplayed();
 
-  vtkFloatingPointType aNewBndBox[6];
+  double aNewBndBox[6];
   aNewBndBox[ 0 ] = aNewBndBox[ 2 ] = aNewBndBox[ 4 ] = VTK_LARGE_FLOAT;
   aNewBndBox[ 1 ] = aNewBndBox[ 3 ] = aNewBndBox[ 5 ] = -VTK_LARGE_FLOAT;
 
@@ -414,7 +414,7 @@ SVTK_Renderer
       myCubeAxes->VisibilityOff();
 
     // if the new trihedron size have sufficient difference, then apply the value
-    vtkFloatingPointType aSize = myTrihedron->GetSize();
+    double aSize = myTrihedron->GetSize();
     if ( IsTrihedronRelative() )
       {
         ComputeTrihedronSize(GetDevice(),aSize,aSize,myTrihedronSize);
@@ -432,7 +432,7 @@ SVTK_Renderer
         if(anActor->IsResizable())
           anActor->SetSize(0.5*aSize);
         if(anActor->GetVisibility() && !anActor->IsInfinitive()){
-          vtkFloatingPointType *aBounds = anActor->GetBounds();
+          double *aBounds = anActor->GetBounds();
           if(CheckBndBox(aBounds))
             for(int i = 0; i < 5; i = i + 2){
               if(aBounds[i] < aNewBndBox[i]) 
@@ -485,7 +485,7 @@ SVTK_Renderer
 */
 void
 SVTK_Renderer
-::SetTrihedronSize(vtkFloatingPointType theSize, const bool theRelative)
+::SetTrihedronSize(double theSize, const bool theRelative)
 {
   if(myTrihedronSize != theSize || myIsTrihedronRelative != theRelative){
     myTrihedronSize = theSize;
@@ -497,7 +497,7 @@ SVTK_Renderer
 /*!
   \return size of the trihedron in percents from bounding box of the scene
 */
-vtkFloatingPointType
+double
 SVTK_Renderer
 ::GetTrihedronSize() const
 {
@@ -629,7 +629,7 @@ SVTK_Renderer
   else
     myCubeAxes->VisibilityOff();
 
-  static vtkFloatingPointType aCoeff = 3.0;
+  static double aCoeff = 3.0;
   aCamera->SetParallelScale(aCoeff*aCamera->GetParallelScale());
 }
 
index edf79ada1cb9521716e3b6243326ab80cd4549db..b5725ddcd373c9ffd150ec8375b0be9ce107b99f 100644 (file)
@@ -130,10 +130,10 @@ class SVTK_EXPORT SVTK_Renderer : public vtkObject
 
   //! Set size of the trihedron in percents from bounding box of the scene
   void
-  SetTrihedronSize(vtkFloatingPointType theSize, const bool theRelative = true);
+  SetTrihedronSize(double theSize, const bool theRelative = true);
  
   //! Get size of the trihedron in percents from bounding box of the scene
-  vtkFloatingPointType  
+  double  
   GetTrihedronSize() const;
 
   //! Shows if the size of the trihedron is relative
@@ -218,7 +218,7 @@ protected:
 
   //----------------------------------------------------------------------------
   // Priority at which events are processed
-  vtkFloatingPointType myPriority;
+  double myPriority;
 
   // Used to process events
   vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
@@ -251,9 +251,9 @@ protected:
   //----------------------------------------------------------------------------
   vtkSmartPointer<SVTK_CubeAxesActor2D> myCubeAxes;
   vtkSmartPointer<VTKViewer_Trihedron> myTrihedron;  
-  vtkFloatingPointType myTrihedronSize;
+  double myTrihedronSize;
   bool myIsTrihedronRelative;
-  vtkFloatingPointType myBndBox[6];
+  double myBndBox[6];
 };
 
 #ifdef WIN32
index 174a6bae0d422fdb83f3867ad3080e5656b67f97..1fa5817e1f4a8c08117191b5cfa693b1194fbb99 100755 (executable)
@@ -211,7 +211,7 @@ SVTK_SetRotationPointDlg
                 void* theCallData)
 {
   SVTK_SetRotationPointDlg* self = reinterpret_cast<SVTK_SetRotationPointDlg*>(theClientData);
-  vtkFloatingPointType* aCoord = (vtkFloatingPointType*)theCallData;
+  double* aCoord = (double*)theCallData;
   
   switch ( theEvent ) {
   case SVTK::BBCenterChanged:
@@ -310,7 +310,7 @@ SVTK_SetRotationPointDlg
          &&
          ( myX->hasFocus() || myY->hasFocus() || myZ->hasFocus() ) )
       mySelectPoint->toggle();
-    vtkFloatingPointType aCenter[3] = {myX->text().toDouble(), 
+    double aCenter[3] = {myX->text().toDouble(), 
                                        myY->text().toDouble(), 
                                        myZ->text().toDouble()};
     myMainWindow->activateSetRotationSelected((void*)aCenter);
index ab49b055ad18daff4cd5cb860640a08850b1a37f..99ad41c759e5fef506ebfa7e4f7e8ac07ee72777 100755 (executable)
@@ -80,7 +80,7 @@ protected:
 
   //----------------------------------------------------------------------------
   // Priority at which events are processed
-  vtkFloatingPointType myPriority;
+  double myPriority;
 
   // Used to process events
   vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
index 48e580fa2a52f106fa29d0ceefa9ae98ae358f99..db86100bf69175735fbf688d96c5065c8f079f8d 100644 (file)
@@ -49,8 +49,8 @@
 #include <vtkMapper.h>
 #include <vtkDataSet.h>
 
-static vtkFloatingPointType OFF_UPDATE_RATE = 0.00001;
-static vtkFloatingPointType FLOAT_TOLERANCE = 1.0 / VTK_LARGE_FLOAT;
+static double OFF_UPDATE_RATE = 0.00001;
+static double FLOAT_TOLERANCE = 1.0 / VTK_LARGE_FLOAT;
 
 namespace
 {
@@ -60,10 +60,10 @@ namespace
   GetUpdateRate(SVTK_RenderWindowInteractor* theRWInteractor)
   {
     if(vtkRenderer *aRenderer = theRWInteractor->getRenderer()){
-      vtkFloatingPointType aLastRenderTimeInSeconds = aRenderer->GetLastRenderTimeInSeconds();
+      double aLastRenderTimeInSeconds = aRenderer->GetLastRenderTimeInSeconds();
       if(aLastRenderTimeInSeconds > FLOAT_TOLERANCE){
         std::ostringstream aStr;
-        vtkFloatingPointType aFPS = 1.0 / aLastRenderTimeInSeconds;
+        double aFPS = 1.0 / aLastRenderTimeInSeconds;
         aStr<<aFPS;
         return QString(aStr.str().c_str());
       }
@@ -75,8 +75,8 @@ namespace
   //----------------------------------------------------------------------------
   struct TRenderTimeMultiplier
   {
-    vtkFloatingPointType myVTKMultiplier;
-    vtkFloatingPointType mySALOMEMultiplier;
+    double myVTKMultiplier;
+    double mySALOMEMultiplier;
 
     TRenderTimeMultiplier():
       myVTKMultiplier(0.0),
@@ -97,9 +97,9 @@ namespace
 
   //----------------------------------------------------------------------------
   inline
-  vtkFloatingPointTyp
+  doubl
   AdjustUpdateRate(SVTK_RenderWindowInteractor* theRWInteractor,
-                   vtkFloatingPointType theUpdateRate)
+                   double theUpdateRate)
   {
     if(vtkRenderer *aRenderer = theRWInteractor->getRenderer()){
       VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
@@ -332,7 +332,7 @@ SVTK_UpdateRateDlg
 {
   vtkRenderWindowInteractor* aRWI = myRWInteractor->GetDevice();
 
-  vtkFloatingPointType anUpdateRate;
+  double anUpdateRate;
   if(myIsEnableUpdateRateGroupBox->isChecked()){
     anUpdateRate = AdjustUpdateRate(myRWInteractor,myDesiredUpdateRateSblSpinBox->value());
     aRWI->SetDesiredUpdateRate(anUpdateRate);
index 385a3874ffbe54ce72a413a33fcb0681329ffcb5..c698b3b8c6f422951c772a1e1461f85c4748ed2b 100644 (file)
@@ -70,7 +70,7 @@ protected:
 
   //----------------------------------------------------------------------------
   // Priority at which events are processed
-  vtkFloatingPointType myPriority;
+  double myPriority;
 
   // Used to process events
   vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
index 5f52ea604d4b424f7fb8c446b32c68e36c3f9498..23b2bcf85c6736a40a0e11222287aa9d8c7dc544 100644 (file)
@@ -691,12 +691,12 @@ SVTK_View
 ::SetTransparency(const Handle(SALOME_InteractiveObject)& theIObject, 
                   float theTrans)
 {
-  vtkFloatingPointType anOpacity = 1.0 - theTrans;
+  double anOpacity = 1.0 - theTrans;
   using namespace SVTK;
   VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors());
   ForEachIf<SALOME_Actor>(aCopy.GetActors(),
                           TIsSameIObject<SALOME_Actor>(theIObject),
-                          TSetFunction<SALOME_Actor,vtkFloatingPointType>
+                          TSetFunction<SALOME_Actor,double>
                           (&SALOME_Actor::SetOpacity,anOpacity));
 }
 
@@ -710,13 +710,13 @@ SVTK_View
 ::SetColor(const Handle(SALOME_InteractiveObject)& theIObject,
            const QColor& theColor) 
 {
-  vtkFloatingPointType aColor[3] = {theColor.red()/255., theColor.green()/255., theColor.blue()/255.};
+  double aColor[3] = {theColor.red()/255., theColor.green()/255., theColor.blue()/255.};
 
   using namespace SVTK;
   VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors());
   ForEachIf<SALOME_Actor>(aCopy.GetActors(),
                           TIsSameIObject<SALOME_Actor>(theIObject),
-                          TSetFunction<SALOME_Actor,const vtkFloatingPointType*>
+                          TSetFunction<SALOME_Actor,const double*>
                           (&SALOME_Actor::SetColor,aColor));
 }
 
@@ -735,7 +735,7 @@ SVTK_View
     Find<SALOME_Actor>(aCopy.GetActors(),
                        TIsSameIObject<SALOME_Actor>(theIObject));
   if(anActor){
-    vtkFloatingPointType r,g,b;
+    double r,g,b;
     anActor->GetColor(r,g,b);
     return QColor(int(r*255),int(g*255),int(b*255));
   }
index e8ab931714936dbd03c0c98f5aa104512782eef1..ce76997151e736c6136bf83b5f7db5fa1b2f6106 100644 (file)
@@ -193,7 +193,7 @@ SUIT_ViewWindow* SVTK_Viewer::createView( SUIT_Desktop* theDesktop )
 /*!
   \return trihedron size
 */
-vtkFloatingPointType SVTK_Viewer::trihedronSize() const
+double SVTK_Viewer::trihedronSize() const
 {
   return myTrihedronSize;
 }
@@ -211,7 +211,7 @@ bool SVTK_Viewer::trihedronRelative() const
   \param theSize - new size
   \param theRelative - new relativeness
 */
-void SVTK_Viewer::setTrihedronSize( const vtkFloatingPointType theSize, const bool theRelative )
+void SVTK_Viewer::setTrihedronSize( const double theSize, const bool theRelative )
 {
   myTrihedronSize = theSize;
   myTrihedronRelative = theRelative;
index b0671426579f64dee52375bc5cc0ef5b73b17a49..cea0ee1ab2ae10ba8c1b11bd0dae4768e69405e9 100644 (file)
@@ -93,13 +93,13 @@ public:
   void setBackground( const Qtx::BackgroundData& );
 
   //! Get size of trihedron of the viewer (see #SVTK_Renderer::SetTrihedronSize)
-  vtkFloatingPointType trihedronSize() const;
+  double trihedronSize() const;
 
   //! Shows if the size of trihedron relative (see #SVTK_Renderer::SetTrihedronSize)
   bool trihedronRelative() const;
 
   //! Set size of trihedron of the viewer (see #SVTK_Renderer::SetTrihedronSize)
-  void setTrihedronSize( const vtkFloatingPointType, const bool = true );
+  void setTrihedronSize( const double, const bool = true );
 
   //! Get visibility status of the static trihedron
   bool isStaticTrihedronVisible() const;
@@ -197,7 +197,7 @@ private:
   void updateToolBars();
 
   Qtx::BackgroundData  myDefaultBackground;
-  vtkFloatingPointType myTrihedronSize;
+  double myTrihedronSize;
   bool                 myTrihedronRelative;
   bool                 myIsStaticTrihedronVisible;
   bool                 mySelectionEnabled;
index c0a7091b4eeb3f622c0d64dcc7b8590394d3ad73..f004e62089c9877ce2feaa57680c3adf6ccc523c 100755 (executable)
@@ -414,12 +414,12 @@ void SVTK_ViewParameterDlg::ProcessEvents(vtkObject* vtkNotUsed(theObject),
                                           void* theCallData)
 {
   SVTK_ViewParameterDlg* self = reinterpret_cast<SVTK_ViewParameterDlg*>(theClientData);
-  vtkFloatingPointType* aCoord;
+  double* aCoord;
   switch ( theEvent ) {
   case SVTK::FocalPointChanged:
     if ( theCallData )
     {
-      aCoord = (vtkFloatingPointType*)theCallData;
+      aCoord = (double*)theCallData;
       self->myBusy = true;
       self->myFocalX->setText( QString::number(aCoord[0]) );
       self->myFocalY->setText( QString::number(aCoord[1]) );
index a4ef4fe285e980796df6ab8ddd813d0dc6b5cf40..3e20f87b72f1f387daf8d434b3f13c52cdf634b6 100755 (executable)
@@ -110,7 +110,7 @@ protected:
 
   //----------------------------------------------------------------------------
   // Priority at which events are processed
-  vtkFloatingPointType myPriority;
+  double myPriority;
 
   // Used to process events
   vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
index 271aa4c938e9e4809392a4ad2dbd9aeffce4b9f8..b93407e6835098dbce44f6d00e6d542b4b4d27d4 100755 (executable)
@@ -825,7 +825,7 @@ SVTK_CubeAxesActor2D* SVTK_ViewWindow::GetCubeAxes()
 /*!
   \return trihedron size
 */
-vtkFloatingPointType SVTK_ViewWindow::GetTrihedronSize() const
+double SVTK_ViewWindow::GetTrihedronSize() const
 {
   return GetRenderer()->GetTrihedronSize();
 }
@@ -992,7 +992,7 @@ void SVTK_ViewWindow::SetSpacemouseButtons(const int theBtn1,
   \param theSize - new trihedron size
   \param theRelative - trihedron relativeness
 */
-void SVTK_ViewWindow::SetTrihedronSize(const vtkFloatingPointType theSize, const bool theRelative)
+void SVTK_ViewWindow::SetTrihedronSize(const double theSize, const bool theRelative)
 {
   GetRenderer()->SetTrihedronSize(theSize, theRelative);
   Repaint();
@@ -1297,7 +1297,7 @@ void getGradAxisVisualParams( QXmlStreamWriter& writer, vtkAxisActor2D* actor, Q
   // Name
   bool isVisible = actor->GetTitleVisibility();
   QString title ( actor->GetTitle() );
-  vtkFloatingPointType color[ 3 ];
+  double color[ 3 ];
   int font = VTK_ARIAL;
   int bold = 0;
   int italic = 0;
@@ -1411,7 +1411,7 @@ void setGradAxisVisualParams(QXmlStreamReader& reader, vtkAxisActor2D* actor)
   // Read title color
   aAttr = reader.attributes();
 
-  vtkFloatingPointType color[3];
+  double color[3];
   color[0] = aAttr.value("R").toString().toDouble();
   color[1] = aAttr.value("G").toString().toDouble();
   color[2] = aAttr.value("B").toString().toDouble();
@@ -1493,7 +1493,7 @@ void setGradAxisVisualParams( vtkAxisActor2D* actor, const QString& params )
     // retrieve and set name parameters
     bool isVisible = paramsLst[2].toUShort();
     QString title = paramsLst[3];
-    vtkFloatingPointType color[3];
+    double color[3];
     color[0] = paramsLst[4].toDouble();
     color[1] = paramsLst[5].toDouble();
     color[2] = paramsLst[6].toDouble();
index abb6c0968d7dc2ce5a170405c97a2f9ec3fd9dc8..cd94e94bdb0d2157d129a38e2841006ee82e9585 100755 (executable)
@@ -216,10 +216,10 @@ class SVTK_EXPORT SVTK_ViewWindow : public SUIT_ViewWindow
   SVTK_CubeAxesActor2D* GetCubeAxes();
 
   //! Redirect the request to #SVTK_Renderer::GetTrihedronSize
-  vtkFloatingPointType GetTrihedronSize() const;
+  double GetTrihedronSize() const;
 
   //! Redirect the request to #SVTK_Renderer::SetTrihedronSize
-  virtual void SetTrihedronSize( const vtkFloatingPointType, const bool = true );
+  virtual void SetTrihedronSize( const double, const bool = true );
 
   //! Set incremental speed
   virtual void SetIncrementalSpeed( const int, const int = 0 );
index 25f471f249498cd86777ad6f0ee5a957ccb4617e..4431e3ea600d555a1409bbc199b3707dc2e60c25 100644 (file)
@@ -50,7 +50,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include <math.h>
 
-vtkCxxRevisionMacro(vtkPVAxesActor, "$Revision$");
 vtkStandardNewMacro(vtkPVAxesActor);
 
 vtkCxxSetObjectMacro( vtkPVAxesActor, UserDefinedTip, vtkPolyData );
@@ -153,9 +152,9 @@ vtkPVAxesActor::vtkPVAxesActor()
   vtkPolyDataMapper *ymapper = vtkPolyDataMapper::New();
   vtkPolyDataMapper *zmapper = vtkPolyDataMapper::New();
   
-  xmapper->SetInput( this->XAxisVectorText->GetOutput() );
-  ymapper->SetInput( this->YAxisVectorText->GetOutput() );
-  zmapper->SetInput( this->ZAxisVectorText->GetOutput() );
+  xmapper->SetInputConnection( this->XAxisVectorText->GetOutputPort() );
+  ymapper->SetInputConnection( this->YAxisVectorText->GetOutputPort() );
+  zmapper->SetInputConnection( this->ZAxisVectorText->GetOutputPort() );
   
   this->XAxisLabel->SetMapper( xmapper );
   this->YAxisLabel->SetMapper( ymapper );
@@ -257,7 +256,7 @@ int vtkPVAxesActor::RenderOpaqueGeometry(vtkViewport *vp)
 }
 
 //-----------------------------------------------------------------------------
-#if (VTK_MINOR_VERSION>=2)
+#if (VTK_MAJOR_VERSION>5 || VTK_MINOR_VERSION>=2)
 // porting to VTK 5.0.x
 int vtkPVAxesActor::RenderTranslucentPolygonalGeometry(vtkViewport *vp)
 {
@@ -586,36 +585,34 @@ void vtkPVAxesActor::UpdateProps()
     {
     case vtkPVAxesActor::CYLINDER_SHAFT:
       (vtkPolyDataMapper::SafeDownCast(this->XAxisShaft->GetMapper()))->
-        SetInput( this->CylinderSource->GetOutput() );
+        SetInputConnection( this->CylinderSource->GetOutputPort() );
       break;
     case vtkPVAxesActor::LINE_SHAFT:
       (vtkPolyDataMapper::SafeDownCast(this->XAxisShaft->GetMapper()))->
-        SetInput( this->LineSource->GetOutput() );
+        SetInputConnection( this->LineSource->GetOutputPort() );
       break;
     case vtkPVAxesActor::USER_DEFINED_SHAFT:
       (vtkPolyDataMapper::SafeDownCast(this->XAxisShaft->GetMapper()))->
-        SetInput( this->UserDefinedShaft );
+        SetInputData( this->UserDefinedShaft );
     }
   
   switch ( this->TipType )
     {
     case vtkPVAxesActor::CONE_TIP:
       (vtkPolyDataMapper::SafeDownCast(this->XAxisTip->GetMapper()))->
-        SetInput( this->ConeSource->GetOutput() );
+        SetInputConnection( this->ConeSource->GetOutputPort() );
       break;      
     case vtkPVAxesActor::SPHERE_TIP:
       (vtkPolyDataMapper::SafeDownCast(this->XAxisTip->GetMapper()))->
-        SetInput( this->SphereSource->GetOutput() );
+        SetInputConnection( this->SphereSource->GetOutputPort() );
       break;      
     case vtkPVAxesActor::USER_DEFINED_TIP:
       (vtkPolyDataMapper::SafeDownCast(this->XAxisTip->GetMapper()))->
-        SetInput( this->UserDefinedTip );
+        SetInputData( this->UserDefinedTip );
     }
   
-  (vtkPolyDataMapper::SafeDownCast(this->XAxisTip->GetMapper()))->
-    GetInput()->Update();
-  (vtkPolyDataMapper::SafeDownCast(this->XAxisShaft->GetMapper()))->
-    GetInput()->Update();
+  (vtkPolyDataMapper::SafeDownCast(this->XAxisTip->GetMapper()))->Update();
+  (vtkPolyDataMapper::SafeDownCast(this->XAxisShaft->GetMapper()))->Update();
       
   
   
index 8b9d329ccc8766142d0e3d9d6c6480bfc9e110e1..b76f59f93bd1133065452de3c678c3d6f7e77037 100644 (file)
@@ -43,6 +43,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "SVTK.h"
 #include "vtkProp3D.h"
 
+#include <vtkVersion.h>
+
 class vtkRenderer;
 class vtkPropCollection;
 class vtkMapper;
@@ -60,7 +62,7 @@ class SVTK_EXPORT vtkPVAxesActor : public vtkProp3D
 {
 public:
   static vtkPVAxesActor *New();
-  vtkTypeRevisionMacro(vtkPVAxesActor,vtkProp3D);
+  vtkTypeMacro(vtkPVAxesActor,vtkProp3D);
   void PrintSelf(ostream& os, vtkIndent indent);
 
 
@@ -73,7 +75,7 @@ public:
   // Description:
   // Support the standard render methods.
   virtual int RenderOpaqueGeometry(vtkViewport *viewport);
-#if (VTK_MINOR_VERSION>=2)
+#if (VTK_MAJOR_VERSION>5 || VTK_MINOR_VERSION>=2)
   virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport); // porting to VTK 5.0.x
   virtual int HasTranslucentPolygonalGeometry();                         // porting to VTK 5.0.x
 #else
index 42d80002b4f1790dc7c4cf5f5f3639eb085f4d67..b83b1dea30f7824c993311809290251ff63df83b 100644 (file)
@@ -47,7 +47,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "vtkRenderWindowInteractor.h"
 
 vtkStandardNewMacro(vtkPVAxesWidget);
-vtkCxxRevisionMacro(vtkPVAxesWidget, "$Revision$");
 
 vtkCxxSetObjectMacro(vtkPVAxesWidget, AxesActor, vtkPVAxesActor);
 vtkCxxSetObjectMacro(vtkPVAxesWidget, ParentRenderer, vtkRenderer);
@@ -115,7 +114,7 @@ vtkPVAxesWidget::vtkPVAxesWidget()
   vtkCoordinate *tcoord = vtkCoordinate::New();
   tcoord->SetCoordinateSystemToDisplay();
   vtkPolyDataMapper2D *mapper = vtkPolyDataMapper2D::New();
-  mapper->SetInput(this->Outline);
+  mapper->SetInputData(this->Outline);
   mapper->SetTransformCoordinate(tcoord);
   this->OutlineActor = vtkActor2D::New();
   this->OutlineActor->SetMapper(mapper);
index 35c152a9479c18f0196828c02aad074e24b6ed50..cc2bba8e18fb7c624b307aaee1c8ba71f105ef27 100644 (file)
@@ -52,7 +52,7 @@ class SVTK_EXPORT vtkPVAxesWidget : public vtkInteractorObserver
 {
 public:
   static vtkPVAxesWidget* New();
-  vtkTypeRevisionMacro(vtkPVAxesWidget, vtkInteractorObserver);
+  vtkTypeMacro(vtkPVAxesWidget, vtkInteractorObserver);
   void PrintSelf(ostream& os, vtkIndent indent);
 
   // Description:
index 58fecd67e58f8e80bf3e55f39760d68b9302d4d1..dde868defa76619c256f9c27eb99b1e839a79c49 100755 (executable)
@@ -143,7 +143,8 @@ nodist_salomeres_DATA =             \
        VTKViewer_msg_fr.qm
 
 libVTKViewer_la_CPPFLAGS = $(QT_INCLUDES) $(VTK_INCLUDES) $(CAS_CPPFLAGS)      \
-       -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT
+       -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT \
+       -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingOpenGL,vtkRenderingFreeTypeOpenGL)"
 libVTKViewer_la_LDFLAGS = $(KERNEL_LDFLAGS) $(VTK_LIBS) $(QT_MT_LIBS)           \
        $(CAS_KERNEL) $(OGL_LIBS) ../Qtx/libqtx.la ../SUIT/libsuit.la
 
index c7f5efc5f1711897be43ee0689c60c06c1fa8e81..37af4e225906021715353ea5ca63410d958e1883 100755 (executable)
 #  define VTKVIEWER_EXPORT
 #endif
 
-#include <vtkSystemIncludes.h>
-
-#if !defined(vtkFloatingPointType)
-# define vtkFloatingPointType vtkFloatingPointType
-  typedef float vtkFloatingPointType;
-#endif
-
 #endif
index fc8eda9a24e9b969a88d985043190dbd70f2bb7b..eecfbc2115da95c003d574d96eefc51bda32b9e1 100755 (executable)
@@ -180,30 +180,26 @@ VTKViewer_Actor
 {
   if(theMapper){
     int anId = 0;
-    myPassFilter[ anId ]->SetInput( theMapper->GetInput() );
-    myPassFilter[ anId + 1]->SetInput( myPassFilter[ anId ]->GetOutput() );
+    myPassFilter[ anId ]->SetInputData( theMapper->GetInput() );
+    myPassFilter[ anId + 1]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
     
     anId++; // 1
     myGeomFilter->SetStoreMapping( myStoreMapping );
-    myGeomFilter->SetInput( myPassFilter[ anId ]->GetOutput() );
+    myGeomFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
 
     anId++; // 2
-    myPassFilter[ anId ]->SetInput( myGeomFilter->GetOutput() ); 
-    myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() );
+    myPassFilter[ anId ]->SetInputConnection( myGeomFilter->GetOutputPort() ); 
+    myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
 
     anId++; // 3
-    myTransformFilter->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+    myTransformFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
 
     anId++; // 4
-    myPassFilter[ anId ]->SetInput( myTransformFilter->GetOutput() );
-    myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() );
+    myPassFilter[ anId ]->SetInputConnection( myTransformFilter->GetOutputPort() );
+    myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
 
     anId++; // 5
-    if(vtkDataSetMapper* aMapper = dynamic_cast<vtkDataSetMapper*>(theMapper)){
-      aMapper->SetInput(myPassFilter[anId]->GetOutput());
-    }else if(vtkPolyDataMapper* aMapper = dynamic_cast<vtkPolyDataMapper*>(theMapper)){
-      aMapper->SetInput(myPassFilter[anId]->GetPolyDataOutput());
-    }
+    theMapper->SetInputConnection(myPassFilter[anId]->GetOutputPort());
   }
   Superclass::SetMapper(theMapper);
 }
@@ -216,7 +212,7 @@ VTKViewer_Actor
 ::Render(vtkRenderer *ren, vtkMapper* m)
 {
   if(vtkDataSet* aDataSet = GetInput()){
-    static vtkFloatingPointType PERCENTS_OF_DETAILS = 0.50;
+    static double PERCENTS_OF_DETAILS = 0.50;
     vtkIdType aNbOfPoints = vtkIdType(aDataSet->GetNumberOfPoints()*PERCENTS_OF_DETAILS);
     if(aNbOfPoints > 0)
       SetNumberOfCloudPoints(aNbOfPoints);
@@ -224,7 +220,7 @@ VTKViewer_Actor
 
   if(myIsResolveCoincidentTopology){
     int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology();
-    vtkFloatingPointType aFactor, aUnit; 
+    double aFactor, aUnit; 
     vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
     
     vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
@@ -256,8 +252,8 @@ VTKViewer_Actor
 */
 void
 VTKViewer_Actor
-::SetPolygonOffsetParameters(vtkFloatingPointType factor, 
-                             vtkFloatingPointType units)
+::SetPolygonOffsetParameters(double factor, 
+                             double units)
 {
   myPolygonOffsetFactor = factor;
   myPolygonOffsetUnits = units;
@@ -269,8 +265,8 @@ VTKViewer_Actor
 */
 void
 VTKViewer_Actor
-::GetPolygonOffsetParameters(vtkFloatingPointType& factor, 
-                             vtkFloatingPointType& units)
+::GetPolygonOffsetParameters(double& factor, 
+                             double& units)
 {
   factor = myPolygonOffsetFactor;
   units = myPolygonOffsetUnits;
@@ -279,7 +275,7 @@ VTKViewer_Actor
 /*!
   \return shrink factor
 */
-vtkFloatingPointType
+double
 VTKViewer_Actor
 ::GetShrinkFactor() 
 { 
@@ -433,7 +429,7 @@ VTKViewer_Actor
 /*!
   Get coordinates of a node for given object index
 */
-vtkFloatingPointType* 
+double* 
 VTKViewer_Actor
 ::GetNodeCoord(int theObjID)
 {
@@ -494,14 +490,14 @@ VTKViewer_Actor
   if(myIsInfinite)
     return true;
 
-  static vtkFloatingPointType MAX_DISTANCE = 0.9*VTK_LARGE_FLOAT;
-  vtkFloatingPointType aBounds[6];
+  static double MAX_DISTANCE = 0.9*VTK_LARGE_FLOAT;
+  double aBounds[6];
   GetBounds(aBounds);
   for(int i = 0; i < 6; i++)
     if(fabs(aBounds[i]) > MAX_DISTANCE)
       return true;
   
-  static vtkFloatingPointType MIN_DISTANCE = 1.0/VTK_LARGE_FLOAT;
+  static double MIN_DISTANCE = 1.0/VTK_LARGE_FLOAT;
   if(GetLength() < MIN_DISTANCE)
     return true;
   
@@ -511,7 +507,7 @@ VTKViewer_Actor
 /*!
   \return current bounding box
 */
-vtkFloatingPointType* 
+double* 
 VTKViewer_Actor
 ::GetBounds()
 {
@@ -524,7 +520,7 @@ VTKViewer_Actor
 */
 void
 VTKViewer_Actor
-::GetBounds(vtkFloatingPointType theBounds[6])
+::GetBounds(double theBounds[6])
 {
   Superclass::GetBounds(theBounds);
 }
@@ -546,7 +542,7 @@ VTKViewer_Actor
 
 void
 VTKViewer_Actor
-::SetSize( const vtkFloatingPointType ) 
+::SetSize( const double ) 
 {}
 
 
@@ -558,13 +554,13 @@ VTKViewer_Actor
 
 void
 VTKViewer_Actor
-::SetOpacity(vtkFloatingPointType theOpacity)
+::SetOpacity(double theOpacity)
 { 
   myOpacity = theOpacity;
   GetProperty()->SetOpacity(theOpacity);
 }
 
-vtkFloatingPointType
+double
 VTKViewer_Actor
 ::GetOpacity()
 {
@@ -577,9 +573,9 @@ VTKViewer_Actor
 */
 void
 VTKViewer_Actor
-::SetColor(vtkFloatingPointType r,
-           vtkFloatingPointType g,
-           vtkFloatingPointType b)
+::SetColor(double r,
+           double g,
+           double b)
 {
   GetProperty()->SetColor(r,g,b);
 }
@@ -589,7 +585,7 @@ VTKViewer_Actor
 */
 void
 VTKViewer_Actor
-::SetColor(const vtkFloatingPointType theRGB[3])
+::SetColor(const double theRGB[3])
 { 
   SetColor(theRGB[0],theRGB[1],theRGB[2]);
 }
@@ -599,11 +595,11 @@ VTKViewer_Actor
 */
 void
 VTKViewer_Actor
-::GetColor(vtkFloatingPointType& r,
-           vtkFloatingPointType& g,
-           vtkFloatingPointType& b)
+::GetColor(double& r,
+           double& g,
+           double& b)
 {
-  vtkFloatingPointType aColor[3];
+  double aColor[3];
   GetProperty()->GetColor(aColor);
   r = aColor[0];
   g = aColor[1];
@@ -728,14 +724,14 @@ bool VTKViewer_Actor::GetQuadraticArcMode() const{
 /*!
  * Set Max angle for representation 2D quadratic element as arked polygon
  */
-void VTKViewer_Actor::SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle){
+void VTKViewer_Actor::SetQuadraticArcAngle(double theMaxAngle){
   myGeomFilter->SetQuadraticArcAngle(theMaxAngle);
 }
 
 /*!
  * Return Max angle of the representation 2D quadratic element as arked polygon
  */
-vtkFloatingPointType VTKViewer_Actor::GetQuadraticArcAngle() const{
+double VTKViewer_Actor::GetQuadraticArcAngle() const{
   return myGeomFilter->GetQuadraticArcAngle();
 }
 
index 5225cd6b4df8317ed9374f103d02b5a6fd4a374f..996d89478837224ef5c3c2ec44a0820729ea8b35 100755 (executable)
@@ -93,31 +93,31 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
   //! Change opacity
   virtual
   void
-  SetOpacity(vtkFloatingPointType theOpacity);
+  SetOpacity(double theOpacity);
 
   //! Get current opacity
   virtual
-  vtkFloatingPointTyp
+  doubl
   GetOpacity();
 
   //! Change color
   virtual
   void
-  SetColor(vtkFloatingPointType r,
-           vtkFloatingPointType g,
-           vtkFloatingPointType b);
+  SetColor(double r,
+           double g,
+           double b);
 
   //! Get current color
   virtual
   void
-  GetColor(vtkFloatingPointType& r,
-           vtkFloatingPointType& g,
-           vtkFloatingPointType& b);
+  GetColor(double& r,
+           double& g,
+           double& b);
 
   //! Change color
   virtual
   void
-  SetColor(const vtkFloatingPointType theRGB[3]);
+  SetColor(const double theRGB[3]);
 
   //! Change material\r
   virtual\r
@@ -143,7 +143,7 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
 
   //! Get coordinates of a node for given object index
   virtual
-  vtkFloatingPointType*
+  double*
   GetNodeCoord(int theObjID);
 
   //! Maps VTK index of a cell to corresponding object index
@@ -219,12 +219,12 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
     
   //! To calcualte current bounding box
   virtual
-  vtkFloatingPointType* 
+  double* 
   GetBounds();
 
   //! To calcualte current bounding box
   void
-  GetBounds(vtkFloatingPointType bounds[6]);
+  GetBounds(double bounds[6]);
 
   //----------------------------------------------------------------------------
   virtual
@@ -237,7 +237,7 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
 
   virtual
   void
-  SetSize( const vtkFloatingPointType );
+  SetSize( const double );
 
   virtual
   void 
@@ -250,13 +250,13 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
 
   //! Set ResolveCoincidentTopology parameters
   void
-  SetPolygonOffsetParameters(vtkFloatingPointType factor, 
-                             vtkFloatingPointType units);
+  SetPolygonOffsetParameters(double factor, 
+                             double units);
 
   //! Get current ResolveCoincidentTopology parameters
   void
-  GetPolygonOffsetParameters(vtkFloatingPointType& factor, 
-                             vtkFloatingPointType& units);
+  GetPolygonOffsetParameters(double& factor, 
+                             double& units);
 
   virtual
   void
@@ -265,7 +265,7 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
   //----------------------------------------------------------------------------
   //! Get current shrink factor
   virtual
-  vtkFloatingPointType
+  double
   GetShrinkFactor();
 
   //! Is the actor is shrunkable
@@ -339,8 +339,8 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
   virtual void SetQuadraticArcMode(bool theFlag);
   virtual bool GetQuadraticArcMode() const;
 
-  virtual void   SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle);
-  virtual vtkFloatingPointType GetQuadraticArcAngle() const;
+  virtual void   SetQuadraticArcAngle(double theMaxAngle);
+  virtual double GetQuadraticArcAngle() const;
 
   //----------------------------------------------------------------------------
   //! Return pointer to the dataset, which used to calculation of the bounding box of the actor
@@ -349,12 +349,12 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
  protected:
   //----------------------------------------------------------------------------
   bool myIsResolveCoincidentTopology;
-  vtkFloatingPointType myPolygonOffsetFactor;
-  vtkFloatingPointType myPolygonOffsetUnits;
+  double myPolygonOffsetFactor;
+  double myPolygonOffsetUnits;
 
   std::string myName;
 
-  vtkFloatingPointType myOpacity;
+  double myOpacity;
   int myDisplayMode;
   bool myIsInfinite;
 
index cc08f7bad5cde73056b702718d49a6daf9d11e55..986edd57d51b64778dd79ce79dbc9a1bcfeda194 100644 (file)
@@ -44,7 +44,6 @@
   #endif
 #endif
 
-vtkCxxRevisionMacro(VTKViewer_AppendFilter, "$Revision$");
 vtkStandardNewMacro(VTKViewer_AppendFilter);
 
 VTKViewer_AppendFilter
index 3a0e27a4f782afa889983e83edee04a121b9c073..35c691d63364faf8ecc640473942f4875d254d28 100644 (file)
@@ -46,10 +46,10 @@ public:
    */
   static VTKViewer_AppendFilter *New();
   
-  /*! \fn vtkTypeRevisionMacro(VTKViewer_AppendFilter, vtkAppendFilter)
+  /*! \fn vtkTypeMacro(VTKViewer_AppendFilter, vtkAppendFilter)
    *  \brief VTK type revision macros.
    */
-  vtkTypeRevisionMacro(VTKViewer_AppendFilter, vtkAppendFilter);
+  vtkTypeMacro(VTKViewer_AppendFilter, vtkAppendFilter);
 
   void SetDoMappingFlag(const bool theFlag);
 
index 26df8dbdc29e9e3b8494bb48d9ea5a60967156f8..9057c98930b9e5077fc17e3d78c4d6f6b7dfe9d9 100644 (file)
@@ -292,7 +292,6 @@ VTKViewer_ArcBuilder::VTKViewer_ArcBuilder(const Pnt& thePnt1,
       vtkUnstructuredGrid* aTransformedGrid;
       if(needRotation) {
         aTransformedGrid = TransformGrid(aGrid,aAxis,anAngle);    
-        aTransformedGrid->Update();
 #ifdef _MY_DEBUG_
         cout<<"Need Rotation!!!"<<endl;
 #endif
@@ -314,10 +313,8 @@ VTKViewer_ArcBuilder::VTKViewer_ArcBuilder(const Pnt& thePnt1,
       std::vector<double> aScalarValues;
       vtkUnstructuredGrid* anArc = BuildArc(aScalarValues);
       vtkUnstructuredGrid* anTransArc;
-      if(needRotation) {
+      if(needRotation)
         anTransArc = TransformGrid(anArc,aAxis,-anAngle);
-        anTransArc->Update();
-      }
       else
         anTransArc = anArc;
       
@@ -335,7 +332,6 @@ VTKViewer_ArcBuilder::VTKViewer_ArcBuilder(const Pnt& thePnt1,
     aList.push_back(thePnt2);
     aList.push_back(thePnt3);
     vtkUnstructuredGrid* aGrid = BuildGrid(aList);
-    aGrid->Update();
     myPoints = aGrid->GetPoints();
 
     myScalarValues.clear();
@@ -397,7 +393,7 @@ VTKViewer_ArcBuilder::TransformGrid(vtkUnstructuredGrid* theGrid,
   aTransform->RotateWXYZ(angle, theAxis.GetXYZ().X(), theAxis.GetXYZ().Y(), theAxis.GetXYZ().Z());
   vtkTransformFilter* aTransformFilter  = vtkTransformFilter::New();
   aTransformFilter->SetTransform(aTransform);
-  aTransformFilter->SetInput(theGrid);
+  aTransformFilter->SetInputData(theGrid);
   aTransform->Delete();
   return aTransformFilter->GetUnstructuredGridOutput();
 }
@@ -472,8 +468,8 @@ vtkUnstructuredGrid* VTKViewer_ArcBuilder::BuildArc(std::vector<double>& theScal
   
   /*  double aTotalAngle =  fabs(angle3 - angle1);
   
-  if (aTotalAngle > vtkMath::DoublePi())
-    aTotalAngle = 2*vtkMath::DoublePi()-aTotalAngle;
+  if (aTotalAngle > vtkMath::Pi())
+    aTotalAngle = 2*vtkMath::Pi()-aTotalAngle;
   */
   
   double aTotalAngle = 0;
@@ -541,8 +537,8 @@ GetPointAngleOnCircle(const double theXCenter, const double theYCenter,
                       const double theXPoint, const double theYPoint){
   double result = atan2(theYCenter - theYPoint, theXPoint - theXCenter);
   if(result < 0 )
-    result = result+vtkMath::DoublePi()*2;
-  return vtkMath::DoublePi()*2-result;
+    result = result+vtkMath::Pi()*2;
+  return vtkMath::Pi()*2-result;
   return result;
 }
 
@@ -562,11 +558,11 @@ VTKViewer_ArcBuilder::IncOrder VTKViewer_ArcBuilder::GetArcAngle( const double&
     aResult = VTKViewer_ArcBuilder::PLUS;
   }
   else if((P1 < P3 && P3 < P2) || (P2 < P1 && P1 < P3)){
-    *Ang = 2*vtkMath::DoublePi() - P3 + P1;
+    *Ang = 2*vtkMath::Pi() - P3 + P1;
     aResult = VTKViewer_ArcBuilder::MINUS;
   }
   else if((P2 < P3 && P3 < P1) || (P3 < P1 && P1 < P2)){
-    *Ang = 2*vtkMath::DoublePi() - P1 + P3;
+    *Ang = 2*vtkMath::Pi() - P1 + P3;
     aResult = VTKViewer_ArcBuilder::PLUS;
   }
   else if(P3 < P2 && P2 < P1){
@@ -579,7 +575,7 @@ VTKViewer_ArcBuilder::IncOrder VTKViewer_ArcBuilder::GetArcAngle( const double&
 //------------------------------------------------------------------------
 Pnt CreatePnt(vtkCell* cell, vtkDataArray* scalars, vtkIdType index)
 {
-  vtkFloatingPointType coord[3];
+  double coord[3];
   cell->GetPoints()->GetPoint(index, coord);
   vtkIdType pointId = cell->GetPointId(index);
   double scalarValue = scalars ? scalars->GetTuple1(pointId) : 0;
@@ -590,7 +586,7 @@ Pnt CreatePnt(vtkCell* cell, vtkDataArray* scalars, vtkIdType index)
 //------------------------------------------------------------------------
 vtkIdType Build1DArc(vtkIdType cellId, vtkUnstructuredGrid* input, 
                      vtkPolyData *output,vtkIdType *pts, 
-                     vtkFloatingPointType myMaxArcAngle){
+                     double myMaxArcAngle){
   
   vtkIdType aResult = -1;
   vtkIdType *aNewPoints;
index c5f47a2c4798a0fa45bd692f17d6203f084491d3..0f27af523f1cb4c82deb4ec11687ab535c64dc75 100644 (file)
@@ -25,6 +25,8 @@
 #include <map>
 #include <vector>
 
+#include <vtkType.h>
+
 class vtkCell;
 class vtkDataArray;
 class vtkPoints;
@@ -45,7 +47,7 @@ vtkIdType Build1DArc(vtkIdType cellId,
                      vtkUnstructuredGrid* input, 
                      vtkPolyData *output,
                      vtkIdType *pts, 
-                     vtkFloatingPointType myMaxArcAngle);
+                     double myMaxArcAngle);
 
 Pnt CreatePnt(vtkCell* cell,
               vtkDataArray* scalars,
index 0aa717bd24ea9ecf2387be04e4d4b8dd5fc61c52..abaf1a08d30006bcec40efb2d45884b0a45d48a6 100644 (file)
@@ -33,7 +33,6 @@
 #include <vtkPolyData.h>
 #include <vtkCellArray.h>
 
-vtkCxxRevisionMacro(VTKViewer_CellCenters, "$Revision$");
 vtkStandardNewMacro(VTKViewer_CellCenters);
 
 /*!
index 6a37f15857e37e4da198fb4356dc6bd632a4d18b..c33141aae0c7aeb437cec1c8285194a61cb506e5 100644 (file)
@@ -39,7 +39,7 @@
 class VTKVIEWER_EXPORT VTKViewer_CellCenters : public vtkCellCenters
 {
 public:
-  vtkTypeRevisionMacro(VTKViewer_CellCenters,vtkCellCenters);
+  vtkTypeMacro(VTKViewer_CellCenters,vtkCellCenters);
 
   static VTKViewer_CellCenters *New();
 
index 7cfb3e88c72de3d4b987b0b650df81914efb270b..2d3d7bff1df7b4014189e5180322d0f205ab84a2 100644 (file)
@@ -25,6 +25,8 @@
 
 #include "VTKViewer.h"
 
+#include <vtkVersion.h>
+
 #if ((VTK_MAJOR_VERSION == 4) &&  (VTK_MINOR_VERSION >= 4)) || (VTK_MAJOR_VERSION > 4)
 #  include <vtkIdTypeArray.h>
 #  define TCellLocationsArray vtkIdTypeArray
index 3cd96908ab0383d3ae678e06f02e081da56f862b..1c22204a262d3a0b52167a8d2584877071a2b91e 100644 (file)
@@ -55,11 +55,11 @@ namespace
   struct TPolygon
   {
     TConnectivities myConnectivities;
-    vtkFloatingPointType myOrigin[3];
-    vtkFloatingPointType myNormal[3];
+    double myOrigin[3];
+    double myNormal[3];
     TPolygon(const TConnectivities& theConnectivities,
-             vtkFloatingPointType theOrigin[3],
-             vtkFloatingPointType theNormal[3]):
+             double theOrigin[3],
+             double theNormal[3]):
       myConnectivities(theConnectivities)
     {
       myOrigin[0] = theOrigin[0];
@@ -108,7 +108,7 @@ VTKViewer_Triangulator
   vtkIdType aNumPts;
   theInput->GetCellPoints(theCellId, aNumPts, myPointIds); 
   if ( aNumPts > 0 ) {
-    vtkFloatingPointType anAbsoluteCoord[3];
+    double anAbsoluteCoord[3];
     myPoints->SetNumberOfPoints(aNumPts);
     vtkPoints *anInputPoints = theInput->GetPoints();
     for (int aPntId = 0; aPntId < aNumPts; aPntId++) {
@@ -140,14 +140,14 @@ VTKViewer_Triangulator
 
 
 //----------------------------------------------------------------------------
-vtkFloatingPointTyp
+doubl
 VTKViewer_Triangulator
 ::GetCellLength()
 {
-  vtkFloatingPointType aBounds[6];
+  double aBounds[6];
   myPoints->GetBounds(aBounds);
 
-  vtkFloatingPointType aCoordDiff[3];
+  double aCoordDiff[3];
   aCoordDiff[0] = (aBounds[1] - aBounds[0]);
   aCoordDiff[1] = (aBounds[3] - aBounds[2]);
   aCoordDiff[2] = (aBounds[5] - aBounds[4]);
@@ -210,9 +210,9 @@ VTKViewer_Triangulator
     return true;
 
   // To calculate the bary center of the cell
-  vtkFloatingPointType aCellCenter[3] = {0.0, 0.0, 0.0};
+  double aCellCenter[3] = {0.0, 0.0, 0.0};
   {
-    vtkFloatingPointType aPntCoord[3];
+    double aPntCoord[3];
     for (int aPntId = 0; aPntId < aNumPts; aPntId++) {
       aPoints->GetPoint(GetPointId(aPntId),aPntCoord);
       if(DEBUG_TRIA_EXECUTE) cout<<"\taPntId = "<<GetPointId(aPntId)<<" {"<<aPntCoord[0]<<", "<<aPntCoord[1]<<", "<<aPntCoord[2]<<"}\n";
@@ -225,11 +225,11 @@ VTKViewer_Triangulator
     aCellCenter[2] /= aNumPts;
   }
 
-  vtkFloatingPointType aCellLength = GetCellLength();
+  double aCellLength = GetCellLength();
   int aNumFaces = GetNumFaces();
 
-  static vtkFloatingPointType EPS = 1.0E-2;
-  vtkFloatingPointType aDistEps = aCellLength/3.0 * EPS;
+  static double EPS = 1.0E-2;
+  double aDistEps = aCellLength/3.0 * EPS;
   if(DEBUG_TRIA_EXECUTE) cout<<"\taNumFaces = "<<aNumFaces<<"; aCellLength = "<<aCellLength<<"; aDistEps = "<<aDistEps<<"\n";
 
   // To initialize set of points that belong to the cell
@@ -291,7 +291,7 @@ VTKViewer_Triangulator
     
     if(!anIsObserved){
       // To get coordinates of the points of the traingle face
-      vtkFloatingPointType aCoord[3][3];
+      double aCoord[3][3];
       aPoints->GetPoint(aNewPts[0],aCoord[0]);
       aPoints->GetPoint(aNewPts[1],aCoord[1]);
       aPoints->GetPoint(aNewPts[2],aCoord[2]);
@@ -307,11 +307,11 @@ VTKViewer_Triangulator
        
       
       */
-      vtkFloatingPointType aVector01[3] = { aCoord[1][0] - aCoord[0][0],
+      double aVector01[3] = { aCoord[1][0] - aCoord[0][0],
                                             aCoord[1][1] - aCoord[0][1],
                                             aCoord[1][2] - aCoord[0][2] };
       
-      vtkFloatingPointType aVector02[3] = { aCoord[2][0] - aCoord[0][0],
+      double aVector02[3] = { aCoord[2][0] - aCoord[0][0],
                                             aCoord[2][1] - aCoord[0][1],
                                             aCoord[2][2] - aCoord[0][2] };
       
@@ -319,34 +319,34 @@ VTKViewer_Triangulator
       vtkMath::Normalize(aVector02);
 
       // To calculate the normal for the triangle
-      vtkFloatingPointType aNormal[3];
+      double aNormal[3];
       vtkMath::Cross(aVector02,aVector01,aNormal);
       
       vtkMath::Normalize(aNormal);
       
       // To calculate what points belong to the plane
       // To calculate bounds of the point set
-      vtkFloatingPointType aCenter[3] = {0.0, 0.0, 0.0};
+      double aCenter[3] = {0.0, 0.0, 0.0};
       {
         TPointIds::const_iterator anIter = anInitialPointIds.begin();
         TPointIds::const_iterator anEndIter = anInitialPointIds.end();
         for(; anIter != anEndIter; anIter++){
-          vtkFloatingPointType aPntCoord[3];
+          double aPntCoord[3];
           vtkIdType aPntId = *anIter;
           aPoints->GetPoint(aPntId,aPntCoord);
           
-          vtkFloatingPointType aVector0Pnt[3] = { aPntCoord[0] - aCoord[0][0],
+          double aVector0Pnt[3] = { aPntCoord[0] - aCoord[0][0],
                                                   aPntCoord[1] - aCoord[0][1],
                                                   aPntCoord[2] - aCoord[0][2] };
 
           
           vtkMath::Normalize(aVector0Pnt);
           
-          vtkFloatingPointType aNormalPnt[3];
+          double aNormalPnt[3];
           // calculate aNormalPnt
           {
-            vtkFloatingPointType aCosPnt01 = vtkMath::Dot(aVector0Pnt,aVector01);
-            vtkFloatingPointType aCosPnt02 = vtkMath::Dot(aVector0Pnt,aVector02);
+            double aCosPnt01 = vtkMath::Dot(aVector0Pnt,aVector01);
+            double aCosPnt02 = vtkMath::Dot(aVector0Pnt,aVector02);
             if(aCosPnt01<-1)
               aCosPnt01 = -1;
             if(aCosPnt01>1)
@@ -356,9 +356,9 @@ VTKViewer_Triangulator
             if(aCosPnt02>1)
               aCosPnt02 = 1;
 
-            vtkFloatingPointType aDist01,aDist02;// deflection from Pi/3 angle (equilateral triangle)
-            vtkFloatingPointType aAngPnt01 = fabs(acos(aCosPnt01));
-            vtkFloatingPointType aAngPnt02 = fabs(acos(aCosPnt02));
+            double aDist01,aDist02;// deflection from Pi/3 angle (equilateral triangle)
+            double aAngPnt01 = fabs(acos(aCosPnt01));
+            double aAngPnt02 = fabs(acos(aCosPnt02));
 
             /*  check that triangle similar to equilateral triangle
                 AOC or COB ?
@@ -390,7 +390,7 @@ VTKViewer_Triangulator
           if(DEBUG_TRIA_EXECUTE)
             cout<<"\t\taPntId = "<<aPntId<<" {"<<aPntCoord[0]<<", "<<aPntCoord[1]<<", "<<aPntCoord[2]<<"};";
           
-          vtkFloatingPointType aDist = vtkPlane::DistanceToPlane(aPntCoord,aNormal,aCoord[0]);
+          double aDist = vtkPlane::DistanceToPlane(aPntCoord,aNormal,aCoord[0]);
           if(DEBUG_TRIA_EXECUTE) cout<<": aDist = "<<aDist;
           if(fabs(aDist) < aDistEps){
             aPointIds.insert(aPntId);
@@ -409,12 +409,12 @@ VTKViewer_Triangulator
       }
       
       //To sinchronize orientation of the cell and its face
-      vtkFloatingPointType aVectorC[3] = { aCenter[0] - aCellCenter[0],
+      double aVectorC[3] = { aCenter[0] - aCellCenter[0],
                                            aCenter[1] - aCellCenter[1],
                                            aCenter[2] - aCellCenter[2] };
       vtkMath::Normalize(aVectorC);
       
-      vtkFloatingPointType aDot = vtkMath::Dot(aNormal,aVectorC);
+      double aDot = vtkMath::Dot(aNormal,aVectorC);
       if(DEBUG_TRIA_EXECUTE) {
         cout<<"\t\taNormal = {"<<aNormal[0]<<", "<<aNormal[1]<<", "<<aNormal[2]<<"}";
         cout<<"; aVectorC = {"<<aVectorC[0]<<", "<<aVectorC[1]<<", "<<aVectorC[2]<<"}\n";
@@ -427,7 +427,7 @@ VTKViewer_Triangulator
       }
       
       // To calculate the primary direction for point set
-      vtkFloatingPointType aVector0[3] = { aCoord[0][0] - aCenter[0],
+      double aVector0[3] = { aCoord[0][0] - aCenter[0],
                                            aCoord[0][1] - aCenter[1],
                                            aCoord[0][2] - aCenter[2] };
       vtkMath::Normalize(aVector0);
@@ -480,26 +480,26 @@ VTKViewer_Triangulator
       
       // To sort the planar set of the points accrding to the angle
       {
-        typedef std::map<vtkFloatingPointType,vtkIdType> TSortedPointIds;
+        typedef std::map<double,vtkIdType> TSortedPointIds;
         TSortedPointIds aSortedPointIds;
         
         TPointIds::const_iterator anIter = aPointIds.begin();
         TPointIds::const_iterator anEndIter = aPointIds.end();
         for(; anIter != anEndIter; anIter++){
-          vtkFloatingPointType aPntCoord[3];
+          double aPntCoord[3];
           vtkIdType aPntId = *anIter;
           aPoints->GetPoint(aPntId,aPntCoord);
-          vtkFloatingPointType aVector[3] = { aPntCoord[0] - aCenter[0],
+          double aVector[3] = { aPntCoord[0] - aCenter[0],
                                               aPntCoord[1] - aCenter[1],
                                               aPntCoord[2] - aCenter[2] };
           vtkMath::Normalize(aVector);
           
-          vtkFloatingPointType aCross[3];
+          double aCross[3];
           vtkMath::Cross(aVector,aVector0,aCross);
-          vtkFloatingPointType aCr = vtkMath::Dot(aCross,aNormal);
+          double aCr = vtkMath::Dot(aCross,aNormal);
           bool aGreaterThanPi = aCr < 0;
-          vtkFloatingPointType aCosinus = vtkMath::Dot(aVector,aVector0);
-          vtkFloatingPointType anAngle = 0.0;
+          double aCosinus = vtkMath::Dot(aVector,aVector0);
+          double anAngle = 0.0;
           if(aCosinus >= 1.0){
             aCosinus = 1.0;
           } else if (aCosinus <= -1.0){
@@ -544,18 +544,18 @@ VTKViewer_Triangulator
     int aNbPolygons = aPolygons.size();
     for (int aPolygonId = 0; aPolygonId < aNbPolygons; aPolygonId++) {
       ::TPolygon& aPolygon = aPolygons[aPolygonId];
-      vtkFloatingPointType* aNormal = aPolygon.myNormal;
-      vtkFloatingPointType* anOrigin = aPolygon.myOrigin;
+      double* aNormal = aPolygon.myNormal;
+      double* anOrigin = aPolygon.myOrigin;
       if(DEBUG_TRIA_EXECUTE) {
         cout<<"\taPolygonId = "<<aPolygonId<<"\n";
         cout<<"\t\taNormal = {"<<aNormal[0]<<", "<<aNormal[1]<<", "<<aNormal[2]<<"}";
         cout<<"; anOrigin = {"<<anOrigin[0]<<", "<<anOrigin[1]<<", "<<anOrigin[2]<<"}\n";
       }
       for(vtkIdType aPntId = 0; aPntId < aNumPts; aPntId++){
-        vtkFloatingPointType aPntCoord[3];
+        double aPntCoord[3];
         vtkIdType anId = GetPointId(aPntId);
         aPoints->GetPoint(anId,aPntCoord);
-        vtkFloatingPointType aDist = vtkPlane::Evaluate(aNormal,anOrigin,aPntCoord);
+        double aDist = vtkPlane::Evaluate(aNormal,anOrigin,aPntCoord);
         if(DEBUG_TRIA_EXECUTE) cout<<"\t\taPntId = "<<anId<<" {"<<aPntCoord[0]<<", "<<aPntCoord[1]<<", "<<aPntCoord[2]<<"}; aDist = "<<aDist<<"\n";
         if(aDist < -aDistEps)
           return false;
@@ -625,14 +625,14 @@ VTKViewer_OrderedTriangulator
   if ( aNumPts > 0 ) {
     myTriangulator->InitTriangulation(0.0, 1.0, 0.0, 1.0, 0.0, 1.0, aNumPts);
 
-    vtkFloatingPointType aBounds[6];
+    double aBounds[6];
     myPoints->GetBounds(aBounds);
-    vtkFloatingPointType xSize, ySize, zSize;
+    double xSize, ySize, zSize;
     xSize = aBounds[1] - aBounds[0];
     ySize = aBounds[3] - aBounds[2];
     zSize = aBounds[5] - aBounds[4];
-    vtkFloatingPointType anAbsoluteCoord[3];
-    vtkFloatingPointType aParamentrucCoord[3];
+    double anAbsoluteCoord[3];
+    double aParamentrucCoord[3];
     for (int aPntId = 0; aPntId < aNumPts; aPntId++) {
       myPoints->GetPoint(aPntId, anAbsoluteCoord);
       aParamentrucCoord[0] = xSize==0. ? 0. : ((anAbsoluteCoord[0] - aBounds[0]) / xSize);
@@ -697,8 +697,8 @@ VTKViewer_DelaunayTriangulator
   myUnstructuredGrid->Allocate();
   myUnstructuredGrid->SetPoints(myPoints);
 
-  myDelaunay3D->SetInput(myUnstructuredGrid);
-  myGeometryFilter->SetInput(myDelaunay3D->GetOutput());
+  myDelaunay3D->SetInputData(myUnstructuredGrid);
+  myGeometryFilter->SetInputConnection(myDelaunay3D->GetOutputPort());
   myPolyData = myGeometryFilter->GetOutput();
 }
 
index 017a0a70011f97f4793ec8bfc804a4cd1514ed4f..11d45b99b704f1ea73f09598afc5bfdf455741d3 100644 (file)
@@ -94,7 +94,7 @@ class VTKVIEWER_EXPORT VTKViewer_Triangulator
   vtkIdType 
   GetPointId(vtkIdType thePointId);
 
-  vtkFloatingPointTyp
+  doubl
   GetCellLength();
 
   void 
index fad3d91795f5b916357da2b7fefac1cd65c19897..711a04ad0b2ddba0478adad1d0b0d2bf4ad5ddc4 100644 (file)
@@ -23,7 +23,6 @@
 #include <vtkDataSetSurfaceFilter.h>
 #include <vtkObjectFactory.h>
 
-vtkCxxRevisionMacro(VTKViewer_DataSetMapper, "Revision$");
 vtkStandardNewMacro(VTKViewer_DataSetMapper);
 
 //----------------------------------------------------------------------------
@@ -48,7 +47,7 @@ void VTKViewer_DataSetMapper::Render(vtkRenderer *ren, vtkActor *act)
   {
     vtkDataSetSurfaceFilter *gf = vtkDataSetSurfaceFilter::New();
     VTKViewer_PolyDataMapper *pm = VTKViewer_PolyDataMapper::New();
-    pm->SetInput(gf->GetOutput());
+    pm->SetInputConnection(gf->GetOutputPort());
 
     pm->SetMarkerEnabled( this->MarkerEnabled );
     if( this->MarkerType != VTK::MT_USER )
index cbdfbbbff06faf041d489876b2d4042292a1de1f..76ae91f7bc8e1fb1de61b5e06049841d40feb50d 100644 (file)
@@ -29,7 +29,7 @@ class VTKVIEWER_EXPORT VTKViewer_DataSetMapper : public vtkDataSetMapper
 {
 public:
   static VTKViewer_DataSetMapper *New();
-  vtkTypeRevisionMacro(VTKViewer_DataSetMapper,vtkDataSetMapper);
+  vtkTypeMacro(VTKViewer_DataSetMapper,vtkDataSetMapper);
 
   //! Set point marker enabled
   void SetMarkerEnabled( bool );
index 25ca840fbd9c749570e77d77842b7c321f72c6b4..076f1bc3cba2328fed14e8a9d196fe89bcd91b0b 100755 (executable)
@@ -178,15 +178,10 @@ inline void InsertPointCell(vtkCellArray *theConnectivity,
 }
 
 
-// int VTKViewer_ExtractUnstructuredGrid::RequestData(
-//   vtkInformation *vtkNotUsed(request),
-//   vtkInformationVector **inputVector,
-//   vtkInformationVector *outputVector)
-void VTKViewer_ExtractUnstructuredGrid::Execute()
+int VTKViewer_ExtractUnstructuredGrid::RequestData(vtkInformation *vtkNotUsed(request),
+                                                   vtkInformationVector **inputVector,
+                                                   vtkInformationVector *outputVector)
 {
-  /*
-  not ported yet to the new executive-based pipeline architecture.
-
   // get the info objects
   vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
   vtkInformation *outInfo = outputVector->GetInformationObject(0);
@@ -196,9 +191,9 @@ void VTKViewer_ExtractUnstructuredGrid::Execute()
     inInfo->Get(vtkDataObject::DATA_OBJECT()));
   vtkUnstructuredGrid *anOutput = vtkUnstructuredGrid::SafeDownCast(
     outInfo->Get(vtkDataObject::DATA_OBJECT()));
-  */
-  vtkUnstructuredGrid *anInput = this->GetInput();
-  vtkUnstructuredGrid *anOutput = this->GetOutput();
+
+  //vtkUnstructuredGrid *anInput = this->GetInput();
+  //vtkUnstructuredGrid *anOutput = this->GetOutput();
   
   myOut2InId.clear();  myIn2OutId.clear();
 
@@ -414,5 +409,5 @@ void VTKViewer_ExtractUnstructuredGrid::Execute()
       MESSAGE("Execute - myIn2OutId.size() = "<<myIn2OutId.size());
     }
   }*/
-//  return 1;
+  return 1;
 }
index 4b4330c7670b89988ec9a1746e8b7e05725be79f..bcb701462797d319c85e6ab1eca12424017c5763 100755 (executable)
@@ -25,7 +25,7 @@
 
 #include "VTKViewer.h"
 
-#include <vtkUnstructuredGridToUnstructuredGridFilter.h>
+#include <vtkUnstructuredGridAlgorithm.h>
 
 #include <set>
 #include <map>
 #pragma warning ( disable:4251 )
 #endif
 
-/*! \class vtkUnstructuredGridToUnstructuredGridFilter
+/*! \class vtkUnstructuredGridAlgorithm
  * \brief For more information see <a href="http://www.vtk.org/">VTK documentation</a>
  */
-/*! \class vtkUnstructuredGridToUnstructuredGridFilter
+/*! \class vtkUnstructuredGridAlgorithm
  * \brief For more information see VTK documentation.
  */
-class VTKVIEWER_EXPORT VTKViewer_ExtractUnstructuredGrid : public vtkUnstructuredGridToUnstructuredGridFilter
+class VTKVIEWER_EXPORT VTKViewer_ExtractUnstructuredGrid : public vtkUnstructuredGridAlgorithm
 {
 public:
   //! VTK type macros.
-  vtkTypeMacro( VTKViewer_ExtractUnstructuredGrid, vtkUnstructuredGridToUnstructuredGridFilter );
+  vtkTypeMacro( VTKViewer_ExtractUnstructuredGrid, vtkUnstructuredGridAlgorithm );
 
   //! \brief Construct with all types of clipping turned off.
   static VTKViewer_ExtractUnstructuredGrid *New();
@@ -107,11 +107,7 @@ protected:
   VTKViewer_ExtractUnstructuredGrid();
   ~VTKViewer_ExtractUnstructuredGrid();
 
-  //! Main method, which calculate output
-  // not ported yet to the new executive-based pipeline architecture.
-  // see http://www.vtk.org/cgi-bin/viewcvs.cgi/Filtering/vtkUnstructuredGridToUnstructuredGridFilter.h?rev=1.19&view=log
-  // virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
-  virtual void Execute();
+  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
 
   EExtraction myExtractionMode;
   
index 328d7fd07de183f12c8aa971adc202bfb2fe23a9..4064829977fe8b174eaeb170d164bffc7c5ac650 100644 (file)
@@ -39,7 +39,6 @@
 #define OFFSET_SPACING 2
 
 //==================================================================
-vtkCxxRevisionMacro(VTKViewer_FramedTextActor, "$Revision$");
 vtkStandardNewMacro(VTKViewer_FramedTextActor);
 
 //==================================================================
@@ -53,7 +52,7 @@ VTKViewer_FramedTextActor::VTKViewer_FramedTextActor()
   myTransparency=0.;
   myBar = vtkPolyData::New();
   myBarMapper = vtkPolyDataMapper2D::New();
-  myBarMapper->SetInput(myBar);
+  myBarMapper->SetInputData(myBar);
   myBarActor = vtkActor2D::New();
   myBarActor->SetMapper(myBarMapper);
   myBarActor->GetProperty()->SetOpacity(1.-myTransparency);  
@@ -160,9 +159,9 @@ void VTKViewer_FramedTextActor::GetSize(vtkRenderer* theRenderer, int theSize[2]
 // function : SetForegroundColor
 // purpose  :
 //==================================================================
-void VTKViewer_FramedTextActor::SetForegroundColor(const vtkFloatingPointType r,
-                                                   const vtkFloatingPointType g,
-                                                   const vtkFloatingPointType b)
+void VTKViewer_FramedTextActor::SetForegroundColor(const double r,
+                                                   const double g,
+                                                   const double b)
 {
   myTextProperty->SetColor(r, g, b);
   myTextMapper->GetTextProperty()->ShallowCopy(myTextProperty);
@@ -173,11 +172,11 @@ void VTKViewer_FramedTextActor::SetForegroundColor(const vtkFloatingPointType r,
 // function : GetForegroundColor
 // purpose  :
 //==================================================================
-void VTKViewer_FramedTextActor::GetForegroundColor(vtkFloatingPointType& r,
-                                                   vtkFloatingPointType& g,
-                                                   vtkFloatingPointType& b)
+void VTKViewer_FramedTextActor::GetForegroundColor(double& r,
+                                                   double& g,
+                                                   double& b)
 {
-  vtkFloatingPointType aColor[3];
+  double aColor[3];
   myTextProperty->GetColor(aColor);
   r = aColor[0];
   g = aColor[1];
@@ -188,9 +187,9 @@ void VTKViewer_FramedTextActor::GetForegroundColor(vtkFloatingPointType& r,
 // function : SetBackgroundColor
 // purpose  :
 //==================================================================
-void VTKViewer_FramedTextActor::SetBackgroundColor(const vtkFloatingPointType r,
-                                                   const vtkFloatingPointType g,
-                                                   const vtkFloatingPointType b)
+void VTKViewer_FramedTextActor::SetBackgroundColor(const double r,
+                                                   const double g,
+                                                   const double b)
 {
   myBarActor->GetProperty()->SetColor(r, g, b);
   Modified();
@@ -200,11 +199,11 @@ void VTKViewer_FramedTextActor::SetBackgroundColor(const vtkFloatingPointType r,
 // function : GetBackgroundColor
 // purpose  :
 //==================================================================
-void VTKViewer_FramedTextActor::GetBackgroundColor(vtkFloatingPointType& r,
-                                                   vtkFloatingPointType& g,
-                                                   vtkFloatingPointType& b)
+void VTKViewer_FramedTextActor::GetBackgroundColor(double& r,
+                                                   double& g,
+                                                   double& b)
 {
-  vtkFloatingPointType aColor[3];
+  double aColor[3];
   myBarActor->GetProperty()->GetColor(aColor);
   r = aColor[0];
   g = aColor[1];
@@ -215,7 +214,7 @@ void VTKViewer_FramedTextActor::GetBackgroundColor(vtkFloatingPointType& r,
 // function : SetTransparency
 // purpose  :
 //==================================================================
-void VTKViewer_FramedTextActor::SetTransparency(const vtkFloatingPointType theTransparency)
+void VTKViewer_FramedTextActor::SetTransparency(const double theTransparency)
 {
   if (theTransparency>=0.  && theTransparency<=1.){
     myTransparency=theTransparency;
@@ -228,7 +227,7 @@ void VTKViewer_FramedTextActor::SetTransparency(const vtkFloatingPointType theTr
 // function : GetTransparency
 // purpose  :
 //==================================================================
-vtkFloatingPointType VTKViewer_FramedTextActor::GetTransparency()const
+double VTKViewer_FramedTextActor::GetTransparency()const
 {
   return myTransparency;
 }
@@ -336,7 +335,7 @@ int VTKViewer_FramedTextActor::GetLayoutType() const
 // function : SetWorldPoint
 // purpose  :
 //==================================================================
-void VTKViewer_FramedTextActor::SetWorldPoint(const vtkFloatingPointType theWorldPoint[4])
+void VTKViewer_FramedTextActor::SetWorldPoint(const double theWorldPoint[4])
 {
   for(int i = 0; i<4; ++i) {
     myWorldPoint[i] = theWorldPoint[i];
@@ -348,7 +347,7 @@ void VTKViewer_FramedTextActor::SetWorldPoint(const vtkFloatingPointType theWorl
 // function : GetWorldPoint
 // purpose  :
 //==================================================================
-const vtkFloatingPointType* VTKViewer_FramedTextActor::GetWorldPoint()const 
+const double* VTKViewer_FramedTextActor::GetWorldPoint()const 
 {
   return myWorldPoint;
 }
@@ -357,7 +356,7 @@ const vtkFloatingPointType* VTKViewer_FramedTextActor::GetWorldPoint()const
 // function : SetDistance
 // purpose  :
 //==================================================================
-void VTKViewer_FramedTextActor::SetDistance(const vtkFloatingPointType theDistance)
+void VTKViewer_FramedTextActor::SetDistance(const double theDistance)
 {
   myDistance=theDistance;
 }
@@ -366,7 +365,7 @@ void VTKViewer_FramedTextActor::SetDistance(const vtkFloatingPointType theDistan
 // function : GetDistance
 // purpose  :
 //==================================================================
-vtkFloatingPointType VTKViewer_FramedTextActor::GetDistance()const
+double VTKViewer_FramedTextActor::GetDistance()const
 {
   return myDistance;
 }
@@ -457,10 +456,10 @@ VTKViewer_FramedTextActor
 
   int aTextMargin = GetTextMargin();
 
-  vtkFloatingPointType xMin = 0.0;
-  vtkFloatingPointType xMax = 0.0;
-  vtkFloatingPointType yMin = -aBarHeight/2 - aTextMargin;
-  vtkFloatingPointType yMax =  aBarHeight/2 + aTextMargin;
+  double xMin = 0.0;
+  double xMax = 0.0;
+  double yMin = -aBarHeight/2 - aTextMargin;
+  double yMax =  aBarHeight/2 + aTextMargin;
 
   int aHorizontalOffset = GetLayoutType() == Horizontal ? myHorizontalOffset : 0;
   int aVerticalOffset = GetLayoutType() == Vertical ? myVerticalOffset : 0;
@@ -470,10 +469,10 @@ VTKViewer_FramedTextActor
     theViewport->SetWorldPoint(myWorldPoint);
     theViewport->WorldToDisplay();
 
-    vtkFloatingPointType aSelectionPoint[3];
+    double aSelectionPoint[3];
     theViewport->GetDisplayPoint(aSelectionPoint);
-    vtkFloatingPointType u = aSelectionPoint[0];
-    vtkFloatingPointType v = aSelectionPoint[1] - myDistance;
+    double u = aSelectionPoint[0];
+    double v = aSelectionPoint[1] - myDistance;
     if(myMoveFrameFlag)
       v -= aBarHeight/2.;
     theViewport->ViewportToNormalizedViewport(u, v);
@@ -486,8 +485,8 @@ VTKViewer_FramedTextActor
   }
   else // except BelowPoint, only TopLeft and TopRight modes are supported at this moment
   {
-    vtkFloatingPointType x = 0, xOffset = aHorizontalOffset + aTextMargin + OFFSET_SPACING;
-    vtkFloatingPointType y = 0, yOffset = aVerticalOffset + aTextMargin + OFFSET_SPACING;
+    double x = 0, xOffset = aHorizontalOffset + aTextMargin + OFFSET_SPACING;
+    double y = 0, yOffset = aVerticalOffset + aTextMargin + OFFSET_SPACING;
 
     if( myModePosition == TopLeft )
     {
@@ -508,8 +507,8 @@ VTKViewer_FramedTextActor
       xMax =              aTextMargin;
     }
 
-    PositionCoordinate->SetValue(x / (vtkFloatingPointType)aViewPortWidth,
-                                 y / (vtkFloatingPointType)aViewPortHeight);
+    PositionCoordinate->SetValue(x / (double)aViewPortWidth,
+                                 y / (double)aViewPortHeight);
   }
 
   aPoints->SetPoint(0, xMin, yMax, 0.0);
index 0a3e95be314d9e5a2bb0454766b4caf30ba5a133..5f2de984e498d123dc1e7e8f90f2ee7888de090b 100644 (file)
@@ -40,7 +40,7 @@ public:
   enum LayoutType { Vertical = 0, Horizontal };
 
 public:
-  vtkTypeRevisionMacro(VTKViewer_FramedTextActor,vtkActor2D);
+  vtkTypeMacro(VTKViewer_FramedTextActor,vtkActor2D);
   static VTKViewer_FramedTextActor *New();
 
   virtual int                 RenderOpaqueGeometry(vtkViewport*);
@@ -64,31 +64,31 @@ public:
   void                        SetLayoutType(const int theType);
   int                         GetLayoutType() const;
 
-  void                        SetWorldPoint(const vtkFloatingPointType theWorldPoint[4]);
-  const vtkFloatingPointType* GetWorldPoint() const;
+  void                        SetWorldPoint(const double theWorldPoint[4]);
+  const double* GetWorldPoint() const;
 
-  void                        SetDistance(const vtkFloatingPointType theDistance);
-  vtkFloatingPointType        GetDistance() const;
+  void                        SetDistance(const double theDistance);
+  double        GetDistance() const;
 
   void                        SetMoveFrameFlag(const int flag);
   int                         GetMoveFrameFlag() const;
 
-  void                        SetForegroundColor(const vtkFloatingPointType r,
-                                                 const vtkFloatingPointType g,
-                                                 const vtkFloatingPointType b);
-  void                        GetForegroundColor(vtkFloatingPointType& r,
-                                                 vtkFloatingPointType& g,
-                                                 vtkFloatingPointType& b);
+  void                        SetForegroundColor(const double r,
+                                                 const double g,
+                                                 const double b);
+  void                        GetForegroundColor(double& r,
+                                                 double& g,
+                                                 double& b);
 
-  void                        SetBackgroundColor(const vtkFloatingPointType r,
-                                                 const vtkFloatingPointType g,
-                                                 const vtkFloatingPointType b);
-  void                        GetBackgroundColor(vtkFloatingPointType& r,
-                                                 vtkFloatingPointType& g,
-                                                 vtkFloatingPointType& b);
+  void                        SetBackgroundColor(const double r,
+                                                 const double g,
+                                                 const double b);
+  void                        GetBackgroundColor(double& r,
+                                                 double& g,
+                                                 double& b);
 
-  void                        SetTransparency(const vtkFloatingPointType theTransparency);
-  vtkFloatingPointType        GetTransparency() const;
+  void                        SetTransparency(const double theTransparency);
+  double        GetTransparency() const;
 
   void                        SetTextMargin(const int theMargin);
   int                         GetTextMargin() const;
@@ -114,9 +114,9 @@ protected:
   int                         myLayoutType;
   int                         myMoveFrameFlag;
 
-  vtkFloatingPointType        myWorldPoint[4];
-  vtkFloatingPointType        myDistance;
-  vtkFloatingPointType        myTransparency;
+  double        myWorldPoint[4];
+  double        myDistance;
+  double        myTransparency;
 
   int                         myTextMargin;
 
index 7d139de0727e0000a820b41267b38454aae04a6b..e6464522423a4b136fea63eea0d94be936cbd145 100755 (executable)
@@ -90,7 +90,6 @@
 #endif
 ///////////////////////////////////////////////////////////////////////////////////////////////
 
-vtkCxxRevisionMacro(VTKViewer_GeometryFilter, "$Revision$");
 vtkStandardNewMacro(VTKViewer_GeometryFilter);
 
 VTKViewer_GeometryFilter
@@ -184,13 +183,13 @@ VTKViewer_GeometryFilter
   char *cellVis;
   vtkIdType newCellId;
   int faceId, *faceVerts, numFacePts;
-  vtkFloatingPointType *x;
+  double *x;
   vtkIdType PixelConvert[4];
   // Change the type from int to vtkIdType in order to avoid compilation errors while using VTK
   // from ParaView-3.4.0 compiled on 64-bit Debian platform with VTK_USE_64BIT_IDS = ON
   vtkIdType aNewPts[VTK_CELL_SIZE];
   // ghost cell stuff
-  unsigned char  updateLevel = (unsigned char)(output->GetUpdateGhostLevel());
+  unsigned char  updateLevel = (unsigned char)(GetUpdateGhostLevel());
   unsigned char  *cellGhostLevels = 0;
 
   PixelConvert[0] = 0;
@@ -1525,7 +1524,7 @@ bool VTKViewer_GeometryFilter::GetQuadraticArcMode() const
   return myIsBuildArc;
 }
 
-void VTKViewer_GeometryFilter::SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle)
+void VTKViewer_GeometryFilter::SetQuadraticArcAngle(double theMaxAngle)
 {
   if(myMaxArcAngle != theMaxAngle) {
     myMaxArcAngle = theMaxAngle;
@@ -1533,7 +1532,7 @@ void VTKViewer_GeometryFilter::SetQuadraticArcAngle(vtkFloatingPointType theMaxA
   }
 }
 
-vtkFloatingPointType VTKViewer_GeometryFilter:: GetQuadraticArcAngle() const
+double VTKViewer_GeometryFilter:: GetQuadraticArcAngle() const
 {
   return myMaxArcAngle;
 }
index 53a36f4e8a9ec5058a24e8a59e8ea5ae2d5fc52c..e4ecab87d9b53a83a52f7f3e064d366c3362325b 100755 (executable)
@@ -45,10 +45,10 @@ public:
    */
   static VTKViewer_GeometryFilter *New();
   
-  /*! \fn vtkTypeRevisionMacro(VTKViewer_GeometryFilter, vtkGeometryFilter)
+  /*! \fn vtkTypeMacro(VTKViewer_GeometryFilter, vtkGeometryFilter)
    *  \brief VTK type revision macros.
    */
-  vtkTypeRevisionMacro(VTKViewer_GeometryFilter, vtkGeometryFilter);
+  vtkTypeMacro(VTKViewer_GeometryFilter, vtkGeometryFilter);
   /*! \fn void SetInside(int theShowInside)
    * \brief Sets \a myShowInside flag. \a myShowInside is changed, call this->Modified().
    * \param theShowInside - used for changing value of \a myShowInside variable.
@@ -106,8 +106,8 @@ public:
   virtual void SetQuadraticArcMode(bool theFlag);
   virtual bool GetQuadraticArcMode() const;
 
-  virtual void   SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle);
-  virtual vtkFloatingPointType GetQuadraticArcAngle() const;
+  virtual void   SetQuadraticArcAngle(double theMaxAngle);
+  virtual double GetQuadraticArcAngle() const;
 
   typedef std::vector<vtkIdType> TVectorId;
   typedef std::map<vtkIdType, TVectorId> TMapOfVectorId;
@@ -150,7 +150,7 @@ private:
   int       myIsWireframeMode;
   int       myAppendCoincident3D;
 
-  vtkFloatingPointType    myMaxArcAngle;   // define max angle for mesh 2D quadratic element in the degrees
+  double    myMaxArcAngle;   // define max angle for mesh 2D quadratic element in the degrees
   bool      myIsBuildArc;     // flag for representation 2D quadratic element as arked polygon
 };
 
index bc5e342cf86a79946df40e214d8e6442ce34245b..b07eaf3ba27a6db758f264afc37b1b1f10f6410d 100644 (file)
@@ -1347,17 +1347,17 @@ void VTKViewer_InteractorStyle::Place(const int theX, const int theY)
 void VTKViewer_InteractorStyle::TranslateView(int toX, int toY, int fromX, int fromY)
 {
   vtkCamera *cam = this->CurrentRenderer->GetActiveCamera();
-  vtkFloatingPointType viewFocus[4], focalDepth, viewPoint[3];
-  vtkFloatingPointType newPickPoint[4], oldPickPoint[4], motionVector[3];
+  double viewFocus[4], focalDepth, viewPoint[3];
+  double newPickPoint[4], oldPickPoint[4], motionVector[3];
   cam->GetFocalPoint(viewFocus);
 
   this->ComputeWorldToDisplay(viewFocus[0], viewFocus[1],
                               viewFocus[2], viewFocus);
   focalDepth = viewFocus[2];
 
-  this->ComputeDisplayToWorld(vtkFloatingPointType(toX), vtkFloatingPointType(toY),
+  this->ComputeDisplayToWorld(double(toX), double(toY),
                               focalDepth, newPickPoint);
-  this->ComputeDisplayToWorld(vtkFloatingPointType(fromX),vtkFloatingPointType(fromY),
+  this->ComputeDisplayToWorld(double(fromX),double(fromY),
                               focalDepth, oldPickPoint);
   
   // camera motion is reversed
@@ -1381,17 +1381,17 @@ bool VTKViewer_InteractorStyle::IsInRect(vtkActor* theActor,
                                                const int left, const int top, 
                                                const int right, const int bottom)
 {
-  vtkFloatingPointType* aBounds = theActor->GetBounds();
-  vtkFloatingPointType aMin[3], aMax[3];
+  double* aBounds = theActor->GetBounds();
+  double aMin[3], aMax[3];
   ComputeWorldToDisplay(aBounds[0], aBounds[2], aBounds[4], aMin);
   ComputeWorldToDisplay(aBounds[1], aBounds[3], aBounds[5], aMax);
   if (aMin[0] > aMax[0]) {
-    vtkFloatingPointType aBuf = aMin[0];
+    double aBuf = aMin[0];
     aMin[0] = aMax[0];
     aMax[0] = aBuf;
   }
   if (aMin[1] > aMax[1]) {
-    vtkFloatingPointType aBuf = aMin[1];
+    double aBuf = aMin[1];
     aMin[1] = aMax[1];
     aMax[1] = aBuf;    
   }
@@ -1405,17 +1405,17 @@ bool VTKViewer_InteractorStyle::IsInRect(vtkCell* theCell,
                                                const int left, const int top, 
                                                const int right, const int bottom)
 {
-  vtkFloatingPointType* aBounds = theCell->GetBounds();
-  vtkFloatingPointType aMin[3], aMax[3];
+  double* aBounds = theCell->GetBounds();
+  double aMin[3], aMax[3];
   ComputeWorldToDisplay(aBounds[0], aBounds[2], aBounds[4], aMin);
   ComputeWorldToDisplay(aBounds[1], aBounds[3], aBounds[5], aMax);
   if (aMin[0] > aMax[0]) {
-    vtkFloatingPointType aBuf = aMin[0];
+    double aBuf = aMin[0];
     aMin[0] = aMax[0];
     aMax[0] = aBuf;
   }
   if (aMin[1] > aMax[1]) {
-    vtkFloatingPointType aBuf = aMin[1];
+    double aBuf = aMin[1];
     aMin[1] = aMax[1];
     aMax[1] = aBuf;    
   }
@@ -1424,11 +1424,11 @@ bool VTKViewer_InteractorStyle::IsInRect(vtkCell* theCell,
 }
 
 /*!Checks: is given point \a thePoint in rectangle*/
-bool VTKViewer_InteractorStyle::IsInRect(vtkFloatingPointType* thePoint, 
+bool VTKViewer_InteractorStyle::IsInRect(double* thePoint, 
                                          const int left, const int top, 
                                          const int right, const int bottom)
 {
-  vtkFloatingPointType aPnt[3];
+  double aPnt[3];
   ComputeWorldToDisplay(thePoint[0], thePoint[1], thePoint[2], aPnt);
 
   return ((aPnt[0]>left) && (aPnt[0]<right) && (aPnt[1]>bottom) && (aPnt[1]<top));
index 35ff5022dbed2cfddb8cbeba38a408771d481344..45b0dfe0fe443ba42e4d44178037f5a5cf2cf4bd 100644 (file)
@@ -128,13 +128,13 @@ class VTKVIEWER_EXPORT VTKViewer_InteractorStyle : public QObject, public vtkInt
   bool IsInRect(vtkCell* theCell, 
                 const int left, const int top, 
                 const int right, const int bottom);
-  bool IsInRect(vtkFloatingPointType* thePoint, 
+  bool IsInRect(double* thePoint, 
                 const int left, const int top, 
                 const int right, const int bottom);
 
   int State;
-  vtkFloatingPointType MotionFactor;
-  vtkFloatingPointType RadianToDegree;                 // constant: for conv from deg to rad
+  double MotionFactor;
+  double RadianToDegree;                 // constant: for conv from deg to rad
   double myScale;
 
   VTKViewer_Actor *myPreViewActor, *myPreSelectionActor, *mySelectedActor;
index f21af7dc82d4213f99928284af232e0ecfb5ab28..32b0fdc093373d413367460e46e9365826dc1e1e 100755 (executable)
@@ -92,9 +92,7 @@ namespace VTK
     anImageData->Delete();
 
     anImageData->SetExtent( 0, aWidth-1, 0, aHeight-1, 0, 0 );
-    anImageData->SetScalarTypeToUnsignedChar();
-    anImageData->SetNumberOfScalarComponents( 4 );
-    anImageData->AllocateScalars();
+    anImageData->AllocateScalars( VTK_UNSIGNED_CHAR, 4 );
 
     unsigned char* aDataPtr = (unsigned char*)anImageData->GetScalarPointer();
 
@@ -109,7 +107,6 @@ namespace VTK
       aDataPtr[ anId++ ] = aValue * aCoef;
       aDataPtr[ anId++ ] = aValue;
     }
-    anImageData->Update();
 
     return anImageData;
   }
index 019350a173c7c91d33ae4fc6946134ebdf04df75..afd07fa9ebbb5db947fc50ae40a1682d630c5c6c 100644 (file)
@@ -46,7 +46,6 @@
 #endif
 
 #ifndef VTK_IMPLEMENT_MESA_CXX
-vtkCxxRevisionMacro(VTKViewer_PolyDataMapper, "Revision$");
 vtkStandardNewMacro(VTKViewer_PolyDataMapper);
 #endif
 
@@ -316,7 +315,7 @@ namespace VTK
   //-----------------------------------------------------------------------------
   struct TColorFunctorBase
   {
-    vtkFloatingPointType myAlpha;
+    double myAlpha;
 
     TColorFunctorBase( vtkProperty* theProperty )
     {
@@ -331,7 +330,7 @@ namespace VTK
   //-----------------------------------------------------------------------------
   struct TPropertyColor : TColorFunctorBase
   {
-    vtkFloatingPointType myColor[3];
+    double myColor[3];
 
     TPropertyColor( vtkProperty* theProperty ):
       TColorFunctorBase( theProperty )
index 80d04a7834c5519ea3f90cf0362cd59708c1c89c..350c1090296d2421fec9bd64060cdf578d9fe957 100644 (file)
@@ -60,7 +60,7 @@ public:
 
 public:
   static VTKViewer_PolyDataMapper* New();
-  vtkTypeRevisionMacro( VTKViewer_PolyDataMapper, MAPPER_SUPERCLASS );
+  vtkTypeMacro( VTKViewer_PolyDataMapper, MAPPER_SUPERCLASS );
 
   //! Set point marker enabled
   void SetMarkerEnabled( bool );
index ee6c9f2c823e0bcdcd4d505408f2a0667bdedc53..ba212288c92cc23eb68d6887e321ebbf73701ad6 100755 (executable)
@@ -144,7 +144,7 @@ void VTKViewer_RenderWindow::wheelEvent(QWheelEvent* event)
 void VTKViewer_RenderWindow::onChangeBackgroundColor()
 {
   //float red, green, blue;
-  vtkFloatingPointType backint[3];
+  double backint[3];
 
   vtkRendererCollection * theRenderers = myRW->GetRenderers();
   theRenderers->InitTraversal();
index a47647fda9288579119289c380a333425ad07e8d..10382acb4ff3604f721adc3920c62613328608b8 100755 (executable)
@@ -708,7 +708,7 @@ void VTKViewer_RenderWindowInteractor::setActorData(const TColStd_IndexedMapOfIn
                                                     TUpdateActor theFun)
 {
   (*theFun)(theMapIndex,theMapActor,theActor);
-  vtkFloatingPointType aPos[3];
+  double aPos[3];
   theMapActor->GetPosition(aPos);
   theActor->SetPosition(aPos);
 }
index 7e551972dd91d03c17a77fb166602a8951218834..38019350fb1b67d1b026cafcb28cb7fd295c6787 100755 (executable)
@@ -35,7 +35,6 @@
 #include <vtkInformation.h>
 #include <vtkInformationVector.h>
 
-vtkCxxRevisionMacro(VTKViewer_ShrinkFilter, "$Revision$");
 vtkStandardNewMacro(VTKViewer_ShrinkFilter);
 
 /*!Constructor. Sets store mapping to zero.*/
@@ -68,11 +67,11 @@ int VTKViewer_ShrinkFilter::RequestData(
   int i, j, numIds, abort=0;
   vtkIdType cellId, numCells, numPts;
   vtkIdType oldId, newId;
-  vtkFloatingPointType center[3], *p, pt[3];
+  double center[3], *p, pt[3];
   vtkPointData *pd, *outPD;;
   vtkIdList *ptIds, *newPtIds;
   vtkIdType tenth;
-  vtkFloatingPointType decimal;
+  double decimal;
 
   vtkDebugMacro(<<"Shrinking cells");
 
index a628778c4a7564310f7abd3e187836ea8e751c85..6bbfa7618bbb253f22e3a0c73f503be0d37785e7 100755 (executable)
@@ -41,7 +41,7 @@ class VTKVIEWER_EXPORT VTKViewer_ShrinkFilter : public vtkShrinkFilter
 public:
   /*!Create new instance of VTKViewer_ShrinkFilter.*/
   static VTKViewer_ShrinkFilter *New();
-  vtkTypeRevisionMacro(VTKViewer_ShrinkFilter, vtkShrinkFilter);
+  vtkTypeMacro(VTKViewer_ShrinkFilter, vtkShrinkFilter);
 
   void SetStoreMapping(int theStoreMapping);
   /*!Gets store mapping flag.*/
index 9f279af6740db2a54d8adb333dd995ee96b8b9a9..3818e59a22c1281c462029c1bc7b2b020da9a4c2 100755 (executable)
@@ -59,7 +59,7 @@ VTKViewer_UnScaledActor::VTKViewer_UnScaledActor()
 /*!
   \return bounding box
 */
-vtkFloatingPointType* 
+double* 
 VTKViewer_UnScaledActor
 ::GetBounds()
 {
@@ -80,24 +80,24 @@ void VTKViewer_UnScaledActor::SetSize(int theSize)
 void VTKViewer_UnScaledActor::Render(vtkRenderer *theRenderer)
 {
   if(theRenderer){
-    vtkFloatingPointType P[2][3] = {{-1.0, -1.0, 0.0},{+1.0, +1.0, 0.0}};
+    double P[2][3] = {{-1.0, -1.0, 0.0},{+1.0, +1.0, 0.0}};
     theRenderer->ViewToWorld(P[0][0],P[0][1],P[0][2]);
     theRenderer->ViewToWorld(P[1][0],P[1][1],P[1][2]);
-    vtkFloatingPointType aWorldDiag = sqrt((P[1][0]-P[0][0])*(P[1][0]-P[0][0])+
+    double aWorldDiag = sqrt((P[1][0]-P[0][0])*(P[1][0]-P[0][0])+
                                            (P[1][1]-P[0][1])*(P[1][1]-P[0][1])+
                                            (P[1][2]-P[0][2])*(P[1][2]-P[0][2]));
     int* aSize = theRenderer->GetRenderWindow()->GetSize();
-    vtkFloatingPointType aWinDiag = sqrt(vtkFloatingPointType(aSize[0]*aSize[0]+aSize[1]*aSize[1]));
+    double aWinDiag = sqrt(double(aSize[0]*aSize[0]+aSize[1]*aSize[1]));
     vtkDataSet* aDataSet = GetMapper()->GetInput();
-    aDataSet->Update();
-    vtkFloatingPointType aLength = aDataSet->GetLength();
-    vtkFloatingPointType aPrecision = 1.0E-3;
-    vtkFloatingPointType aZeroTol   = 1.0E-12;
-    vtkFloatingPointType anOldScale = GetScale()[0];
-    vtkFloatingPointType aScale = anOldScale;
-    vtkFloatingPointType aMaxSize = (vtkFloatingPointType)qMax(aSize[1],aSize[0]);
+    GetMapper()->Update();
+    double aLength = aDataSet->GetLength();
+    double aPrecision = 1.0E-3;
+    double aZeroTol   = 1.0E-12;
+    double anOldScale = GetScale()[0];
+    double aScale = anOldScale;
+    double aMaxSize = (double)qMax(aSize[1],aSize[0]);
     if (qAbs(aWinDiag) > aZeroTol && qAbs(aLength) > aZeroTol && qAbs(aMaxSize) > aZeroTol)
-      aScale = mySize*aWorldDiag/aWinDiag/aLength*sqrt(vtkFloatingPointType(qMin(aSize[1],aSize[0]))/aMaxSize);
+      aScale = mySize*aWorldDiag/aWinDiag/aLength*sqrt(double(qMin(aSize[1],aSize[0]))/aMaxSize);
     if(qAbs(aScale) > aZeroTol && qAbs(aScale - anOldScale)/aScale > aPrecision){
       SetScale(aScale);
     }
@@ -140,7 +140,7 @@ VTKViewer_Axis::VTKViewer_Axis()
   myLineSource->SetPoint1(0.0,0.0,0.0);
   
   myMapper[0] = vtkPolyDataMapper::New();
-  myMapper[0]->SetInput(myLineSource->GetOutput());
+  myMapper[0]->SetInputConnection(myLineSource->GetOutputPort());
   
   myLineActor = VTKViewer_LineActor::New();
   myLineActor->SetMapper(myMapper[0]);
@@ -153,7 +153,7 @@ VTKViewer_Axis::VTKViewer_Axis()
   myConeSource->SetCenter(-0.5,0.0,0.0);
   
   myMapper[1] = vtkPolyDataMapper::New();
-  myMapper[1]->SetInput(myConeSource->GetOutput());
+  myMapper[1]->SetInputConnection(myConeSource->GetOutputPort());
   
   myArrowActor = vtkFollower::New();
   myArrowActor->SetMapper(myMapper[1]);
@@ -169,7 +169,7 @@ VTKViewer_Axis::VTKViewer_Axis()
   
   myLabelActor = vtkTextActor::New();
   myLabelActor->SetMapper(myTextMapper);
-  myLabelActor->ScaledTextOff();
+  myLabelActor->SetTextScaleModeToNone();
   myLabelActor->PickableOff();
   
   vtkCoordinate* aCoord = vtkCoordinate::New();
@@ -179,7 +179,7 @@ VTKViewer_Axis::VTKViewer_Axis()
   myVectorText = vtkVectorText::New();
   
   myMapper[2] = vtkPolyDataMapper::New();
-  myMapper[2]->SetInput(myVectorText->GetOutput());
+  myMapper[2]->SetInputConnection(myVectorText->GetOutputPort());
   
   myLabelActor = VTKViewer_UnScaledActor::New();
   myLabelActor->SetMapper(myMapper[2]);
@@ -308,12 +308,12 @@ void VTKViewer_Axis::SetColor(double theRed, double theGreen, double theBlue)
 
 /*! Set size of VTKViewer_Axis
  */
-void VTKViewer_Axis::SetSize(vtkFloatingPointType theSize)
+void VTKViewer_Axis::SetSize(double theSize)
 {
-  vtkFloatingPointType aPosition[3] = {myDir[0]*theSize, myDir[1]*theSize, myDir[2]*theSize};
+  double aPosition[3] = {myDir[0]*theSize, myDir[1]*theSize, myDir[2]*theSize};
 
-  vtkFloatingPointType aCoef = 0.99;
-  vtkFloatingPointType aLinePosition[3] = {aPosition[0]*aCoef, aPosition[1]*aCoef, aPosition[2]*aCoef};
+  double aCoef = 0.99;
+  double aLinePosition[3] = {aPosition[0]*aCoef, aPosition[1]*aCoef, aPosition[2]*aCoef};
   myLineSource->SetPoint2(aLinePosition);
   
   myArrowActor->SetPosition(0.0,0.0,0.0);
@@ -438,7 +438,7 @@ VTKViewer_Trihedron::VTKViewer_Trihedron()
   myAxis[0] = VTKViewer_XAxis::New();
   myAxis[1] = VTKViewer_YAxis::New();
   myAxis[2] = VTKViewer_ZAxis::New();
-  static vtkFloatingPointType aSize = 100;
+  static double aSize = 100;
   SetSize(aSize);
 }
 
@@ -455,7 +455,7 @@ VTKViewer_Trihedron::~VTKViewer_Trihedron()
 
 /*! Set size of axes
  */
-void VTKViewer_Trihedron::SetSize(vtkFloatingPointType theSize)
+void VTKViewer_Trihedron::SetSize(double theSize)
 {
   mySize = theSize;
   for(int i = 0; i < 3; i++)
index c07aa4df950896efa016ad21ca249b95cfd47225..9f3d6136f1a9490291afc2037e2fa9958fb53310 100755 (executable)
@@ -27,6 +27,7 @@
 
 #include <vtkObject.h>
 #include <vtkFollower.h>
+#include <vtkVersion.h>
 
 class vtkRenderer;
 class vtkActorCollection;
@@ -69,7 +70,7 @@ public:
   /*!Create new instance of VTKViewer_UnScaledActor.*/
   static VTKViewer_UnScaledActor *New();
   
-  virtual vtkFloatingPointType* GetBounds();
+  virtual double* GetBounds();
   virtual void SetSize(int theSize);
   virtual void Render(vtkRenderer *theRenderer);
 
@@ -160,14 +161,14 @@ public:
   static VTKViewer_Trihedron *New();
   
   /*!Sets size of trihedron.
-   * \param theSize - vtkFloatingPointType value
+   * \param theSize - double value
    */
-  virtual void        SetSize(vtkFloatingPointType theSize);
+  virtual void        SetSize(double theSize);
 
   /*! Get size of trihedron.
-   * \retval mySize - vtkFloatingPointType value
+   * \retval mySize - double value
    */
-  virtual vtkFloatingPointType  GetSize() { return mySize;}
+  virtual double  GetSize() { return mySize;}
   
   enum TVisibility{eOff, eOn, eOnlyLineOn};
   
@@ -215,7 +216,7 @@ protected:
   VTKViewer_Axis*     myAxis[3];
   
   /*! Common size for trihedron, for each axis.*/
-  vtkFloatingPointType mySize;
+  double mySize;
 };
 
 /*!The base class for concreate Axis.
@@ -260,7 +261,7 @@ public:
   
   /*! Set size of VTKViewer_Axis
    */
-  virtual void SetSize(vtkFloatingPointType theSize);
+  virtual void SetSize(double theSize);
   
   /*! Get label actor.
    * \retval Return myLabelActor.
@@ -293,7 +294,7 @@ protected:
   /*! \var myRot[3]
    * Orientation vector
    */
-  vtkFloatingPointType myDir[3], myRot[3];
+  double myDir[3], myRot[3];
   
   /*! VTKViewer_LineActor actor pointer
    */
index d8d7e0945723db6f95e8edf172a7a35090985d8e..816684554519ca039f52ecb3d6fbf52b2e038a3d 100755 (executable)
@@ -32,7 +32,7 @@
 #include <vtkRenderer.h>
 #include <vtkRenderWindow.h>
 
-/*!@see vtkRenderer::ResetCamera(vtkFloatingPointType bounds[6]) method*/
+/*!@see vtkRenderer::ResetCamera(double bounds[6]) method*/
 void 
 ResetCamera(vtkRenderer* theRenderer, 
             int theUsingZeroFocalPoint)
@@ -44,20 +44,20 @@ ResetCamera(vtkRenderer* theRenderer,
   if(!aCamera) 
     return;
 
-  vtkFloatingPointType aBounds[6];
+  double aBounds[6];
   int aCount = ComputeVisiblePropBounds(theRenderer,aBounds);
 
   if(theUsingZeroFocalPoint || aCount){
-    static vtkFloatingPointType MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT;
+    static double MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT;
 
-    vtkFloatingPointType aLength = aBounds[1]-aBounds[0];
+    double aLength = aBounds[1]-aBounds[0];
     aLength = std::max((aBounds[3]-aBounds[2]),aLength);
     aLength = std::max((aBounds[5]-aBounds[4]),aLength);
     
     if(aLength < MIN_DISTANCE)
       return;
 
-    vtkFloatingPointType aWidth = 
+    double 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]));
@@ -65,10 +65,10 @@ ResetCamera(vtkRenderer* theRenderer,
     if(aWidth < MIN_DISTANCE)
       return;
 
-    vtkFloatingPointType aViewPlaneNormal[3];
+    double aViewPlaneNormal[3];
     aCamera->GetViewPlaneNormal(aViewPlaneNormal);
     
-    vtkFloatingPointType aCenter[3] = {0.0, 0.0, 0.0};
+    double aCenter[3] = {0.0, 0.0, 0.0};
     if(!theUsingZeroFocalPoint){
       aCenter[0] = (aBounds[0] + aBounds[1])/2.0;
       aCenter[1] = (aBounds[2] + aBounds[3])/2.0;
@@ -76,11 +76,11 @@ ResetCamera(vtkRenderer* theRenderer,
     }
     aCamera->SetFocalPoint(aCenter[0],aCenter[1],aCenter[2]);
     
-    vtkFloatingPointType aViewAngle = aCamera->GetViewAngle();
-    vtkFloatingPointType aDistance = 2.0*aWidth/tan(aViewAngle*vtkMath::Pi()/360.0);
+    double aViewAngle = aCamera->GetViewAngle();
+    double aDistance = 2.0*aWidth/tan(aViewAngle*vtkMath::Pi()/360.0);
     
     // check view-up vector against view plane normal
-    vtkFloatingPointType aViewUp[3];
+    double aViewUp[3];
     aCamera->GetViewUp(aViewUp);
     if(fabs(vtkMath::Dot(aViewUp,aViewPlaneNormal)) > 0.999)
       aCamera->SetViewUp(-aViewUp[2], aViewUp[0], aViewUp[1]);
@@ -93,7 +93,7 @@ ResetCamera(vtkRenderer* theRenderer,
     // find size of the window
     int* aWinSize = theRenderer->GetSize();
     if(aWinSize[0] < aWinSize[1]) 
-      aWidth *= vtkFloatingPointType(aWinSize[1])/vtkFloatingPointType(aWinSize[0]);
+      aWidth *= double(aWinSize[1])/double(aWinSize[0]);
     
     if(theUsingZeroFocalPoint) 
       aWidth *= sqrt(2.0);
@@ -107,7 +107,7 @@ ResetCamera(vtkRenderer* theRenderer,
 /*! Compute the bounds of the visible props*/
 int
 ComputeVisiblePropBounds(vtkRenderer* theRenderer, 
-                         vtkFloatingPointType theBounds[6])
+                         double theBounds[6])
 {
   int aCount = 0;
   
@@ -124,9 +124,9 @@ ComputeVisiblePropBounds(vtkRenderer* theRenderer,
       if(VTKViewer_Actor* anActor = VTKViewer_Actor::SafeDownCast(aProp))
         if(anActor->IsInfinitive())
           continue;
-      vtkFloatingPointType *aBounds = aProp->GetBounds();
-      static vtkFloatingPointType MIN_DISTANCE = 1./VTK_LARGE_FLOAT;
-      static vtkFloatingPointType MAX_DISTANCE = 0.9*VTK_LARGE_FLOAT;
+      double *aBounds = aProp->GetBounds();
+      static double MIN_DISTANCE = 1./VTK_LARGE_FLOAT;
+      static double MAX_DISTANCE = 0.9*VTK_LARGE_FLOAT;
 
       if(abs(aBounds[1] - aBounds[0]) < MIN_DISTANCE) {
         aBounds[0]-=0.001;
@@ -165,7 +165,7 @@ ComputeVisiblePropBounds(vtkRenderer* theRenderer,
   return aCount;
 }
 
-/*!@see vtkRenderer::ResetCameraClippingRange(vtkFloatingPointType bounds[6]) method*/
+/*!@see vtkRenderer::ResetCameraClippingRange(double bounds[6]) method*/
 void
 ResetCameraClippingRange(vtkRenderer* theRenderer)
 {
@@ -177,29 +177,29 @@ ResetCameraClippingRange(vtkRenderer* theRenderer)
   }
   
   // Find the plane equation for the camera view plane
-  vtkFloatingPointType vn[3];
+  double vn[3];
   anActiveCamera->GetViewPlaneNormal(vn);
-  vtkFloatingPointType  position[3];
+  double  position[3];
   anActiveCamera->GetPosition(position);
   
-  vtkFloatingPointType bounds[6];
+  double bounds[6];
   //theRenderer->ComputeVisiblePropBounds(bounds);
   ComputeVisiblePropBounds(theRenderer, bounds);
   
-  vtkFloatingPointType center[3];
+  double center[3];
   center[0] = (bounds[0] + bounds[1])/2.0;
   center[1] = (bounds[2] + bounds[3])/2.0;
   center[2] = (bounds[4] + bounds[5])/2.0;
   
-  vtkFloatingPointType width = sqrt((bounds[1]-bounds[0])*(bounds[1]-bounds[0]) +
+  double width = sqrt((bounds[1]-bounds[0])*(bounds[1]-bounds[0]) +
     (bounds[3]-bounds[2])*(bounds[3]-bounds[2]) +
     (bounds[5]-bounds[4])*(bounds[5]-bounds[4]));
   
-  vtkFloatingPointType distance = sqrt((position[0]-center[0])*(position[0]-center[0]) +
+  double distance = sqrt((position[0]-center[0])*(position[0]-center[0]) +
        (position[1]-center[1])*(position[1]-center[1]) +
        (position[2]-center[2])*(position[2]-center[2]));
   
-  vtkFloatingPointType range[2] = {distance - width/2.0, distance + width/2.0};
+  double range[2] = {distance - width/2.0, distance + width/2.0};
   
   // Do not let the range behind the camera throw off the calculation.
   if (range[0] < 0.0) range[0] = 0.0;
@@ -210,24 +210,24 @@ ResetCameraClippingRange(vtkRenderer* theRenderer)
 /*!Compute trihedron size.*/
 bool
 ComputeTrihedronSize( vtkRenderer* theRenderer,
-                      vtkFloatingPointType& theNewSize,
-                      const vtkFloatingPointType theSize, 
-                      const vtkFloatingPointType theSizeInPercents )
+                      double& theNewSize,
+                      const double theSize, 
+                      const double theSizeInPercents )
 {
   // calculating diagonal of visible props of the renderer
-  vtkFloatingPointType bnd[ 6 ];
+  double bnd[ 6 ];
   if ( ComputeVisiblePropBounds( theRenderer, bnd ) == 0 )
   {
     bnd[ 1 ] = bnd[ 3 ] = bnd[ 5 ] = 100;
     bnd[ 0 ] = bnd[ 2 ] = bnd[ 4 ] = 0;
   }
-  vtkFloatingPointType aLength = 0;
+  double aLength = 0;
 
   aLength = bnd[ 1 ]-bnd[ 0 ];
   aLength = std::max( ( bnd[ 3 ] - bnd[ 2 ] ),aLength );
   aLength = std::max( ( bnd[ 5 ] - bnd[ 4 ] ),aLength );
 
-  static vtkFloatingPointType EPS_SIZE = 5.0E-3;
+  static double EPS_SIZE = 5.0E-3;
   theNewSize = aLength * theSizeInPercents / 100.0;
 
   // if the new trihedron size have sufficient difference, then apply the value
@@ -240,7 +240,7 @@ bool IsBBEmpty(vtkRenderer* theRenderer)
   if(!theRenderer)
     return false;
 
-  vtkFloatingPointType aNewBndBox[6];
+  double aNewBndBox[6];
   aNewBndBox[ 0 ] = aNewBndBox[ 2 ] = aNewBndBox[ 4 ] = VTK_LARGE_FLOAT;
   aNewBndBox[ 1 ] = aNewBndBox[ 3 ] = aNewBndBox[ 5 ] = -VTK_LARGE_FLOAT;
   
@@ -254,7 +254,7 @@ bool IsBBEmpty(vtkRenderer* theRenderer)
     if(VTKViewer_Actor* anActor = VTKViewer_Actor::SafeDownCast(anAct))
       if(anActor->GetVisibility() && !anActor->IsInfinitive())
       {
-        vtkFloatingPointType *aBounds = anActor->GetBounds();
+        double *aBounds = anActor->GetBounds();
         if(aBounds[0] > -VTK_LARGE_FLOAT && aBounds[1] < VTK_LARGE_FLOAT &&
            aBounds[2] > -VTK_LARGE_FLOAT && aBounds[3] < VTK_LARGE_FLOAT &&
            aBounds[4] > -VTK_LARGE_FLOAT && aBounds[5] < VTK_LARGE_FLOAT)
@@ -264,14 +264,14 @@ bool IsBBEmpty(vtkRenderer* theRenderer)
   return !isAny;
 }
 
-bool ComputeBBCenter(vtkRenderer* theRenderer, vtkFloatingPointType theCenter[3])
+bool ComputeBBCenter(vtkRenderer* theRenderer, double theCenter[3])
 {  
   theCenter[0] = theCenter[1] = theCenter[2] = 0.0;
   
   if(!theRenderer)
     return false;
 
-  vtkFloatingPointType aNewBndBox[6];
+  double aNewBndBox[6];
   aNewBndBox[ 0 ] = aNewBndBox[ 2 ] = aNewBndBox[ 4 ] = VTK_LARGE_FLOAT;
   aNewBndBox[ 1 ] = aNewBndBox[ 3 ] = aNewBndBox[ 5 ] = -VTK_LARGE_FLOAT;
 
@@ -287,7 +287,7 @@ bool ComputeBBCenter(vtkRenderer* theRenderer, vtkFloatingPointType theCenter[3]
     {
       if(anActor->GetVisibility() && !anActor->IsInfinitive())
       {
-        vtkFloatingPointType *aBounds = anActor->GetBounds();
+        double *aBounds = anActor->GetBounds();
         if(aBounds[0] > -VTK_LARGE_FLOAT && aBounds[1] < VTK_LARGE_FLOAT &&
            aBounds[2] > -VTK_LARGE_FLOAT && aBounds[3] < VTK_LARGE_FLOAT &&
            aBounds[4] > -VTK_LARGE_FLOAT && aBounds[5] < VTK_LARGE_FLOAT)
@@ -314,16 +314,16 @@ bool ComputeBBCenter(vtkRenderer* theRenderer, vtkFloatingPointType theCenter[3]
      aNewBndBox[2] > -VTK_LARGE_FLOAT && aNewBndBox[3] < VTK_LARGE_FLOAT &&
      aNewBndBox[4] > -VTK_LARGE_FLOAT && aNewBndBox[5] < VTK_LARGE_FLOAT)
   {
-    static vtkFloatingPointType MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT;
+    static double MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT;
     
-    vtkFloatingPointType aLength = aNewBndBox[1]-aNewBndBox[0];
+    double aLength = aNewBndBox[1]-aNewBndBox[0];
     aLength = std::max((aNewBndBox[3]-aNewBndBox[2]),aLength);
     aLength = std::max((aNewBndBox[5]-aNewBndBox[4]),aLength);
     
     if(aLength < MIN_DISTANCE)
       return false;
 
-    vtkFloatingPointType aWidth = 
+    double aWidth = 
       sqrt((aNewBndBox[1]-aNewBndBox[0])*(aNewBndBox[1]-aNewBndBox[0]) +
            (aNewBndBox[3]-aNewBndBox[2])*(aNewBndBox[3]-aNewBndBox[2]) +
            (aNewBndBox[5]-aNewBndBox[4])*(aNewBndBox[5]-aNewBndBox[4]));
@@ -340,23 +340,23 @@ bool ComputeBBCenter(vtkRenderer* theRenderer, vtkFloatingPointType theCenter[3]
   return false;
 
   /*
-  vtkFloatingPointType aBounds[6];
+  double 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;
+    static double MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT;
 
-    vtkFloatingPointType aLength = aBounds[1]-aBounds[0];
+    double 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 = 
+    double 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]));
index 1ddf940bf5025b119e7f569642b632eaaa989f9f..87db690d58ee2cdadd30b2382cf1c6b281579905 100755 (executable)
@@ -37,7 +37,7 @@ VTKVIEWER_EXPORT
 extern
 int
 ComputeVisiblePropBounds(vtkRenderer* theRenderer, 
-                         vtkFloatingPointType theBounds[6]);
+                         double theBounds[6]);
 
 VTKVIEWER_EXPORT
 extern
@@ -47,9 +47,9 @@ VTKVIEWER_EXPORT
 extern
 bool
 ComputeTrihedronSize(vtkRenderer* theRenderer, 
-                     vtkFloatingPointType& theNewSize, 
-                     const vtkFloatingPointType theSize, 
-                     const vtkFloatingPointType theSizeInPercents);
+                     double& theNewSize, 
+                     const double theSize, 
+                     const double theSizeInPercents);
 
 VTKVIEWER_EXPORT
 extern
@@ -57,5 +57,5 @@ bool IsBBEmpty(vtkRenderer* theRenderer);
 VTKVIEWER_EXPORT
 extern
 bool ComputeBBCenter(vtkRenderer* theRenderer, 
-                     vtkFloatingPointType theCenter[3]);
+                     double theCenter[3]);
 #endif
index fcafdae31c380daae699f5cc4522806680775bd4..d72b4643d98e96ef086edefdacdf0030dc196c88 100755 (executable)
@@ -434,7 +434,7 @@ void VTKViewer_ViewWindow::onResetView()
   ::ResetCamera(myRenderer,true);  
   if(aTriedronIsVisible) myTrihedron->VisibilityOn();
   else myTrihedron->VisibilityOff();
-  static vtkFloatingPointType aCoeff = 3.0;
+  static double aCoeff = 3.0;
   aCamera->SetParallelScale(aCoeff*aCamera->GetParallelScale());
   Repaint();
 }
@@ -634,11 +634,11 @@ void VTKViewer_ViewWindow::onAdjustTrihedron(){
   int aVisibleNum = myTrihedron->GetVisibleActorCount(myRenderer);
   if(aVisibleNum){
     // calculating diagonal of visible props of the renderer
-    vtkFloatingPointType bnd[6];
+    double bnd[6];
     myTrihedron->VisibilityOff();
     ::ComputeVisiblePropBounds(myRenderer,bnd);
     myTrihedron->VisibilityOn();
-    vtkFloatingPointType aLength = 0;
+    double aLength = 0;
     static bool CalcByDiag = false;
     if(CalcByDiag){
       aLength = sqrt((bnd[1]-bnd[0])*(bnd[1]-bnd[0])+
@@ -650,13 +650,13 @@ void VTKViewer_ViewWindow::onAdjustTrihedron(){
       aLength = qMax((bnd[5]-bnd[4]),aLength);
     }
    
-    static vtkFloatingPointType aSizeInPercents = 105;
+    static double aSizeInPercents = 105;
     QString aSetting;// = SUIT_CONFIG->getSetting("Viewer:TrihedronSize");
     if(!aSetting.isEmpty()) aSizeInPercents = aSetting.toFloat();
 
-    static vtkFloatingPointType EPS_SIZE = 5.0E-3;
-    vtkFloatingPointType aSize = myTrihedron->GetSize();
-    vtkFloatingPointType aNewSize = aLength*aSizeInPercents/100.0;
+    static double EPS_SIZE = 5.0E-3;
+    double aSize = myTrihedron->GetSize();
+    double aNewSize = aLength*aSizeInPercents/100.0;
     // if the new trihedron size have sufficient difference, then apply the value
     if(fabs(aNewSize-aSize) > aSize*EPS_SIZE || fabs(aNewSize-aSize) > aNewSize*EPS_SIZE){
       myTrihedron->SetSize(aNewSize);
index 3de2a04f80fdfbbcf332a71caf7718be0908d52d..cafe013e94b30d5733cfa55e2cde21be471b5a6e 100755 (executable)
@@ -88,7 +88,6 @@ bool operator < (const vtkEDFEdge& e0, const vtkEDFEdge& e1)
 }
 
 vtkStandardNewMacro(vtkEDFCutter);
-vtkCxxRevisionMacro(vtkEDFCutter, "0.0");
 
 vtkEDFCutter::vtkEDFCutter()
 {
index 66cc6a9b61bee1a0db60f3c546f12a69b4aae233..559354e1b8fd00788f70adff02c2298cee7518e0 100755 (executable)
@@ -27,7 +27,7 @@ class VTKTOOLS_EXPORT vtkEDFCutter : public vtkCutter
 {
 public :
   static vtkEDFCutter* New();
-  vtkTypeRevisionMacro(vtkEDFCutter, vtkCutter);
+  vtkTypeMacro(vtkEDFCutter, vtkCutter);
   void PrintSelf(ostream& os, vtkIndent indent);
 
   // Description: