]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Porting on Mandriva 64 (without libtool modifications)
authorapo <apo@opencascade.com>
Thu, 6 Apr 2006 13:06:34 +0000 (13:06 +0000)
committerapo <apo@opencascade.com>
Thu, 6 Apr 2006 13:06:34 +0000 (13:06 +0000)
90 files changed:
src/CONVERTOR/VISU_Convertor.hxx
src/CONVERTOR/VISU_Convertor_impl.cxx
src/CONVERTOR/VISU_Convertor_impl.hxx
src/CONVERTOR/VISU_IDMapper.cxx
src/CONVERTOR/VISU_IDMapper.hxx
src/CONVERTOR/VISU_MedConvertor.cxx
src/OBJECT/VISU_Actor.cxx
src/OBJECT/VISU_Actor.h
src/OBJECT/VISU_GaussPtsAct.cxx
src/OBJECT/VISU_GaussPtsAct.h
src/OBJECT/VISU_GaussPtsDeviceActor.cxx
src/OBJECT/VISU_GaussPtsDeviceActor.h
src/OBJECT/VISU_GaussPtsSettings.h
src/OBJECT/VISU_MeshAct.cxx
src/OBJECT/VISU_MeshAct.h
src/PIPELINE/SALOME_ExtractGeometry.cxx
src/PIPELINE/VISU_CutLinesPL.cxx
src/PIPELINE/VISU_CutLinesPL.hxx
src/PIPELINE/VISU_CutPlanesPL.cxx
src/PIPELINE/VISU_CutPlanesPL.hxx
src/PIPELINE/VISU_DeformedShapePL.cxx
src/PIPELINE/VISU_DeformedShapePL.hxx
src/PIPELINE/VISU_Extractor.cxx
src/PIPELINE/VISU_FieldTransform.cxx
src/PIPELINE/VISU_FieldTransform.hxx
src/PIPELINE/VISU_GaussPointsPL.cxx
src/PIPELINE/VISU_GaussPointsPL.hxx
src/PIPELINE/VISU_ImplicitFunctionWidget.cxx
src/PIPELINE/VISU_ImplicitFunctionWidget.hxx
src/PIPELINE/VISU_IsoSurfacesPL.cxx
src/PIPELINE/VISU_IsoSurfacesPL.hxx
src/PIPELINE/VISU_LookupTable.cxx
src/PIPELINE/VISU_LookupTable.hxx
src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx
src/PIPELINE/VISU_PipeLine.cxx
src/PIPELINE/VISU_PipeLine.hxx
src/PIPELINE/VISU_PipeLineUtils.cxx
src/PIPELINE/VISU_PipeLineUtils.hxx
src/PIPELINE/VISU_PlanesWidget.cxx
src/PIPELINE/VISU_PlanesWidget.hxx
src/PIPELINE/VISU_Plot3DPL.cxx
src/PIPELINE/VISU_Plot3DPL.hxx
src/PIPELINE/VISU_ScalarBarActor.cxx
src/PIPELINE/VISU_ScalarBarActor.hxx
src/PIPELINE/VISU_ScalarBarCtrl.cxx
src/PIPELINE/VISU_ScalarBarCtrl.hxx
src/PIPELINE/VISU_ScalarMapOnDeformedShapePL.cxx
src/PIPELINE/VISU_ScalarMapOnDeformedShapePL.hxx
src/PIPELINE/VISU_ScalarMapPL.cxx
src/PIPELINE/VISU_ScalarMapPL.hxx
src/PIPELINE/VISU_SphereWidget.cxx
src/PIPELINE/VISU_SphereWidget.hxx
src/PIPELINE/VISU_StreamLinesPL.cxx
src/PIPELINE/VISU_StreamLinesPL.hxx
src/PIPELINE/VISU_VectorsPL.cxx
src/PIPELINE/VISU_VectorsPL.hxx
src/PIPELINE/VISU_WidgetCtrl.cxx
src/PIPELINE/VISU_WidgetCtrl.hxx
src/VISUGUI/VisuGUI_ClippingDlg.cxx
src/VISUGUI/VisuGUI_CutLinesDlg.cxx
src/VISUGUI/VisuGUI_GaussPointsDlg.cxx
src/VISUGUI/VisuGUI_Module.cxx
src/VISUGUI/VisuGUI_OffsetDlg.cxx
src/VISUGUI/VisuGUI_OffsetDlg.h
src/VISUGUI/VisuGUI_Plot3DDlg.cxx
src/VISUGUI/VisuGUI_ScalarBarDlg.cxx
src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx
src/VISUGUI/VisuGUI_Selection.cxx
src/VISUGUI/VisuGUI_TimeAnimation.cxx
src/VISUGUI/VisuGUI_TimeAnimation.h
src/VISUGUI/VisuGUI_Tools.cxx
src/VISU_I/VISU_ColoredPrs3d_i.cc
src/VISU_I/VISU_ColoredPrs3d_i.hh
src/VISU_I/VISU_CorbaMedConvertor.cxx
src/VISU_I/VISU_CutLines_i.cc
src/VISU_I/VISU_GaussPoints_i.cc
src/VISU_I/VISU_GaussPoints_i.hh
src/VISU_I/VISU_IsoSurfaces_i.cc
src/VISU_I/VISU_Prs3d_i.cc
src/VISU_I/VISU_Prs3d_i.hh
src/VISU_I/VISU_Result_i.cc
src/VISU_I/VISU_Result_i.hh
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh
src/VISU_I/VISU_ScalarMap_i.cc
src/VISU_I/VISU_TimeAnimation.h
src/VISU_I/VISU_View_i.cc
src/VVTK/VVTK_PickingDlg.cxx
src/VVTK/VVTK_SegmentationCursorDlg.cxx
src/VVTK/VVTK_SizeBox.cxx

index 304f7de3ce4f988295df765e3e3b88d998dd02b5..4dc7b49c0b20014239de8d3d5e23bba34b612579 100644 (file)
@@ -181,7 +181,7 @@ namespace VISU
 
   //---------------------------------------------------------------
   typedef std::map<vtkIdType,PValForTime> TValField;
-  typedef std::pair<float,float> TMinMax;
+  typedef std::pair<vtkFloatingPointType,vtkFloatingPointType> TMinMax;
 
   //! Define a basic class for MED FIELD entity
   struct TField: virtual TIntId
@@ -308,7 +308,7 @@ public:
 
   //! Get amount of memory to build VTK representations for all existing MED entities
   virtual
-  float
+  vtkFloatingPointType
   GetSize() = 0;
 
   //! Get mesh for corresponding MED ENTITY
@@ -319,7 +319,7 @@ public:
   
   //! Get amount of memory to build mesh for corresponding MED ENTITY
   virtual
-  float
+  vtkFloatingPointType
   GetMeshOnEntitySize(const std::string& theMeshName, 
                      const VISU::TEntity& theEntity) = 0;
   
@@ -332,7 +332,7 @@ public:
 
   //! Get amount of memory to build mesh for corresponding MED FAMILY
   virtual 
-  float 
+  vtkFloatingPointType 
   GetFamilyOnEntitySize(const std::string& theMeshName, 
                        const VISU::TEntity& theEntity,
                        const std::string& theFamilyName) = 0;
@@ -345,7 +345,7 @@ public:
   
   //! Get amount of memory to build mesh for corresponding MED GROUP
   virtual
-  float
+  vtkFloatingPointType
   GetMeshOnGroupSize(const std::string& theMeshName, 
                     const std::string& theGroupName) = 0;
   
@@ -367,7 +367,7 @@ public:
    
   //! Get amount of memory to build mesh for corresponding MED TIMESTAMP
   virtual 
-  float
+  vtkFloatingPointType
   GetTimeStampSize(const std::string& theMeshName, 
                   const VISU::TEntity& theEntity,
                   const std::string& theFieldName,
@@ -375,7 +375,7 @@ public:
     
   //! Get amount of memory to build all MED TIMESTAMPS for corresponding MED FIELD
   virtual 
-  float
+  vtkFloatingPointType
   GetFieldOnMeshSize(const std::string& theMeshName, 
                     const VISU::TEntity& theEntity,
                     const std::string& theFieldName) = 0;
index 8d1fe336eba9086ae6cb4f4679757a6beab0a9f3..edbec305dbe9b40cdf7f6c8b9b67d0196e6154bd 100644 (file)
@@ -34,7 +34,7 @@
 
 #include <vtkIdList.h>
 #include <vtkCellType.h>
-#include <vtkIntArray.h>
+#include <vtkIdTypeArray.h>
 #include <vtkCellArray.h>
 #include <vtkFloatArray.h>
 #include <vtkUnsignedCharArray.h>
@@ -52,7 +52,7 @@
 using namespace std;
 using namespace VISU;
 
-static float ERR_SIZE_CALC = 1.00;
+static vtkFloatingPointType ERR_SIZE_CALC = 1.00;
 
 static int MYVTKDEBUG = 0;
 
@@ -308,7 +308,7 @@ namespace VISU
     return myNamedPointCoords->GetVTKID(theID);
   }
 
-  float*  
+  vtkFloatingPointType*  
   TProfileImpl
   ::GetNodeCoord(vtkIdType theObjID)
   {
@@ -429,7 +429,7 @@ namespace VISU
     return myIDMapper.GetNodeVTKID(theID);
   }
 
-  float*  
+  vtkFloatingPointType*  
   TIDMapperFilter
   ::GetNodeCoord(vtkIdType theObjID)
   {
@@ -1208,7 +1208,7 @@ namespace
     }
 
     vtkIdType *pts = 0, npts = 0;
-    vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+    vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
     aCellLocationsArray->SetNumberOfComponents(1);
     aCellLocationsArray->SetNumberOfTuples(aNbCells);
     aConnectivity->InitTraversal();
@@ -1282,7 +1282,7 @@ namespace
       }
     }
     vtkIdType *pts = 0, npts = 0;
-    vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+    vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
     aCellLocationsArray->SetNumberOfComponents(1);
     aCellLocationsArray->SetNumberOfTuples(aNbCells);
     aConnectivity->InitTraversal();
@@ -1445,7 +1445,7 @@ namespace
     }
     
     vtkIdType *pts = 0, npts = 0;
-    vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+    vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
     
     aCellLocationsArray->SetNumberOfComponents(1);
     aCellLocationsArray->SetNumberOfTuples(aNbCells);
@@ -1581,7 +1581,7 @@ namespace
            endl);
     
     int aSize = max(3,aNbComp);
-    TVector<float> aDataValues(aSize,0.0);
+    TVector<vtkFloatingPointType> aDataValues(aSize,0.0);
 
     const TGeom2Value& aGeom2Value = theValForTime->myGeom2Value;
 
@@ -1674,7 +1674,7 @@ namespace
     for(vtkIdType aPointId = 0; aPointId < aNbPoints; aPointId++){
       TCCoordSlice aSlice = aCoords.GetCoordSlice(aPointId);
       
-      float aCoords[3] = {0.0, 0.0, 0.0};
+      vtkFloatingPointType aCoords[3] = {0.0, 0.0, 0.0};
       for(vtkIdType aDimId = 0; aDimId < aDim; aDimId++)
        aCoords[aDimId] = aSlice[aDimId];
       
@@ -1686,7 +1686,7 @@ namespace
     }
     anIdList->Delete();
     
-    vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+    vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
     aCellLocationsArray->SetNumberOfComponents(1);
     aCellLocationsArray->SetNumberOfTuples(aNbCells);
     
@@ -1774,15 +1774,15 @@ namespace
   PrintMemorySize(vtkUnstructuredGrid* theDataSet)
   {
     theDataSet->Update();
-    BEGMSG(1,"GetPoints() = "<<float(theDataSet->GetPoints()->GetActualMemorySize()*1000)<<endl);
-    BEGMSG(1,"GetCells() = "<<float(theDataSet->GetCells()->GetActualMemorySize()*1000)<<endl);
-    BEGMSG(1,"GetCellTypesArray() = "<<float(theDataSet->GetCellTypesArray()->GetActualMemorySize()*1000)<<endl);
-    BEGMSG(1,"GetCellLocationsArray() = "<<float(theDataSet->GetCellLocationsArray()->GetActualMemorySize()*1000)<<endl);
+    BEGMSG(1,"GetPoints() = "<<vtkFloatingPointType(theDataSet->GetPoints()->GetActualMemorySize()*1000)<<endl);
+    BEGMSG(1,"GetCells() = "<<vtkFloatingPointType(theDataSet->GetCells()->GetActualMemorySize()*1000)<<endl);
+    BEGMSG(1,"GetCellTypesArray() = "<<vtkFloatingPointType(theDataSet->GetCellTypesArray()->GetActualMemorySize()*1000)<<endl);
+    BEGMSG(1,"GetCellLocationsArray() = "<<vtkFloatingPointType(theDataSet->GetCellLocationsArray()->GetActualMemorySize()*1000)<<endl);
     theDataSet->BuildLinks();
-    BEGMSG(1,"GetCellLinks() = "<<float(theDataSet->GetCellLinks()->GetActualMemorySize()*1000)<<endl);
-    BEGMSG(1,"GetPointData() = "<<float(theDataSet->GetPointData()->GetActualMemorySize()*1000)<<endl);
-    BEGMSG(1,"GetCellData() = "<<float(theDataSet->GetCellData()->GetActualMemorySize()*1000)<<endl);
-    BEGMSG(1,"GetActualMemorySize() = "<<float(theDataSet->GetActualMemorySize()*1000)<<endl);
+    BEGMSG(1,"GetCellLinks() = "<<vtkFloatingPointType(theDataSet->GetCellLinks()->GetActualMemorySize()*1000)<<endl);
+    BEGMSG(1,"GetPointData() = "<<vtkFloatingPointType(theDataSet->GetPointData()->GetActualMemorySize()*1000)<<endl);
+    BEGMSG(1,"GetCellData() = "<<vtkFloatingPointType(theDataSet->GetCellData()->GetActualMemorySize()*1000)<<endl);
+    BEGMSG(1,"GetActualMemorySize() = "<<vtkFloatingPointType(theDataSet->GetActualMemorySize()*1000)<<endl);
   }
 }
 
@@ -2152,10 +2152,10 @@ VISU_Convertor_impl
        GetTimeStampSize(theMeshName,theEntity,theFieldName,theStampsNum);
        anOutput->Update();
        if(theEntity == VISU::NODE_ENTITY)
-         BEGMSG(MYVTKDEBUG,"GetPointData() = "<<float(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
+         BEGMSG(MYVTKDEBUG,"GetPointData() = "<<vtkFloatingPointType(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
        else
-         BEGMSG(MYVTKDEBUG,"GetCellData() = "<<float(anOutput->GetCellData()->GetActualMemorySize()*1000)<<endl);
-       BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<float(anOutput->GetActualMemorySize()*1000)<<endl);
+         BEGMSG(MYVTKDEBUG,"GetCellData() = "<<vtkFloatingPointType(anOutput->GetCellData()->GetActualMemorySize()*1000)<<endl);
+       BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<vtkFloatingPointType(anOutput->GetActualMemorySize()*1000)<<endl);
       }
     }
 #ifndef _DEXCEPT_
@@ -2238,10 +2238,10 @@ VISU_Convertor_impl
        GetTimeStampSize(theMeshName,theEntity,theFieldName,theStampsNum);
        anOutput->Update();
        if(theEntity == VISU::NODE_ENTITY)
-         BEGMSG(MYVTKDEBUG,"GetPointData() = "<<float(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
+         BEGMSG(MYVTKDEBUG,"GetPointData() = "<<vtkFloatingPointType(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
        else
-         BEGMSG(MYVTKDEBUG,"GetCellData() = "<<float(anOutput->GetCellData()->GetActualMemorySize()*1000)<<endl);
-       BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<float(anOutput->GetActualMemorySize()*1000)<<endl);
+         BEGMSG(MYVTKDEBUG,"GetCellData() = "<<vtkFloatingPointType(anOutput->GetCellData()->GetActualMemorySize()*1000)<<endl);
+       BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<vtkFloatingPointType(anOutput->GetActualMemorySize()*1000)<<endl);
       }
     }
 #ifndef _DEXCEPT_
@@ -2319,11 +2319,11 @@ VISU_Convertor_impl
 
 
 //---------------------------------------------------------------
-float
+vtkFloatingPointType
 VISU_Convertor_impl
 ::GetSize() 
 {
-  float aResult = 0.0;
+  vtkFloatingPointType aResult = 0.0;
   const VISU::TMeshMap& aMeshMap = GetMeshMap();
   VISU::TMeshMap::const_iterator aMeshMapIter = aMeshMap.begin();
   for(; aMeshMapIter != aMeshMap.end(); aMeshMapIter++){
@@ -2366,13 +2366,13 @@ VISU_Convertor_impl
       aResult += GetMeshOnEntitySize(aMeshName,anEntity);
     }
   }
-  MSG(MYDEBUG,"GetSize - aResult = "<<float(aResult));
+  MSG(MYDEBUG,"GetSize - aResult = "<<vtkFloatingPointType(aResult));
   return aResult;
 }
 
 
 //---------------------------------------------------------------
-float
+vtkFloatingPointType
 VISU_Convertor_impl
 ::GetMeshOnEntitySize(const std::string& theMeshName, 
                      const VISU::TEntity& theEntity)
@@ -2390,22 +2390,22 @@ VISU_Convertor_impl
   vtkIdType aConnectivitySize = aCellsSize*sizeof(vtkIdType);
   vtkIdType aTypesSize = aNbCells*sizeof(char);
   vtkIdType aLocationsSize = aNbCells*sizeof(int);
-  float aNbCellsPerPoint = aCellsSize / aNbCells - 1;
+  vtkFloatingPointType aNbCellsPerPoint = aCellsSize / aNbCells - 1;
   vtkIdType aLinksSize = aMesh->myNbPoints * 
     (vtkIdType(sizeof(vtkIdType)*aNbCellsPerPoint) + sizeof(vtkCellLinks::Link));
   aLinksSize = 0;
   vtkIdType aResult = aPointsSize + aConnectivitySize + aTypesSize + aLocationsSize + aLinksSize;
 
   MSG(MYDEBUG,"GetMeshOnEntitySize "<<
-      "- aResult = "<<float(aResult)<<
+      "- aResult = "<<vtkFloatingPointType(aResult)<<
       "; theMeshName = '"<<theMeshName<<"'"<<
       "; theEntity = "<<theEntity);
   if(MYDEBUG){
-    INITMSG(MYVTKDEBUG,"- aPointsSize = "<<float(aPointsSize)<<"\n");
-    BEGMSG(MYVTKDEBUG,"- aConnectivitySize = "<<float(aConnectivitySize)<<"\n");
-    BEGMSG(MYVTKDEBUG,"- aTypesSize = "<<float(aTypesSize)<<"\n");
-    BEGMSG(MYVTKDEBUG,"- aLocationsSize = "<<float(aLocationsSize)<<"\n");
-    BEGMSG(MYVTKDEBUG,"- aLinksSize = "<<float(aLinksSize)<<"\n");
+    INITMSG(MYVTKDEBUG,"- aPointsSize = "<<vtkFloatingPointType(aPointsSize)<<"\n");
+    BEGMSG(MYVTKDEBUG,"- aConnectivitySize = "<<vtkFloatingPointType(aConnectivitySize)<<"\n");
+    BEGMSG(MYVTKDEBUG,"- aTypesSize = "<<vtkFloatingPointType(aTypesSize)<<"\n");
+    BEGMSG(MYVTKDEBUG,"- aLocationsSize = "<<vtkFloatingPointType(aLocationsSize)<<"\n");
+    BEGMSG(MYVTKDEBUG,"- aLinksSize = "<<vtkFloatingPointType(aLinksSize)<<"\n");
   }
 
   aResult = vtkIdType(aResult*ERR_SIZE_CALC);
@@ -2414,7 +2414,7 @@ VISU_Convertor_impl
 
 
 //---------------------------------------------------------------
-float
+vtkFloatingPointType
 VISU_Convertor_impl
 ::GetFamilyOnEntitySize(const std::string& theMeshName, 
                        const VISU::TEntity& theEntity,
@@ -2433,23 +2433,23 @@ VISU_Convertor_impl
   vtkIdType aConnectivitySize = aCellsSize*sizeof(vtkIdType);
   vtkIdType aTypesSize = aNbCells*sizeof(char);
   vtkIdType aLocationsSize = aNbCells*sizeof(int);
-  float aNbCellsPerPoint = aCellsSize / aNbCells - 1;
+  vtkFloatingPointType aNbCellsPerPoint = aCellsSize / aNbCells - 1;
   vtkIdType aLinksSize = aMesh->myNbPoints * 
     (vtkIdType(sizeof(vtkIdType)*aNbCellsPerPoint) + sizeof(vtkCellLinks::Link));
   aLinksSize = 0;
   vtkIdType aResult = aPointsSize + aConnectivitySize + aTypesSize + aLocationsSize + aLinksSize;
 
   MSG(MYDEBUG,"GetFamilyOnEntitySize "<<
-      "- aResult = "<<float(aResult)<<
+      "- aResult = "<<vtkFloatingPointType(aResult)<<
       "; theMeshName = '"<<theMeshName<<"'"<<
       "; theEntity = "<<theEntity<<
       "; theFamilyName = '"<<theFamilyName<<"'");
   if(MYDEBUG){
-    INITMSG(MYVTKDEBUG,"- aPointsSize = "<<float(aPointsSize)<<"\n");
-    BEGMSG(MYVTKDEBUG,"- aConnectivitySize = "<<float(aConnectivitySize)<<"\n");
-    BEGMSG(MYVTKDEBUG,"- aTypesSize = "<<float(aTypesSize)<<"\n");
-    BEGMSG(MYVTKDEBUG,"- aLocationsSize = "<<float(aLocationsSize)<<"\n");
-    BEGMSG(MYVTKDEBUG,"- aLinksSize = "<<float(aLinksSize)<<"\n");
+    INITMSG(MYVTKDEBUG,"- aPointsSize = "<<vtkFloatingPointType(aPointsSize)<<"\n");
+    BEGMSG(MYVTKDEBUG,"- aConnectivitySize = "<<vtkFloatingPointType(aConnectivitySize)<<"\n");
+    BEGMSG(MYVTKDEBUG,"- aTypesSize = "<<vtkFloatingPointType(aTypesSize)<<"\n");
+    BEGMSG(MYVTKDEBUG,"- aLocationsSize = "<<vtkFloatingPointType(aLocationsSize)<<"\n");
+    BEGMSG(MYVTKDEBUG,"- aLinksSize = "<<vtkFloatingPointType(aLinksSize)<<"\n");
   }
 
   aResult = vtkIdType(aResult*ERR_SIZE_CALC);
@@ -2474,7 +2474,7 @@ VISU_Convertor_impl
 }
 
 
-float
+vtkFloatingPointType
 VISU_Convertor_impl
 ::GetMeshOnGroupSize(const std::string& theMeshName, 
                     const std::string& theGroupName)
@@ -2489,18 +2489,18 @@ VISU_Convertor_impl
   vtkIdType aCellsSize = aNbASizeCells.second;
   vtkIdType aConnectivityAndTypesSize = aCellsSize*sizeof(vtkIdType);
   vtkIdType aLocationsSize = aNbCells*sizeof(int);
-  float aNbCellsPerPoint = aCellsSize / aNbCells - 1;
+  vtkFloatingPointType aNbCellsPerPoint = aCellsSize / aNbCells - 1;
   vtkIdType aLinksSize = aMesh->myNbPoints * 
     (vtkIdType(sizeof(vtkIdType)*aNbCellsPerPoint) + sizeof(short));
   aLinksSize = 0;
   vtkIdType aResult = aPointsSize + aConnectivityAndTypesSize + aLocationsSize + aLinksSize;
   if(MYDEBUG){
-    MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aPointsSize = "<<float(aPointsSize));
-    MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aConnectivityAndTypesSize = "<<float(aConnectivityAndTypesSize));
-    MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aLocationsSize = "<<float(aLocationsSize));
-    MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aLinksSize = "<<float(aLinksSize));
+    MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aPointsSize = "<<vtkFloatingPointType(aPointsSize));
+    MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aConnectivityAndTypesSize = "<<vtkFloatingPointType(aConnectivityAndTypesSize));
+    MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aLocationsSize = "<<vtkFloatingPointType(aLocationsSize));
+    MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aLinksSize = "<<vtkFloatingPointType(aLinksSize));
   }
-  MSG(MYDEBUG,"GetMeshOnGroupSize - aResult = "<<float(aResult)<<"; theMeshName = '"
+  MSG(MYDEBUG,"GetMeshOnGroupSize - aResult = "<<vtkFloatingPointType(aResult)<<"; theMeshName = '"
       <<theMeshName<<"'; theGroupName = '"<<theGroupName<<"'");
 
   aResult = vtkIdType(aResult*ERR_SIZE_CALC);
@@ -2546,7 +2546,7 @@ VISU_Convertor_impl
 }
 
 
-float
+vtkFloatingPointType
 VISU_Convertor_impl
 ::GetFieldOnMeshSize(const std::string& theMeshName, 
                     const VISU::TEntity& theEntity,
@@ -2556,12 +2556,12 @@ VISU_Convertor_impl
   PMeshOnEntityImpl aVTKMeshOnEntity = boost::get<2>(aFindField);
   PFieldImpl aField = boost::get<3>(aFindField);
 
-  float aMeshSize = GetMeshOnEntitySize(theMeshName,aVTKMeshOnEntity->myEntity);
-  float aFieldOnMeshSize = float(aField->myDataSize*sizeof(float)*aField->myValField.size()*ERR_SIZE_CALC);
-  float aResult = aMeshSize + aFieldOnMeshSize;
+  vtkFloatingPointType aMeshSize = GetMeshOnEntitySize(theMeshName,aVTKMeshOnEntity->myEntity);
+  vtkFloatingPointType aFieldOnMeshSize = vtkFloatingPointType(aField->myDataSize*sizeof(vtkFloatingPointType)*aField->myValField.size()*ERR_SIZE_CALC);
+  vtkFloatingPointType aResult = aMeshSize + aFieldOnMeshSize;
   if(MYDEBUG)
-    MSG(MYVTKDEBUG,"GetFieldOnMeshSize - aFieldOnMeshSize = "<<float(aFieldOnMeshSize));
-  MSG(MYDEBUG,"GetFieldOnMeshSize - aResult = "<<float(aResult)<<"; theMeshName = '"<<theMeshName<<
+    MSG(MYVTKDEBUG,"GetFieldOnMeshSize - aFieldOnMeshSize = "<<vtkFloatingPointType(aFieldOnMeshSize));
+  MSG(MYDEBUG,"GetFieldOnMeshSize - aResult = "<<vtkFloatingPointType(aResult)<<"; theMeshName = '"<<theMeshName<<
       "'; theEntity = "<<theEntity<<"; theFieldName = '"<<theFieldName<<"'");
 
   return aResult;
@@ -2596,7 +2596,7 @@ VISU_Convertor_impl
 }
 
 
-float
+vtkFloatingPointType
 VISU_Convertor_impl
 ::GetTimeStampSize(const std::string& theMeshName, 
                   const VISU::TEntity& theEntity,
@@ -2608,12 +2608,12 @@ VISU_Convertor_impl
   PMeshOnEntityImpl aVTKMeshOnEntity = boost::get<2>(aFindTimeStamp);
   PFieldImpl aField = boost::get<3>(aFindTimeStamp);
   
-  float aMeshSize = GetMeshOnEntitySize(theMeshName,aVTKMeshOnEntity->myEntity);
-  float aTimeStampSize = float(aField->myDataSize*sizeof(float) * ERR_SIZE_CALC);
-  float aResult = aMeshSize + aTimeStampSize;
+  vtkFloatingPointType aMeshSize = GetMeshOnEntitySize(theMeshName,aVTKMeshOnEntity->myEntity);
+  vtkFloatingPointType aTimeStampSize = vtkFloatingPointType(aField->myDataSize*sizeof(vtkFloatingPointType) * ERR_SIZE_CALC);
+  vtkFloatingPointType aResult = aMeshSize + aTimeStampSize;
 
-  MSG(MYDEBUG && MYVTKDEBUG,"GetTimeStampSize - aTimeStampSize = "<<float(aTimeStampSize));
-  MSG(MYDEBUG,"GetTimeStampSize - aResult = "<<float(aResult)<<
+  MSG(MYDEBUG && MYVTKDEBUG,"GetTimeStampSize - aTimeStampSize = "<<vtkFloatingPointType(aTimeStampSize));
+  MSG(MYDEBUG,"GetTimeStampSize - aResult = "<<vtkFloatingPointType(aResult)<<
       "; theMeshName = '"<<theMeshName<<"'; theEntity = "<<theEntity<<
       "; theFieldName = '"<<theFieldName<<"'; theStampsNum = "<<theStampsNum);
 
index 20889db78fd36c8067144dc002bdd53b636bda29..413613633198170dd1dfd6a9806ba4ddacef8043 100644 (file)
@@ -76,7 +76,7 @@ namespace VISU
 
   typedef vtkSmartPointer<VTKViewer_AppendFilter> TVTKAppendFilter;
 
-  typedef float TCoord;
+  typedef vtkFloatingPointType TCoord;
 
   //---------------------------------------------------------------
   //! Define an utility base class which is repsonsible for preventing repetion
@@ -338,7 +338,7 @@ namespace VISU
 
     //! Reimplement the TIDMapper::GetNodeCoord
     virtual 
-    float*  
+    vtkFloatingPointType*  
     GetNodeCoord(vtkIdType theObjID);
 
     //! Reimplement the TIDMapper::GetElemObjID
@@ -401,7 +401,7 @@ namespace VISU
 
     //! Reimplement the TIDMapper::GetNodeCoord
     virtual 
-    float*  
+    vtkFloatingPointType*  
     GetNodeCoord(vtkIdType theObjID);
 
     //! Reimplement the TIDMapper::GetElemObjID
@@ -702,7 +702,7 @@ namespace VISU
 
 
   //---------------------------------------------------------------
-  typedef TVector<float> TValue;
+  typedef TVector<vtkFloatingPointType> TValue;
   typedef TSlice<TValue> TValueSlice;
   typedef TCSlice<TValue> TCValueSlice;
 
@@ -814,7 +814,7 @@ public:
 
   //! Implemention of the VISU_Convertor::GetSize
   virtual 
-  float
+  vtkFloatingPointType
   GetSize();
 
   //! Implemention of the VISU_Convertor::GetMeshOnEntity
@@ -825,7 +825,7 @@ public:
 
   //! Implemention of the VISU_Convertor::GetMeshOnEntitySize
   virtual 
-  float 
+  vtkFloatingPointType 
   GetMeshOnEntitySize(const std::string& theMeshName, 
                       const VISU::TEntity& theEntity);
 
@@ -838,7 +838,7 @@ public:
 
   //! Implemention of the VISU_Convertor::GetFamilyOnEntitySize
   virtual 
-  float 
+  vtkFloatingPointType 
   GetFamilyOnEntitySize(const std::string& theMeshName, 
                        const VISU::TEntity& theEntity,
                        const std::string& theFamilyName);
@@ -851,7 +851,7 @@ public:
   
   //! Implemention of the VISU_Convertor::GetMeshOnGroupSize
   virtual 
-  float 
+  vtkFloatingPointType 
   GetMeshOnGroupSize(const std::string& theMeshName, 
                     const std::string& theGroupName);
 
@@ -865,7 +865,7 @@ public:
 
   //! Implemention of the VISU_Convertor::GetTimeStampSize
   virtual 
-  float 
+  vtkFloatingPointType 
   GetTimeStampSize(const std::string& theMeshName, 
                   const VISU::TEntity& theEntity,
                   const std::string& theFieldName,
@@ -881,7 +881,7 @@ public:
   
   //! Implemention of the VISU_Convertor::GetFieldOnMeshSize
   virtual 
-  float 
+  vtkFloatingPointType 
   GetFieldOnMeshSize(const std::string& theMeshName, 
                     const VISU::TEntity& theEntity,
                     const std::string& theFieldName);
index c1f07b5b5584f35bf02e3a2f82714f4c4f1d185a..a8cd2a5adba277f5965ceb677e72ccc60e5b34e8 100644 (file)
@@ -31,7 +31,7 @@
 namespace VISU
 {
   //---------------------------------------------------------------
-  float*  
+  vtkFloatingPointType*  
   TIDMapper
   ::GetNodeCoord(vtkIdType theObjID)
   {
index 57cf9ee79ae815204bb7e1f0ae186a827e472803..94e78c0ba2b273ff83e6a76ad4c53c0ecc658277 100644 (file)
@@ -78,7 +78,7 @@ namespace VISU
 
     //! Get coordinates of node for corresponding object ID
     virtual
-    float
+    vtkFloatingPointType
     GetNodeCoord(vtkIdType theObjID);
 
     //! Get cell object ID for corresponding VTK ID
index c905b9eeac20e25dd3127e261feb2f0848c89cab..3697d9db2bf83bf90136433b0fe5fbefdd2e7949 100644 (file)
@@ -1235,10 +1235,10 @@ VISU_MedConvertor
                    for(TInt iComp = 0; iComp < aNbComp; iComp++){
                      const MED::TCValueSlice& aMValueSlice = aMValueSliceArr[iComp];
                      TMinMax& aMinMax = aMinMaxArr[iComp+1];
-                     float& aMin = aMinMax.first;
-                     float& aMax = aMinMax.second;
+                     vtkFloatingPointType& aMin = aMinMax.first;
+                     vtkFloatingPointType& aMax = aMinMax.second;
                      for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
-                       const float& aVal = aMValueSlice[iGauss];
+                       const vtkFloatingPointType& aVal = aMValueSlice[iGauss];
                        aMin = min(aMin,aVal);
                        aMax = max(aMax,aVal);
                      }
@@ -1247,15 +1247,15 @@ VISU_MedConvertor
                  
                  // To calculate min/max per vector modulus
                  TMinMax& aMinMax = aMinMaxArr[0];
-                 float& aMin = aMinMax.first;
-                 float& aMax = aMinMax.second;
+                 vtkFloatingPointType& aMin = aMinMax.first;
+                 vtkFloatingPointType& aMax = aMinMax.second;
                  for(TInt iElem = 0; iElem < aNbElem; iElem++){
                    MED::TCValueSliceArr aMValueSliceArr = aMMeshValue.GetGaussValueSliceArr(iElem);
                    for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
                      const MED::TCValueSlice& aMValueSlice = aMValueSliceArr[iGauss];
-                     float aValue = 0.0;
+                     vtkFloatingPointType aValue = 0.0;
                      for(TInt iComp = 0; iComp < aNbComp2; iComp++){
-                       float aVal = aMValueSlice[iComp];
+                       vtkFloatingPointType aVal = aMValueSlice[iComp];
                        aValue += aVal*aVal;
                      }
                      aValue = sqrt(aValue);
index 42591ab305f39bbb0f6c9d6362942850453e9c22..02eaeb3f3782f471a06b616e9c5d486d39a08553 100644 (file)
@@ -309,13 +309,13 @@ VISU_Actor
 
 void
 VISU_Actor
-::SetShrinkFactor(float theValue)
+::SetShrinkFactor(vtkFloatingPointType theValue)
 {
   myShrinkFilter->SetShrinkFactor(theValue);
   Modified();
 }
 
-float
+vtkFloatingPointType
 VISU_Actor
 ::GetShrinkFactor()
 {
@@ -326,12 +326,12 @@ VISU_Actor
 //----------------------------------------------------------------------------
 void
 VISU_Actor
-::SetOpacity(float theValue)
+::SetOpacity(vtkFloatingPointType theValue)
 {
   GetProperty()->SetOpacity(theValue);
 }
 
-float
+vtkFloatingPointType
 VISU_Actor
 ::GetOpacity()
 { 
@@ -340,12 +340,12 @@ VISU_Actor
 
 void
 VISU_Actor
-::SetLineWidth(float theLineWidth)
+::SetLineWidth(vtkFloatingPointType theLineWidth)
 {
   GetProperty()->SetLineWidth(theLineWidth);
 }
 
-float
+vtkFloatingPointType
 VISU_Actor
 ::GetLineWidth()
 {
@@ -429,7 +429,7 @@ VISU_Actor
   return GetCurrentPL()->GetNodeVTKID(theID);
 }
 
-float*
+vtkFloatingPointType*
 VISU_Actor
 ::GetNodeCoord(int theObjID)
 {
@@ -510,18 +510,18 @@ VISU_Actor
        if(vtkCell* aCell = GetElemCell(anObjId)){
          vtkPoints* aPts = aCell->GetPoints();
          if(int aNbPts = aCell->GetNumberOfPoints()){
-           float aCoord[3] = {0.0, 0.0, 0.0};
+           vtkFloatingPointType aCoord[3] = {0.0, 0.0, 0.0};
            for(int i = 0; i < aNbPts; i++){
-             float *aPntCoord = aPts->GetPoint(i); 
+             vtkFloatingPointType *aPntCoord = aPts->GetPoint(i); 
              aCoord[0] += aPntCoord[0];
              aCoord[1] += aPntCoord[1];
              aCoord[2] += aPntCoord[2];
            }
            // Display coordinates
-           float aWorldCoord[4] = {aCoord[0]/aNbPts, aCoord[1]/aNbPts, aCoord[2]/aNbPts, 1.0};
+           vtkFloatingPointType aWorldCoord[4] = {aCoord[0]/aNbPts, aCoord[1]/aNbPts, aCoord[2]/aNbPts, 1.0};
            aRenderer->SetWorldPoint(aWorldCoord);
            aRenderer->WorldToDisplay();
-           float aSelectionPoint[3];
+           vtkFloatingPointType aSelectionPoint[3];
            aRenderer->GetDisplayPoint(aSelectionPoint);
            myAnnotationActor->SetPosition(aSelectionPoint);
            //
@@ -551,12 +551,12 @@ VISU_Actor
       vtkIdType aVtkId = myPointPicker->GetPointId();
       if(aVtkId >= 0  && mySelector->IsValid(this,aVtkId,true) && hasIO()){
        vtkIdType anObjId = GetNodeObjId( aVtkId );
-       if(float* aCoord = GetNodeCoord(anObjId)){
+       if(vtkFloatingPointType* aCoord = GetNodeCoord(anObjId)){
          // Display coordinates
-         float aWorldCoord[4] = {aCoord[0], aCoord[1], aCoord[2], 1.0};
+         vtkFloatingPointType aWorldCoord[4] = {aCoord[0], aCoord[1], aCoord[2], 1.0};
          aRenderer->SetWorldPoint(aWorldCoord);
          aRenderer->WorldToDisplay();
-         float aSelectionPoint[3];
+         vtkFloatingPointType aSelectionPoint[3];
          aRenderer->GetDisplayPoint(aSelectionPoint);
          myAnnotationActor->SetPosition(aSelectionPoint);
          //
index 09d4d4bbc41f22280a2bb6f759736e5f950e9de6..947624cf3d48760442af8c303babbd5521b0f8ff 100644 (file)
@@ -142,27 +142,27 @@ class VTKOCC_EXPORT VISU_Actor :
 
   virtual
   void
-  SetShrinkFactor(float theFactor = 0.8); 
+  SetShrinkFactor(vtkFloatingPointType theFactor = 0.8); 
 
   virtual
-  float
+  vtkFloatingPointType
   GetShrinkFactor();
 
   //----------------------------------------------------------------------------
   virtual
   void
-  SetOpacity(float theValue);
+  SetOpacity(vtkFloatingPointType theValue);
 
   virtual
-  float
+  vtkFloatingPointType
   GetOpacity();
 
   virtual
   void
-  SetLineWidth(float theLineWidth);
+  SetLineWidth(vtkFloatingPointType theLineWidth);
 
   virtual
-  float
+  vtkFloatingPointType
   GetLineWidth();
  
   //----------------------------------------------------------------------------
@@ -203,7 +203,7 @@ class VTKOCC_EXPORT VISU_Actor :
   GetNodeVTKID(vtkIdType theID);
 
   virtual
-  float
+  vtkFloatingPointType
   GetNodeCoord(vtkIdType theObjID);
 
   virtual
index 8c06e2fce6ed73812e25a33f489fec60d8726887..64acea7bc99cb312a215ddad7da493641710ab6a 100644 (file)
@@ -207,7 +207,7 @@ VISU_GaussPtsAct
   return Superclass::GetMapper();
 }
 
-float
+vtkFloatingPointType
 VISU_GaussPtsAct
 ::GetBounds()
 {
@@ -335,9 +335,9 @@ VISU_GaussPtsAct
 {
   myEventCallbackCommand->SetAbortFlag(1);
 
-  float aMagnification = myInsideCursorSettings->GetMagnification();
-  float anIncrement = myInsideCursorSettings->GetIncrement();
-  float coefficient = up ? anIncrement : 1 / anIncrement;
+  vtkFloatingPointType aMagnification = myInsideCursorSettings->GetMagnification();
+  vtkFloatingPointType anIncrement = myInsideCursorSettings->GetIncrement();
+  vtkFloatingPointType coefficient = up ? anIncrement : 1 / anIncrement;
 
   myInsideCursorSettings->SetMagnification( aMagnification * coefficient );
   myInsideCursorSettings->InvokeEvent(VISU::UpdateFromSettingsEvent,NULL);
@@ -377,16 +377,16 @@ VISU_GaussPtsAct
 namespace
 {
   inline  
-  float 
+  vtkFloatingPointType 
   GetRadius(vtkIdType theVTKID,
            vtkDataArray *theScalarArray,
            VISU_GaussPointsPL* theGaussPointsPL)
   {
-    float aRadius = 0.5;
+    vtkFloatingPointType aRadius = 0.5;
     if(theGaussPointsPL->GetPSMapper()->GetPointSpriteMode() == 1) // Geometry mode
       aRadius *= theGaussPointsPL->GetSize() * theGaussPointsPL->GetAverageCellSize();
     else if(theGaussPointsPL->GetBicolor()){
-      float aVal = theScalarArray->GetTuple1(theVTKID);
+      vtkFloatingPointType aVal = theScalarArray->GetTuple1(theVTKID);
       if(aVal > 0.0)
        aRadius *= theGaussPointsPL->GetMaxSize();
       else
@@ -399,7 +399,7 @@ namespace
   }
 }
 
-float
+vtkFloatingPointType
 VISU_GaussPtsAct
 ::GetRadius(vtkIdType theObjID,
            vtkIdType theVTKID,
@@ -409,7 +409,7 @@ VISU_GaussPtsAct
 }
 
 //----------------------------------------------------------------------------
-float 
+vtkFloatingPointType 
 VISU_GaussPtsAct
 ::GetMagnification(vtkIdType theObjID)
 {
@@ -421,17 +421,17 @@ VISU_GaussPtsAct
 namespace
 {
   inline  
-  float 
+  vtkFloatingPointType 
   GetClamp(VISU_GaussPointsPL* theGaussPointsPL)
   {
-    float aClamp = theGaussPointsPL->GetClamp();
+    vtkFloatingPointType aClamp = theGaussPointsPL->GetClamp();
     if(theGaussPointsPL->GetPrimitiveType() == VISU_OpenGLPointSpriteMapper::GeomSphere)
       return -aClamp;
     return aClamp;
   }
 }
 
-float 
+vtkFloatingPointType 
 VISU_GaussPtsAct
 ::GetClamp(vtkIdType theObjID)
 {
@@ -659,14 +659,14 @@ VISU_GaussPtsAct
       if(myIsPreselected){
        anIsChanged = (myLastObjPointID != anObjId);
        if(anIsChanged){
-         float* aNodeCoord = GetNodeCoord(anObjId);
+         vtkFloatingPointType* aNodeCoord = GetNodeCoord(anObjId);
          vtkDataSet* aDataSet = GetInput();
          vtkCellData* aCellData = aDataSet->GetCellData();
          if(vtkDataArray *aScalarArray = aCellData->GetScalars()){
-           float aPyramidHeight = myPickingSettings->GetPyramidHeight();
+           vtkFloatingPointType aPyramidHeight = myPickingSettings->GetPyramidHeight();
            aPyramidHeight = aPyramidHeight*myGaussPointsPL->GetMaxPointSize();
-           //float aColor[3] = myPreHighlightActor->GetProperty()->GetColor();
-           float aColor[3];
+           //vtkFloatingPointType aColor[3] = myPreHighlightActor->GetProperty()->GetColor();
+           vtkFloatingPointType aColor[3];
            theInteractorStyle->GetCurrentRenderer()->GetBackground( aColor );
            aColor[0] = 1. - aColor[0];
            aColor[1] = 1. - aColor[1];
@@ -708,7 +708,7 @@ ChangeZoom(VISU_PickingSettings *thePickingSettings,
   if(theInitialHasIndex + aCurrentHasIndex == 1){
     vtkRenderer *aRenderer = theInteractorStyle->GetCurrentRenderer();
     vtkCamera *aCamera = aRenderer->GetActiveCamera();
-    float aZoomFactor = thePickingSettings->GetZoomFactor();
+    vtkFloatingPointType aZoomFactor = thePickingSettings->GetZoomFactor();
     double aScale = aCamera->GetParallelScale();
     if (!theInitialHasIndex && aCurrentHasIndex) {
       aCamera->SetParallelScale(aScale/aZoomFactor);
@@ -790,11 +790,11 @@ VISU_GaussPtsAct
          mySelector->AddIObject(this);
        }
        //
-       float* aNodeCoord = GetNodeCoord(anObjId);
+       vtkFloatingPointType* aNodeCoord = GetNodeCoord(anObjId);
        //
        // FlyTo
        vtkRenderWindowInteractor* anInteractor = theInteractorStyle->GetInteractor();
-       float aDollyWas = anInteractor->GetDolly();
+       vtkFloatingPointType aDollyWas = anInteractor->GetDolly();
        int aNumberOfFlyFramesWas = anInteractor->GetNumberOfFlyFrames();
        
        anInteractor->SetDolly(0.);
@@ -870,20 +870,20 @@ VISU_GaussPtsAct
   //
   vtkIdType aVtkId = GetNodeVTKID(anObjId);
   if(aVtkId >= 0){
-    float *aNodeCoord = GetNodeCoord(anObjId);
-    float aWorldCoord[4] = {aNodeCoord[0], aNodeCoord[1], aNodeCoord[2], 1.};
+    vtkFloatingPointType *aNodeCoord = GetNodeCoord(anObjId);
+    vtkFloatingPointType aWorldCoord[4] = {aNodeCoord[0], aNodeCoord[1], aNodeCoord[2], 1.};
     //
     vtkDataSet* aDataSet = GetInput();
     vtkCellData* aDataSetAttributes = aDataSet->GetCellData();
     //
     if(vtkDataArray* aScalarArray = aDataSetAttributes->GetScalars()){
-      float aVal = aScalarArray->GetTuple1(aVtkId);
+      vtkFloatingPointType aVal = aScalarArray->GetTuple1(aVtkId);
       //
       GetScalarBarCtrl()->SetIsMarked(true);
       GetScalarBarCtrl()->SetMarkValue(aVal);
       GetScalarBarCtrl()->Update();
       //
-      float aPyramidHeight = myPickingSettings->GetPyramidHeight();
+      vtkFloatingPointType aPyramidHeight = myPickingSettings->GetPyramidHeight();
       aPyramidHeight = aPyramidHeight*myGaussPointsPL->GetMaxPointSize();
       myCursorPyramidSelected->Init(aPyramidHeight,
                                    myPickingSettings->GetCursorSize(),
@@ -916,7 +916,7 @@ VISU_GaussPtsAct
        aStr<<"\nData: {";
        int anId = 0;
        while(anId < aNbComp){
-         float aComp = aFloatArray->GetComponent(aVtkId,anId++);
+         vtkFloatingPointType aComp = aFloatArray->GetComponent(aVtkId,anId++);
          aStr<<aComp;
          if(anId < aNbComp)
            aStr<<"; ";
@@ -986,8 +986,8 @@ VISU_GaussPtsAct
   myTextActor->SetModePosition(myPickingSettings->GetInfoWindowPosition());
   myTextActor->SetTransparency(myPickingSettings->GetInfoWindowTransparency());
 
-  float aHeight = myGaussPointsPL->GetMaxPointSize()*myPickingSettings->GetPyramidHeight();
-  float aCursorSize = myPickingSettings->GetCursorSize();
+  vtkFloatingPointType aHeight = myGaussPointsPL->GetMaxPointSize()*myPickingSettings->GetPyramidHeight();
+  vtkFloatingPointType aCursorSize = myPickingSettings->GetCursorSize();
   myCursorPyramid->SetPreferences(aHeight,aCursorSize);
   myCursorPyramidSelected->SetPreferences(aHeight,aCursorSize);
 
@@ -1200,7 +1200,7 @@ VISU_GaussPtsAct1
 
 
 //----------------------------------------------------------------------------
-float
+vtkFloatingPointType
 VISU_GaussPtsAct1
 ::GetRadius(vtkIdType theObjID,
            vtkIdType theVTKID,
@@ -1218,7 +1218,7 @@ VISU_GaussPtsAct1
 
 
 //----------------------------------------------------------------------------
-float 
+vtkFloatingPointType 
 VISU_GaussPtsAct1
 ::GetMagnification(vtkIdType theObjID)
 {
@@ -1234,7 +1234,7 @@ VISU_GaussPtsAct1
 
 
 //----------------------------------------------------------------------------
-float 
+vtkFloatingPointType 
 VISU_GaussPtsAct1
 ::GetClamp(vtkIdType theObjID)
 {
@@ -1314,7 +1314,7 @@ VISU_GaussPtsAct1
 
   SALOME_ExtractGeometry* anExtractGeometry = aPipeline->GetExtractGeometryFilter();
   vtkImplicitFunction* anImplicitFunction = anExtractGeometry->GetImplicitFunction();
-  float aMagnification = aPipeline->GetMagnification();
+  vtkFloatingPointType aMagnification = aPipeline->GetMagnification();
 
   aPipeline->ShallowCopy(GetGaussPointsPL());
 
index 4e7094b964761935310d1b5f1e4af21641700c64..105db840b7e244348c4c169b3d88604f073d73eb 100644 (file)
@@ -106,7 +106,7 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor
 
   //! Redefined method of getting an actor bounds.
   virtual
-  float
+  vtkFloatingPointType
   GetBounds();
 
   //! Redefined method of getting an actor input.
@@ -249,19 +249,19 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor
 
   //! To get current value of the radius of the Point Sprite
   virtual
-  float
+  vtkFloatingPointType
   GetRadius(vtkIdType theObjID,
            vtkIdType theVTKID,
            vtkDataArray *theScalarArray);
 
   //! To get current value of the magnification
   virtual
-  float
+  vtkFloatingPointType
   GetMagnification(vtkIdType theObjID);
 
   //! To get current value of the clamp
   virtual
-  float
+  vtkFloatingPointType
   GetClamp(vtkIdType theObjID);
 
   //----------------------------------------------------------------------------
@@ -280,7 +280,7 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor
   void
   OnInteractorEvent(unsigned long theEvent);
 
-  float myPriority;
+  vtkFloatingPointType myPriority;
   bool myChangeMagnification;
   VISU::TGaussPtsActorFactory* myGaussPtsActorFactory;
   boost::signal1<void,VISU_GaussPtsAct*> myUpdatePrs3dSignal;
@@ -388,19 +388,19 @@ class VTKOCC_EXPORT VISU_GaussPtsAct1 : public VISU_GaussPtsAct
 
   //! To get current value of the radius of the Point Sprite
   virtual
-  float
+  vtkFloatingPointType
   GetRadius(vtkIdType theObjID,
            vtkIdType theVTKID,
            vtkDataArray *theScalarArray);
 
   //! To get current value of the magnification
   virtual
-  float
+  vtkFloatingPointType
   GetMagnification(vtkIdType theObjID);
 
   //! To get current value of the clamp
   virtual
-  float
+  vtkFloatingPointType
   GetClamp(vtkIdType theObjID);
 
   //----------------------------------------------------------------------------
index a59f4f20007dca74a24afb0e1335c991275ed243..cc600ca78c20a684dde00b5bf675c696434e505a 100644 (file)
@@ -241,28 +241,28 @@ VISU_CursorPyramid
     }
 
   this->SetScale(1.0);
-  float aMRadius = myRadius*myMagnification;
+  vtkFloatingPointType aMRadius = myRadius*myMagnification;
   Init(myHeight,aMRadius*myCursorSize);
 
   if(myClamp > 0.0f){
-    float aPoint1[3] = {0.0, 0.0, 0.0};
+    vtkFloatingPointType aPoint1[3] = {0.0, 0.0, 0.0};
     ren->SetDisplayPoint(aPoint1);
     ren->DisplayToWorld();
     ren->GetWorldPoint(aPoint1);
 
-    float aPoint2[3] = {0.0, myClamp, 0.0};
+    vtkFloatingPointType aPoint2[3] = {0.0, myClamp, 0.0};
     ren->SetDisplayPoint(aPoint2);
     ren->DisplayToWorld();
     ren->GetWorldPoint(aPoint2);
     
-    float aWorldClamp = 
+    vtkFloatingPointType aWorldClamp = 
       (aPoint2[0] - aPoint1[0])*(aPoint2[0] - aPoint1[0]) + 
       (aPoint2[1] - aPoint1[1])*(aPoint2[1] - aPoint1[1]) + 
       (aPoint2[2] - aPoint1[2])*(aPoint2[2] - aPoint1[2]); 
     
     aWorldClamp = sqrt(aWorldClamp);
-    float aMDiameter = 2.0 * aMRadius;
-    float aCoeff = aWorldClamp / aMDiameter;
+    vtkFloatingPointType aMDiameter = 2.0 * aMRadius;
+    vtkFloatingPointType aCoeff = aWorldClamp / aMDiameter;
 
     if(aCoeff < 1.0){
       this->SetScale(aCoeff);
@@ -323,8 +323,8 @@ VISU_CursorPyramid
 //----------------------------------------------------------------------------
 void 
 VISU_CursorPyramid
-::SetPreferences(float theHeight,
-                float theCursorSize)
+::SetPreferences(vtkFloatingPointType theHeight,
+                vtkFloatingPointType theCursorSize)
 {
   Init(theHeight, theCursorSize, myRadius, myMagnification, myClamp, GetPosition(), GetProperty()->GetColor());
 }
@@ -332,13 +332,13 @@ VISU_CursorPyramid
 //----------------------------------------------------------------------------
 void
 VISU_CursorPyramid
-::Init(float theHeight,
-       float theCursorSize,
-       float theRadius,
-       float theMagnification,
-       float theClamp,
-       float thePos[3],
-       float theColor[3])
+::Init(vtkFloatingPointType theHeight,
+       vtkFloatingPointType theCursorSize,
+       vtkFloatingPointType theRadius,
+       vtkFloatingPointType theMagnification,
+       vtkFloatingPointType theClamp,
+       vtkFloatingPointType thePos[3],
+       vtkFloatingPointType theColor[3])
 {
   Init(theHeight,theRadius*theMagnification*theCursorSize);
   SetPosition(thePos[0],thePos[1],thePos[2]);
@@ -357,8 +357,8 @@ VISU_CursorPyramid
 
 void
 VISU_CursorPyramid
-::Init(float theHeight,
-       float theRadius)
+::Init(vtkFloatingPointType theHeight,
+       vtkFloatingPointType theRadius)
 {
   for(int i = 0; i < myNbCones; ++i){
     vtkConeSource* aSource = mySources[i].GetPointer();
@@ -368,7 +368,7 @@ VISU_CursorPyramid
     aSource->SetAngle(20.0);
   }
   
-  float aDisplacement = -0.5*theHeight - theRadius;
+  vtkFloatingPointType aDisplacement = -0.5*theHeight - theRadius;
   
   // X
   mySources[0]->SetDirection(1.0, 0.0, 0.0);
@@ -507,7 +507,7 @@ int VISU_FramedTextActor::GetPickable()
 // function : SetTransparency
 // purpose  :
 //==================================================================
-void VISU_FramedTextActor::SetTransparency(const float theTransparency)
+void VISU_FramedTextActor::SetTransparency(const vtkFloatingPointType theTransparency)
 {
   if (theTransparency>=0.  && theTransparency<=1.){
     myTransparency=theTransparency;
@@ -519,7 +519,7 @@ void VISU_FramedTextActor::SetTransparency(const float theTransparency)
 // function : GetTransparency
 // purpose  :
 //==================================================================
-float VISU_FramedTextActor::GetTransparency()const
+vtkFloatingPointType VISU_FramedTextActor::GetTransparency()const
 {
   return myTransparency;
 }
@@ -561,7 +561,7 @@ int VISU_FramedTextActor::GetModePosition()const
 // function : SetWorldPoint
 // purpose  :
 //==================================================================
-void VISU_FramedTextActor::SetWorldPoint(const float theWorldPoint[4])
+void VISU_FramedTextActor::SetWorldPoint(const vtkFloatingPointType theWorldPoint[4])
 {
   for(int i = 0; i<4; ++i) {
     myWorldPoint[i] = theWorldPoint[i];
@@ -572,7 +572,7 @@ void VISU_FramedTextActor::SetWorldPoint(const float theWorldPoint[4])
 // function : GetWorldPoint
 // purpose  :
 //==================================================================
-const float* VISU_FramedTextActor::GetWorldPoint()const 
+const vtkFloatingPointType* VISU_FramedTextActor::GetWorldPoint()const 
 {
   return myWorldPoint;
 }
@@ -580,7 +580,7 @@ const float* VISU_FramedTextActor::GetWorldPoint()const
 // function : SetDistance
 // purpose  :
 //==================================================================
-void VISU_FramedTextActor::SetDistance(const float theDistance)
+void VISU_FramedTextActor::SetDistance(const vtkFloatingPointType theDistance)
 {
   myDistance=theDistance;
 }
@@ -588,7 +588,7 @@ void VISU_FramedTextActor::SetDistance(const float theDistance)
 // function : GetDistance
 // purpose  :
 //==================================================================
-float VISU_FramedTextActor::GetDistance()const
+vtkFloatingPointType VISU_FramedTextActor::GetDistance()const
 {
   return myDistance;
 }
@@ -649,10 +649,10 @@ VISU_FramedTextActor
     theViewport->SetWorldPoint(myWorldPoint);
     theViewport->WorldToDisplay();
 
-    float aSelectionPoint[3];
+    vtkFloatingPointType aSelectionPoint[3];
     theViewport->GetDisplayPoint(aSelectionPoint);
-    float u = aSelectionPoint[0];
-    float v = aSelectionPoint[1] - myDistance;
+    vtkFloatingPointType u = aSelectionPoint[0];
+    vtkFloatingPointType v = aSelectionPoint[1] - myDistance;
     theViewport->ViewportToNormalizedViewport(u, v);
     PositionCoordinate->SetValue(u, v);
     //
index e25e9256de0afbf0cb783d47dce21c06770adec2..096c91c186cc573103c6be7db15a88103e4bea13 100644 (file)
@@ -126,34 +126,34 @@ public:
   RemoveFromRender(vtkRenderer* theRenderer);
 
   void
-  Init(float theHeight,
-       float theCursorSize,
-       float theRadius,
-       float theMagnification,
-       float theClamp,
-       float thePos[3],
-       float theColor[3]);
+  Init(vtkFloatingPointType theHeight,
+       vtkFloatingPointType theCursorSize,
+       vtkFloatingPointType theRadius,
+       vtkFloatingPointType theMagnification,
+       vtkFloatingPointType theClamp,
+       vtkFloatingPointType thePos[3],
+       vtkFloatingPointType theColor[3]);
 
-  void SetPreferences(float theHeight,
-                     float theCursorSize);
+  void SetPreferences(vtkFloatingPointType theHeight,
+                     vtkFloatingPointType theCursorSize);
 
 protected:
   VISU_CursorPyramid();
 
   void
-  Init(float theHeight,
-       float theRadius);
+  Init(vtkFloatingPointType theHeight,
+       vtkFloatingPointType theRadius);
 
   int myNbCones;
   vtkSmartPointer<vtkConeSource> mySources[6];
   vtkSmartPointer<vtkAppendPolyData> myAppendFilter;
   vtkSmartPointer<vtkPolyDataMapper> myMapper;
   //
-  float myHeight;
-  float myCursorSize;
-  float myRadius;
-  float myMagnification;
-  float myClamp;
+  vtkFloatingPointType myHeight;
+  vtkFloatingPointType myCursorSize;
+  vtkFloatingPointType myRadius;
+  vtkFloatingPointType myMagnification;
+  vtkFloatingPointType myClamp;
 
  private:
   VISU_CursorPyramid(const VISU_CursorPyramid&); // Not implemented
@@ -199,14 +199,14 @@ public:
   void SetModePosition(const int theMode);
   int  GetModePosition()const;
   //
-  void SetWorldPoint(const float theWorldPoint[4]);
-  const float* GetWorldPoint()const;
+  void SetWorldPoint(const vtkFloatingPointType theWorldPoint[4]);
+  const vtkFloatingPointType* GetWorldPoint()const;
   //
-  void  SetDistance(const float theDistance);
-  float GetDistance()const;
+  void  SetDistance(const vtkFloatingPointType theDistance);
+  vtkFloatingPointType GetDistance()const;
   //
-  void  SetTransparency(const float theTransparency);
-  float GetTransparency()const;
+  void  SetTransparency(const vtkFloatingPointType theTransparency);
+  vtkFloatingPointType GetTransparency()const;
   //
 protected:
   VISU_FramedTextActor();
@@ -224,9 +224,9 @@ protected:
   vtkTimeStamp  myBuildTime;
   //
   int   myModePosition;
-  float myWorldPoint[4];
-  float myDistance;
-  float myTransparency;
+  vtkFloatingPointType myWorldPoint[4];
+  vtkFloatingPointType myDistance;
+  vtkFloatingPointType myTransparency;
   
 private:
  VISU_FramedTextActor(const VISU_FramedTextActor&);  // Not implemented.
index 1778521db9a910bd3953ae19ffe243df5a4271cb..4c0beb8c1469f57ea54d8c346628a25663db71ca 100644 (file)
@@ -64,34 +64,34 @@ class VISU_GaussPtsSettings : public vtkObject
   vtkSetMacro( PrimitiveType, int );
   vtkGetMacro( PrimitiveType, int );
 
-  vtkSetMacro( Clamp, float );
-  vtkGetMacro( Clamp, float );
+  vtkSetMacro( Clamp, vtkFloatingPointType );
+  vtkGetMacro( Clamp, vtkFloatingPointType );
 
   vtkSetMacro( Texture, vtkImageData* );
   vtkGetMacro( Texture, vtkImageData* );
 
-  vtkSetMacro( AlphaThreshold, float );
-  vtkGetMacro( AlphaThreshold, float );
+  vtkSetMacro( AlphaThreshold, vtkFloatingPointType );
+  vtkGetMacro( AlphaThreshold, vtkFloatingPointType );
 
   vtkSetMacro( Resolution, int );
   vtkGetMacro( Resolution, int );
 
-  vtkSetMacro( Magnification, float );
-  vtkGetMacro( Magnification, float );
+  vtkSetMacro( Magnification, vtkFloatingPointType );
+  vtkGetMacro( Magnification, vtkFloatingPointType );
 
-  vtkSetMacro( Increment, float );
-  vtkGetMacro( Increment, float );
+  vtkSetMacro( Increment, vtkFloatingPointType );
+  vtkGetMacro( Increment, vtkFloatingPointType );
 
  protected:
   bool                Initial;
 
   int                 PrimitiveType;
-  float               Clamp;
+  vtkFloatingPointType Clamp;
   vtkImageData*       Texture;
-  float               AlphaThreshold;
+  vtkFloatingPointType AlphaThreshold;
   int                 Resolution;
-  float               Magnification;
-  float               Increment;
+  vtkFloatingPointType Magnification;
+  vtkFloatingPointType Increment;
 };
 
 
@@ -113,15 +113,15 @@ class VISU_InsideCursorSettings : public VISU_GaussPtsSettings
   VISU_InsideCursorSettings*
   New();
 
-  vtkSetMacro( MinSize, float );
-  vtkGetMacro( MinSize, float );
+  vtkSetMacro( MinSize, vtkFloatingPointType );
+  vtkGetMacro( MinSize, vtkFloatingPointType );
 
-  vtkSetMacro( MaxSize, float );
-  vtkGetMacro( MaxSize, float );
+  vtkSetMacro( MaxSize, vtkFloatingPointType );
+  vtkGetMacro( MaxSize, vtkFloatingPointType );
 
  protected:
-  float               MinSize;
-  float               MaxSize;
+  vtkFloatingPointType MinSize;
+  vtkFloatingPointType MaxSize;
 };
 
 
@@ -144,19 +144,19 @@ class VISU_OutsideCursorSettings : public VISU_GaussPtsSettings
   VISU_OutsideCursorSettings*
   New();
 
-  vtkSetMacro( Size, float );
-  vtkGetMacro( Size, float );
+  vtkSetMacro( Size, vtkFloatingPointType );
+  vtkGetMacro( Size, vtkFloatingPointType );
 
   vtkSetMacro( Uniform, bool );
   vtkGetMacro( Uniform, bool );
 
-  vtkSetVector3Macro( Color, float );
-  vtkGetVector3Macro( Color, float );
+  vtkSetVector3Macro( Color, vtkFloatingPointType );
+  vtkGetVector3Macro( Color, vtkFloatingPointType );
 
  protected:
-  float               Size;
+  vtkFloatingPointType Size;
   bool                Uniform;
-  float               Color[3];
+  vtkFloatingPointType Color[3];
 };
 
 
@@ -186,26 +186,26 @@ class VISU_PickingSettings : public vtkObject
   vtkSetMacro( Initial, bool );
   vtkGetMacro( Initial, bool );
 
-  vtkSetMacro( PyramidHeight, float );
-  vtkGetMacro( PyramidHeight, float );
+  vtkSetMacro( PyramidHeight, vtkFloatingPointType );
+  vtkGetMacro( PyramidHeight, vtkFloatingPointType );
 
-  vtkSetMacro( CursorSize, float );
-  vtkGetMacro( CursorSize, float );
+  vtkSetMacro( CursorSize, vtkFloatingPointType );
+  vtkGetMacro( CursorSize, vtkFloatingPointType );
 
-  vtkSetVector3Macro( Color, float );
-  vtkGetVector3Macro( Color, float );
+  vtkSetVector3Macro( Color, vtkFloatingPointType );
+  vtkGetVector3Macro( Color, vtkFloatingPointType );
 
-  vtkSetMacro( PointTolerance, float );
-  vtkGetMacro( PointTolerance, float );
+  vtkSetMacro( PointTolerance, vtkFloatingPointType );
+  vtkGetMacro( PointTolerance, vtkFloatingPointType );
 
-  vtkSetMacro( InfoWindowTransparency, float );
-  vtkGetMacro( InfoWindowTransparency, float );
+  vtkSetMacro( InfoWindowTransparency, vtkFloatingPointType );
+  vtkGetMacro( InfoWindowTransparency, vtkFloatingPointType );
 
   vtkSetMacro( InfoWindowPosition, int );
   vtkGetMacro( InfoWindowPosition, int );
 
-  vtkSetMacro( ZoomFactor, float );
-  vtkGetMacro( ZoomFactor, float );
+  vtkSetMacro( ZoomFactor, vtkFloatingPointType );
+  vtkGetMacro( ZoomFactor, vtkFloatingPointType );
 
   vtkSetMacro( StepNumber, int );
   vtkGetMacro( StepNumber, int );
@@ -216,13 +216,13 @@ class VISU_PickingSettings : public vtkObject
 private:
   bool                Initial;
 
-  float               PyramidHeight;
-  float               CursorSize;
-  float               PointTolerance;
-  float               Color[3];
-  float               InfoWindowTransparency;
+  vtkFloatingPointType PyramidHeight;
+  vtkFloatingPointType CursorSize;
+  vtkFloatingPointType PointTolerance;
+  vtkFloatingPointType Color[3];
+  vtkFloatingPointType InfoWindowTransparency;
   int                 InfoWindowPosition;
-  float               ZoomFactor;
+  vtkFloatingPointType ZoomFactor;
   int                 StepNumber;
   bool                DisplayParentMesh;
 };
index b6b812d9f569abfbc9a91fcdce4cde1dedfb733c..549e6a0b2a8a5ded5b14dac35e2c79a296164e9b 100644 (file)
@@ -115,7 +115,7 @@ VISU_MeshAct
 
 void
 VISU_MeshAct
-::SetShrinkFactor(float theValue)
+::SetShrinkFactor(vtkFloatingPointType theValue)
 {
   Superclass::SetShrinkFactor(theValue);
 
@@ -149,12 +149,12 @@ VISU_MeshAct
 //----------------------------------------------------------------------------
 void
 VISU_MeshAct
-::SetOpacity(float theValue)
+::SetOpacity(vtkFloatingPointType theValue)
 {
   GetSurfaceProperty()->SetOpacity(theValue);
 }
 
-float
+vtkFloatingPointType
 VISU_MeshAct
 ::GetOpacity()
 {
@@ -164,12 +164,12 @@ VISU_MeshAct
 //----------------------------------------------------------------------------
 void
 VISU_MeshAct
-::SetLineWidth(float theLineWidth)
+::SetLineWidth(vtkFloatingPointType theLineWidth)
 {
   GetEdgeProperty()->SetLineWidth(theLineWidth);
 }
 
-float
+vtkFloatingPointType
 VISU_MeshAct::GetLineWidth()
 {
   return GetEdgeProperty()->GetLineWidth();
index 9dafb348faf38f225a112168c77ffe3c31e63f5e..80735f23e4793b7db4004abf400e472aee5a3363 100644 (file)
@@ -65,18 +65,18 @@ class VTKOCC_EXPORT VISU_MeshAct : public VISU_Actor
 
   virtual
   void
-  SetOpacity(float theValue);
+  SetOpacity(vtkFloatingPointType theValue);
 
   virtual
-  float
+  vtkFloatingPointType
   GetOpacity();
 
   virtual
   void
-  SetLineWidth(float theLineWidth);
+  SetLineWidth(vtkFloatingPointType theLineWidth);
 
   virtual
-  float
+  vtkFloatingPointType
   GetLineWidth();
 
   virtual
@@ -89,7 +89,7 @@ class VTKOCC_EXPORT VISU_MeshAct : public VISU_Actor
 
   virtual
   void
-  SetShrinkFactor(float theFactor = 0.8); 
+  SetShrinkFactor(vtkFloatingPointType theFactor = 0.8); 
 
   virtual
   void
index 5a1762e8d138179e767270bd068f784bcb806c91..e4c986c349b0061077e7c85978e5b07b13e5d5b1 100755 (executable)
@@ -198,8 +198,8 @@ SALOME_ExtractGeometry
   vtkIdList *cellPts;
   vtkCell *cell;
   int numCellPts;
-  float *x;
-  float multiplier;
+  vtkFloatingPointType *x;
+  vtkFloatingPointType multiplier;
   vtkPoints *newPts;
   vtkIdList *newCellPts;
   vtkDataSet *input = this->GetInput();
@@ -271,7 +271,7 @@ SALOME_ExtractGeometry
     // To extract boundary cells, we have to create supplemental information
     if ( this->ExtractBoundaryCells )
       {
-      float val;
+      vtkFloatingPointType val;
       newScalars = vtkFloatArray::New();
       newScalars->SetNumberOfValues(numPts);
 
index e2cfe567380ef8390fb7d646fb924d043164f7e1..df37e622473476b1cf5db179977dd7dcd7f03f2c 100644 (file)
@@ -34,12 +34,17 @@ using namespace std;
 
 vtkStandardNewMacro(VISU_CutLinesPL);
 
-VISU_CutLinesPL::VISU_CutLinesPL(){
+VISU_CutLinesPL
+::VISU_CutLinesPL()
+{
   myCondition = 1;
   myPosition = 0;
 }
 
-void VISU_CutLinesPL::ShallowCopy(VISU_PipeLine *thePipeLine){
+void
+VISU_CutLinesPL
+::ShallowCopy(VISU_PipeLine *thePipeLine)
+{
   if(VISU_CutLinesPL *aPipeLine = dynamic_cast<VISU_CutLinesPL*>(thePipeLine)){
     SetOrientation(aPipeLine->GetPlaneOrientation(1),
                   aPipeLine->GetRotateX(1),aPipeLine->GetRotateY(1),1);
@@ -50,7 +55,10 @@ void VISU_CutLinesPL::ShallowCopy(VISU_PipeLine *thePipeLine){
   VISU_CutPlanesPL::ShallowCopy(thePipeLine);
 }
 
-void VISU_CutLinesPL::Init(){
+void
+VISU_CutLinesPL
+::Init()
+{
   VISU_CutPlanesPL::Init();
 
   myBasePlane[0] = XY;
@@ -64,15 +72,21 @@ void VISU_CutLinesPL::Init(){
 }
 
 
-void VISU_CutLinesPL::SetPosition(float thePosition){
+void
+VISU_CutLinesPL
+::SetPosition(vtkFloatingPointType thePosition)
+{
   myPosition = thePosition;
   myCondition = 0;
   Modified();
 }
-float VISU_CutLinesPL::GetPosition(){
-  float aPosition = myPosition;
+vtkFloatingPointType 
+VISU_CutLinesPL
+::GetPosition()
+{
+  vtkFloatingPointType aPosition = myPosition;
   if(myCondition){
-      float aDir[3], aBounds[6], aBoundPrj[3];
+      vtkFloatingPointType aDir[3], aBounds[6], aBoundPrj[3];
       GetInput2()->GetBounds(aBounds);
       GetDir(aDir,myAng[0],myBasePlane[0]);
       GetBoundProject(aBoundPrj,aBounds,aDir);
@@ -81,21 +95,30 @@ float VISU_CutLinesPL::GetPosition(){
   return aPosition;
 }
 
-void VISU_CutLinesPL::SetDefault(){
+void
+VISU_CutLinesPL
+::SetDefault()
+{
   myCondition = 1;
   Modified();
 }
-int VISU_CutLinesPL::IsDefault(){
+int
+VISU_CutLinesPL
+::IsDefault()
+{
   return myCondition;
 }
 
 
-void VISU_CutLinesPL::Update(){
+void
+VISU_CutLinesPL
+::Update()
+{
   ClearAppendPolyData(myAppendPolyData);
   SetPartPosition(1);
   vtkAppendPolyData *anAppendPolyData = vtkAppendPolyData::New();
   //Build base plane
-  float aDir[2][3], aBaseBounds[6];
+  vtkFloatingPointType aDir[2][3], aBaseBounds[6];
   GetInput2()->GetBounds(aBaseBounds);
   GetDir(aDir[0],myAng[0],myBasePlane[0]);
   vtkUnstructuredGrid* anUnstructuredGrid =
@@ -103,7 +126,7 @@ void VISU_CutLinesPL::Update(){
   CutWithPlanes(anAppendPolyData,anUnstructuredGrid,1,aDir[0],aBaseBounds,
                myPosition,myCondition,myDisplacement[0]);
   //Build lines
-  float aBounds[6];
+  vtkFloatingPointType aBounds[6];
   vtkDataSet *aDataSet = anAppendPolyData->GetOutput();
   aDataSet->Update();
   if(aDataSet->GetNumberOfCells() == 0)
@@ -125,12 +148,18 @@ void VISU_CutLinesPL::Update(){
 }
 
 
-void VISU_CutLinesPL::CutWithPlanes(vtkAppendPolyData* theAppendPolyData, vtkDataSet* theDataSet,
-                                   int theNbPlanes, float theDir[3], float theBounds[6],
-                                   float thePartPosition, int thePartCondition,
-                                   float theDisplacement)
+void
+VISU_CutLinesPL
+::CutWithPlanes(vtkAppendPolyData* theAppendPolyData, 
+               vtkDataSet* theDataSet,
+               int theNbPlanes, 
+               vtkFloatingPointType theDir[3], 
+               vtkFloatingPointType theBounds[6],
+               vtkFloatingPointType thePartPosition, 
+               int thePartCondition,
+               vtkFloatingPointType theDisplacement)
 {
-  vector<float> aPartPosition(1,thePartPosition);
+  vector<vtkFloatingPointType> aPartPosition(1,thePartPosition);
   vector<int> aPartCondition(1,thePartCondition);
   VISU_CutPlanesPL::CutWithPlanes(theAppendPolyData,theDataSet,theNbPlanes,theDir,theBounds,
                                  aPartPosition,aPartCondition,theDisplacement);
index cc316781bbbddb25a4591fb0b54ffee054522670..e41cdc650239ce20a8087a736c7079d6726759df 100644 (file)
@@ -37,31 +37,74 @@ protected:
   VISU_CutLinesPL(const VISU_CutLinesPL&);
 public:
   vtkTypeMacro(VISU_CutLinesPL,VISU_CutPlanesPL);
-  static VISU_CutLinesPL* New();
-  virtual void ShallowCopy(VISU_PipeLine *thePipeLine);
 
-  virtual void SetPosition(float thePosition);
-  virtual float GetPosition();
+  static 
+  VISU_CutLinesPL* 
+  New();
 
-  virtual void SetDefault();
-  virtual int IsDefault();
+  virtual
+  void
+  ShallowCopy(VISU_PipeLine *thePipeLine);
+
+  virtual
+  void
+  SetPosition(vtkFloatingPointType thePosition);
+
+  virtual
+  vtkFloatingPointType 
+  GetPosition();
+
+  virtual
+  void
+  SetDefault();
+
+  virtual
+  int
+  IsDefault();
 
 public:
-  virtual void Init();
-  virtual void Update();
+  virtual
+  void
+  Init();
+
+  virtual
+  void
+  Update();
+
+  static
+  void
+  CutWithPlanes(vtkAppendPolyData* theAppendPolyData, 
+               vtkDataSet* theDataSet,
+               int theNbPlanes, 
+               vtkFloatingPointType theDir[3], 
+               vtkFloatingPointType theBounds[6], 
+               vtkFloatingPointType thePlanePosition, 
+               int thePlaneCondition,
+               vtkFloatingPointType theDisplacement);
+
+  const vtkFloatingPointType* 
+  GetDirLn()
+  {
+    return myDirLn;
+  }
 
-  static void CutWithPlanes(vtkAppendPolyData* theAppendPolyData, vtkDataSet* theDataSet,
-                           int theNbPlanes, float theDir[3], float theBounds[6], 
-                           float thePlanePosition, int thePlaneCondition,
-                           float theDisplacement);
+  const vtkFloatingPointType* 
+  GetBoundPrjLn()
+  {
+    return myBoundPrjLn;
+  }
 
-  const float* GetDirLn(){ return myDirLn;}
-  const float* GetBoundPrjLn(){ return myBoundPrjLn;}
-  const float* GetBasePnt(){ return myBasePnt;}
+  const vtkFloatingPointType* 
+  GetBasePnt()
+  { 
+    return myBasePnt;
+  }
 
 protected:
-  float myDirLn[3], myBoundPrjLn[3], myBasePnt[3];
-  float myPosition;
+  vtkFloatingPointType myDirLn[3];
+  vtkFloatingPointType myBoundPrjLn[3];
+  vtkFloatingPointType myBasePnt[3];
+  vtkFloatingPointType myPosition;
   int myCondition;
 };
 
index 2a547971050e06a3d4fb92aabc3d515605064226..8bd5837f093a88f734ab8053e3a09c8a2dd26e9e 100644 (file)
 
 using namespace std;
 
-static float EPS = 1.0E-3;
+static vtkFloatingPointType EPS = 1.0E-3;
 
 vtkStandardNewMacro(VISU_CutPlanesPL);
 
-VISU_CutPlanesPL::VISU_CutPlanesPL(){
+VISU_CutPlanesPL
+::VISU_CutPlanesPL()
+{
   myAppendPolyData = vtkAppendPolyData::New();
   myIsShrinkable = false;
 
@@ -54,11 +56,16 @@ VISU_CutPlanesPL::VISU_CutPlanesPL(){
   myAng[1][0] = myAng[1][1] = myAng[1][2] = 0.0;
 }
 
-VISU_CutPlanesPL::~VISU_CutPlanesPL(){
+VISU_CutPlanesPL
+::~VISU_CutPlanesPL()
+{
   myAppendPolyData->Delete();
 }
 
-void VISU_CutPlanesPL::ShallowCopy(VISU_PipeLine *thePipeLine){
+void
+VISU_CutPlanesPL
+::ShallowCopy(VISU_PipeLine *thePipeLine)
+{
   if(VISU_CutPlanesPL *aPipeLine = dynamic_cast<VISU_CutPlanesPL*>(thePipeLine)){
     SetOrientation(aPipeLine->GetPlaneOrientation(),
                   aPipeLine->GetRotateX(),aPipeLine->GetRotateY());
@@ -70,7 +77,10 @@ void VISU_CutPlanesPL::ShallowCopy(VISU_PipeLine *thePipeLine){
   VISU_ScalarMapPL::ShallowCopy(thePipeLine);
 }
 
-void VISU_CutPlanesPL::Init(){
+void
+VISU_CutPlanesPL
+::Init()
+{
   VISU_ScalarMapPL::Init();
 
   SetNbParts(10);
@@ -79,16 +89,22 @@ void VISU_CutPlanesPL::Init(){
   myAng[0][0] = myAng[0][1] = myAng[0][2] = 0.0;
 }
 
-VISU_ScalarMapPL::THook* VISU_CutPlanesPL::DoHook(){
+VISU_ScalarMapPL::THook* 
+VISU_CutPlanesPL
+::DoHook()
+{
   return myAppendPolyData->GetOutput();
 }
 
-void VISU_CutPlanesPL::Update(){
+void
+VISU_CutPlanesPL
+::Update()
+{
   ClearAppendPolyData(myAppendPolyData);
   SetPartPosition();
-  float aDir[3];
+  vtkFloatingPointType aDir[3];
   GetDir(aDir,myAng[0],myBasePlane[0]);
-  float aBounds[6];
+  vtkFloatingPointType aBounds[6];
   GetInput2()->GetBounds(aBounds);
   vtkDataSet* aDataSet = myFieldTransform->GetUnstructuredGridOutput();
   CutWithPlanes(myAppendPolyData,aDataSet,myNbParts,aDir,aBounds,
@@ -97,18 +113,28 @@ void VISU_CutPlanesPL::Update(){
   VISU_ScalarMapPL::Update();
 }
 
-void VISU_CutPlanesPL::SetPartPosition(int theNum){
+void
+VISU_CutPlanesPL
+::SetPartPosition(int theNum)
+{
   for(int i = 0; i < myNbParts; i++)
     myPartPosition[i] = GetPartPosition(i,theNum);
 }
 
-void VISU_CutPlanesPL::ClearAppendPolyData(vtkAppendPolyData *theAppendPolyData){
+void
+VISU_CutPlanesPL
+::ClearAppendPolyData(vtkAppendPolyData *theAppendPolyData)
+{
   int iEnd = theAppendPolyData->GetNumberOfInputs();
   for(int i = iEnd-1; i >= 0; i--)
     theAppendPolyData->RemoveInput(theAppendPolyData->GetInput(i));
 }
 
-float* VISU_CutPlanesPL::GetRx(float theRx[3][3], float thaAng){
+vtkFloatingPointType* 
+VISU_CutPlanesPL::
+GetRx(vtkFloatingPointType theRx[3][3], 
+      vtkFloatingPointType thaAng)
+{
   theRx[0][0] = 1.0;            theRx[0][1] = 0.0;            theRx[0][2] = 0.0;
   theRx[1][0] = 0.0;            theRx[1][1] = cos(thaAng);    theRx[1][2] = -sin(thaAng);
   theRx[2][0] = 0.0;            theRx[2][1] = sin(thaAng);    theRx[2][2] = cos(thaAng);
@@ -116,7 +142,11 @@ float* VISU_CutPlanesPL::GetRx(float theRx[3][3], float thaAng){
 }
 
 
-float* VISU_CutPlanesPL::GetRy(float theRy[3][3], float thaAng){
+vtkFloatingPointType* 
+VISU_CutPlanesPL
+::GetRy(vtkFloatingPointType theRy[3][3], 
+       vtkFloatingPointType thaAng)
+{
   theRy[0][0] = cos(thaAng);    theRy[0][1] = 0.0;            theRy[0][2] = sin(thaAng);
   theRy[1][0] = 0.0;            theRy[1][1] = 1.0;            theRy[1][2] = 0.0;
   theRy[2][0] = -sin(thaAng);   theRy[2][1] = 0.0;            theRy[2][2] = cos(thaAng);
@@ -124,7 +154,11 @@ float* VISU_CutPlanesPL::GetRy(float theRy[3][3], float thaAng){
 }
 
 
-float* VISU_CutPlanesPL::GetRz(float theRz[3][3], float thaAng){
+vtkFloatingPointType* 
+VISU_CutPlanesPL
+::GetRz(vtkFloatingPointType theRz[3][3], 
+       vtkFloatingPointType thaAng)
+{
   theRz[0][0] = cos(thaAng);    theRz[0][1] = -sin(thaAng);   theRz[0][2] = 0.0;
   theRz[1][0] = sin(thaAng);    theRz[1][1] = cos(thaAng);    theRz[1][2] = 0.0;
   theRz[2][0] = 0.0;            theRz[2][1] = 0.0;            theRz[2][2] = 1.0;
@@ -132,25 +166,34 @@ float* VISU_CutPlanesPL::GetRz(float theRz[3][3], float thaAng){
 }
 
 
-void VISU_CutPlanesPL::CorrectPnt(float thePnt[3], const float BoundPrj[6]){
+void
+VISU_CutPlanesPL
+::CorrectPnt(vtkFloatingPointType thePnt[3], 
+            const vtkFloatingPointType BoundPrj[6])
+{
   for(int i = 0, j = 0; i < 3; ++i, j=2*i){
     if(thePnt[i] < BoundPrj[j]) thePnt[i] = BoundPrj[j];
     if(thePnt[i] > BoundPrj[j+1]) thePnt[i] = BoundPrj[j+1];
   }
 }
 
-void VISU_CutPlanesPL::GetBoundProject(float BoundPrj[3], const float BoundBox[6], const float Dir[3]){
-  float BoundPoints[8][3] = { {BoundBox[0],BoundBox[2],BoundBox[4]},
-                             {BoundBox[1],BoundBox[2],BoundBox[4]},
-                             {BoundBox[0],BoundBox[3],BoundBox[4]},
-                             {BoundBox[1],BoundBox[3],BoundBox[4]},
-                             {BoundBox[0],BoundBox[2],BoundBox[5]},
-                             {BoundBox[1],BoundBox[2],BoundBox[5]},
-                             {BoundBox[0],BoundBox[3],BoundBox[5]},
-                             {BoundBox[1],BoundBox[3],BoundBox[5]}};
+void
+VISU_CutPlanesPL
+::GetBoundProject(vtkFloatingPointType BoundPrj[3], 
+                 const vtkFloatingPointType BoundBox[6], 
+                 const vtkFloatingPointType Dir[3])
+{
+  vtkFloatingPointType BoundPoints[8][3] = { {BoundBox[0],BoundBox[2],BoundBox[4]},
+                                            {BoundBox[1],BoundBox[2],BoundBox[4]},
+                                            {BoundBox[0],BoundBox[3],BoundBox[4]},
+                                            {BoundBox[1],BoundBox[3],BoundBox[4]},
+                                            {BoundBox[0],BoundBox[2],BoundBox[5]},
+                                            {BoundBox[1],BoundBox[2],BoundBox[5]},
+                                            {BoundBox[0],BoundBox[3],BoundBox[5]},
+                                            {BoundBox[1],BoundBox[3],BoundBox[5]}};
   BoundPrj[0] = vtkMath::Dot(Dir,BoundPoints[0]), BoundPrj[1] = BoundPrj[0];
   for(int i = 1; i < 8; i++){
-    float tmp = vtkMath::Dot(Dir,BoundPoints[i]);
+    vtkFloatingPointType tmp = vtkMath::Dot(Dir,BoundPoints[i]);
     if(BoundPrj[1] < tmp) BoundPrj[1] = tmp;
     if(BoundPrj[0] > tmp) BoundPrj[0] = tmp;
   }
@@ -161,8 +204,12 @@ void VISU_CutPlanesPL::GetBoundProject(float BoundPrj[3], const float BoundBox[6
 }
 
 
-void VISU_CutPlanesPL::SetOrientation(const VISU_CutPlanesPL::PlaneOrientation& theOrient,
-                                     float theXAng, float theYAng, int theNum)
+void
+VISU_CutPlanesPL
+::SetOrientation(const VISU_CutPlanesPL::PlaneOrientation& theOrient,
+                vtkFloatingPointType theXAng, 
+                vtkFloatingPointType theYAng, 
+                int theNum)
 {
   myBasePlane[theNum] = theOrient;
   switch(myBasePlane[theNum]){
@@ -178,11 +225,17 @@ void VISU_CutPlanesPL::SetOrientation(const VISU_CutPlanesPL::PlaneOrientation&
 }
 
 
-const VISU_CutPlanesPL::PlaneOrientation& VISU_CutPlanesPL::GetPlaneOrientation(int theNum){
+const VISU_CutPlanesPL::PlaneOrientation& 
+VISU_CutPlanesPL
+::GetPlaneOrientation(int theNum)
+{
   return myBasePlane[theNum];
 }
 
-float VISU_CutPlanesPL::GetRotateX(int theNum){
+vtkFloatingPointType 
+VISU_CutPlanesPL
+::GetRotateX(int theNum)
+{
   switch(myBasePlane[theNum]){
   case XY: return myAng[theNum][0];
   case YZ: return myAng[theNum][1];
@@ -191,7 +244,10 @@ float VISU_CutPlanesPL::GetRotateX(int theNum){
   return 0;
 }
 
-float VISU_CutPlanesPL::GetRotateY(int theNum){
+vtkFloatingPointType 
+VISU_CutPlanesPL
+::GetRotateY(int theNum)
+{
   switch(myBasePlane[theNum]){
   case XY: return myAng[theNum][1];
   case YZ: return myAng[theNum][2];
@@ -201,7 +257,10 @@ float VISU_CutPlanesPL::GetRotateY(int theNum){
 }
 
 
-void VISU_CutPlanesPL::SetNbParts(int theNb) {
+void
+VISU_CutPlanesPL
+::SetNbParts(int theNb) 
+{
   myNbParts = theNb;
   myPartPosition.resize(myNbParts);
   myPartCondition.resize(myNbParts,1);
@@ -209,24 +268,33 @@ void VISU_CutPlanesPL::SetNbParts(int theNb) {
 }
 
 
-void VISU_CutPlanesPL::SetPartPosition(int thePartNumber, float thePartPosition){
+void
+VISU_CutPlanesPL
+::SetPartPosition(int thePartNumber, 
+                 vtkFloatingPointType thePartPosition)
+{
   if(thePartNumber >= myNbParts) return;
   myPartPosition[thePartNumber] = thePartPosition;
   myPartCondition[thePartNumber] = 0;
   Modified();
 }
-float VISU_CutPlanesPL::GetPartPosition(int thePartNumber, int theNum){
+
+vtkFloatingPointType 
+VISU_CutPlanesPL
+::GetPartPosition(int thePartNumber, 
+                 int theNum)
+{
   if(thePartNumber >= myNbParts) return 0;
-  float aPosition = myPartPosition[thePartNumber];
+  vtkFloatingPointType aPosition = myPartPosition[thePartNumber];
   if(myPartCondition[thePartNumber]){
-      float aDir[3], aBounds[6], aBoundPrj[3];
+      vtkFloatingPointType aDir[3], aBounds[6], aBoundPrj[3];
       GetInput2()->GetBounds(aBounds);
       GetDir(aDir,myAng[theNum],myBasePlane[theNum]);
       GetBoundProject(aBoundPrj,aBounds,aDir);
       if (myNbParts > 1){
-       float aDBoundPrj = aBoundPrj[2]/(myNbParts - 1);
-       float aDisplacement = aDBoundPrj * myDisplacement[theNum];
-       float aStartPosition = aBoundPrj[0] - 0.5*aDBoundPrj + aDisplacement;
+       vtkFloatingPointType aDBoundPrj = aBoundPrj[2]/(myNbParts - 1);
+       vtkFloatingPointType aDisplacement = aDBoundPrj * myDisplacement[theNum];
+       vtkFloatingPointType aStartPosition = aBoundPrj[0] - 0.5*aDBoundPrj + aDisplacement;
        aPosition = aStartPosition + thePartNumber*aDBoundPrj;
       }else
        aPosition = aBoundPrj[0] + aBoundPrj[2]*myDisplacement[theNum];
@@ -235,24 +303,32 @@ float VISU_CutPlanesPL::GetPartPosition(int thePartNumber, int theNum){
 }
 
 
-void VISU_CutPlanesPL::SetPartDefault(int thePartNumber){
+void
+VISU_CutPlanesPL
+::SetPartDefault(int thePartNumber)
+{
   if(thePartNumber >= myNbParts) return;
   myPartPosition[thePartNumber] = GetPartPosition(thePartNumber);
   myPartCondition[thePartNumber] = 1;
   Modified();
 }
-int VISU_CutPlanesPL::IsPartDefault(int thePartNumber){
+int
+VISU_CutPlanesPL
+::IsPartDefault(int thePartNumber)
+{
   if(thePartNumber >= myNbParts) return 1;
   return myPartCondition[thePartNumber];
 }
 
 
-void VISU_CutPlanesPL::GetDir(float theDir[3],
-                              const float theAng[3],
-                              const PlaneOrientation& theBasePlane)
+void
+VISU_CutPlanesPL
+::GetDir(vtkFloatingPointType theDir[3],
+        const vtkFloatingPointType theAng[3],
+        const PlaneOrientation& theBasePlane)
 {
   int iPlane = 0;
-  float aRx[3][3], aRy[3][3], aRz[3][3], aRotation[3][3];
+  vtkFloatingPointType aRx[3][3], aRy[3][3], aRz[3][3], aRotation[3][3];
   switch(theBasePlane){
   case XY:
     if(fabs(theAng[0]) > EPS) GetRx(aRx,theAng[0]); else vtkMath::Identity3x3(aRx);
@@ -278,9 +354,12 @@ void VISU_CutPlanesPL::GetDir(float theDir[3],
 }
 
 
-void VISU_CutPlanesPL::CutWithPlane(vtkAppendPolyData* theAppendPolyData,
-                                   vtkDataSet* theDataSet,
-                                   float theDir[3], float theOrig[3])
+void
+VISU_CutPlanesPL
+::CutWithPlane(vtkAppendPolyData* theAppendPolyData,
+              vtkDataSet* theDataSet,
+              vtkFloatingPointType theDir[3], 
+              vtkFloatingPointType theOrig[3])
 {
   vtkCutter *aCutPlane = vtkCutter::New();
   aCutPlane->SetInput(theDataSet);
@@ -296,18 +375,23 @@ void VISU_CutPlanesPL::CutWithPlane(vtkAppendPolyData* theAppendPolyData,
 }
 
 
-void VISU_CutPlanesPL::CutWithPlanes(vtkAppendPolyData* theAppendPolyData, vtkDataSet* theDataSet,
-                                    int theNbPlanes, float theDir[3], float theBounds[6],
-                                    const vector<float>& thePlanePosition,
-                                    const vector<int>& thePlaneCondition,
-                                    float theDisplacement)
+void
+VISU_CutPlanesPL
+::CutWithPlanes(vtkAppendPolyData* theAppendPolyData, 
+               vtkDataSet* theDataSet,
+               int theNbPlanes, 
+               vtkFloatingPointType theDir[3], 
+               vtkFloatingPointType theBounds[6],
+               const vector<vtkFloatingPointType>& thePlanePosition,
+               const vector<int>& thePlaneCondition,
+               vtkFloatingPointType theDisplacement)
 {
-  float aBoundPrj[3], aOrig[3], aPosition;
+  vtkFloatingPointType aBoundPrj[3], aOrig[3], aPosition;
   GetBoundProject(aBoundPrj, theBounds, theDir);
   if(theNbPlanes > 1){
-    float aDBoundPrj = aBoundPrj[2]/(theNbPlanes - 1);
-    float aDisplacement = aDBoundPrj*theDisplacement;
-    float aStartPosition = aBoundPrj[0] - 0.5*aDBoundPrj + aDisplacement;
+    vtkFloatingPointType aDBoundPrj = aBoundPrj[2]/(theNbPlanes - 1);
+    vtkFloatingPointType aDisplacement = aDBoundPrj*theDisplacement;
+    vtkFloatingPointType aStartPosition = aBoundPrj[0] - 0.5*aDBoundPrj + aDisplacement;
     for (int i = 0; i < theNbPlanes; i++){
       aPosition = aStartPosition + i*aDBoundPrj;
       if(thePlaneCondition[i]){
index b561f512b5bf7d30dc6791c6e9d1ddb7cafb3382..bd2c977aed32a5d23b36a36841e463f6f976b2d8 100644 (file)
@@ -40,64 +40,162 @@ protected:
 public:
   vtkTypeMacro(VISU_CutPlanesPL,VISU_ScalarMapPL);
   static VISU_CutPlanesPL* New();
-  virtual ~VISU_CutPlanesPL();
-  virtual void ShallowCopy(VISU_PipeLine *thePipeLine);
 
-  enum PlaneOrientation {XY, YZ, ZX};
-  virtual void SetOrientation(const VISU_CutPlanesPL::PlaneOrientation& theOrient,
-                             float theXAng, float theYAng, int theNum = 0);
+  virtual
+  ~VISU_CutPlanesPL();
 
-  virtual const PlaneOrientation& GetPlaneOrientation(int theNum = 0);
-  virtual float GetRotateX(int theNum = 0);
-  virtual float GetRotateY(int theNum = 0);
+  virtual
+  void
+  ShallowCopy(VISU_PipeLine *thePipeLine);
 
-  virtual float GetDisplacement(int theNum = 0) { return myDisplacement[theNum];}
-  virtual void SetDisplacement(float theDisp, int theNum = 0) { myDisplacement[theNum] = theDisp;}
+  enum PlaneOrientation {XY, YZ, ZX};
 
-  virtual void SetPartPosition(int thePartNumber, float thePartPosition);
-  virtual float GetPartPosition(int thePartNumber, int theNum = 0);
+  virtual 
+  void
+  SetOrientation(const VISU_CutPlanesPL::PlaneOrientation& theOrient,
+                vtkFloatingPointType theXAng, 
+                vtkFloatingPointType theYAng, 
+                int theNum = 0);
+  
+  virtual 
+  const PlaneOrientation& 
+  GetPlaneOrientation(int theNum = 0);
+
+  virtual
+  vtkFloatingPointType 
+  GetRotateX(int theNum = 0);
+
+  virtual
+  vtkFloatingPointType
+  GetRotateY(int theNum = 0);
+
+  virtual
+  vtkFloatingPointType 
+  GetDisplacement(int theNum = 0)
+  {
+    return myDisplacement[theNum];
+  }
+
+  virtual
+  void
+  SetDisplacement(vtkFloatingPointType theDisp, 
+                 int theNum = 0)
+  { 
+    myDisplacement[theNum] = theDisp;
+  }
+
+  virtual
+  void
+  SetPartPosition(int thePartNumber, 
+                 vtkFloatingPointType thePartPosition);
+
+  virtual
+  vtkFloatingPointType 
+  GetPartPosition(int thePartNumber, 
+                 int theNum = 0);
+
+  virtual 
+  void
+  SetPartDefault(int thePartNumber);
+
+  virtual
+  int
+  IsPartDefault(int thePartNumber);
+
+  virtual
+  void
+  SetNbParts(int theNb);
+
+  virtual
+  int
+  GetNbParts()
+  {
+    return myNbParts;
+  }
 
-  virtual void SetPartDefault(int thePartNumber);
-  virtual int IsPartDefault(int thePartNumber);
+public:
+  virtual
+  void
+  Init();
 
-  virtual void SetNbParts(int theNb);
-  virtual int GetNbParts(){ return myNbParts;}
+  virtual
+  void
+  Update();
 
-public:
-  virtual void Init();
-  virtual void Update();
-  virtual vtkAppendPolyData* GetAppendPolyData() { return myAppendPolyData; }
+  virtual
+  vtkAppendPolyData* 
+  GetAppendPolyData() 
+  { 
+    return myAppendPolyData; 
+  }
 
 public:
-  static float* GetRx(float theRx[3][3], float thaAng);
-  static float* GetRy(float theRy[3][3], float thaAng);
-  static float* GetRz(float theRz[3][3], float thaAng);
-
-  static void CorrectPnt(float thePnt[3], const float BoundPrj[6]);
-  static void GetBoundProject(float BoundPrj[3], const float BoundBox[6], const float Dir[3]);
-
-  static void GetDir(float theDir[3],
-                     const float theAng[3],
-                     const PlaneOrientation& theBasePlane);
-
-  static void ClearAppendPolyData(vtkAppendPolyData *theAppendPolyData);
-
-  static void CutWithPlane(vtkAppendPolyData* theAppendPolyData, vtkDataSet* theDataSet,
-                          float theDir[3], float theOrig[3]);
-  static void CutWithPlanes(vtkAppendPolyData* theAppendPolyData, vtkDataSet* theDataSet,
-                           int theNbPlanes, float theDir[3], float theBounds[6],
-                           const std::vector<float>& thePlanePosition,
-                           const std::vector<int>& thePlaneCondition,
-                           float theDisplacement);
+  static
+  vtkFloatingPointType* 
+  GetRx(vtkFloatingPointType theRx[3][3], 
+       vtkFloatingPointType thaAng);
+
+  static
+  vtkFloatingPointType* 
+  GetRy(vtkFloatingPointType theRy[3][3], 
+       vtkFloatingPointType thaAng);
+
+  static
+  vtkFloatingPointType* 
+  GetRz(vtkFloatingPointType theRz[3][3], 
+       vtkFloatingPointType thaAng);
+
+  static
+  void
+  CorrectPnt(vtkFloatingPointType thePnt[3], 
+            const vtkFloatingPointType BoundPrj[6]);
+
+  static
+  void
+  GetBoundProject(vtkFloatingPointType BoundPrj[3], 
+                 const vtkFloatingPointType BoundBox[6], 
+                 const vtkFloatingPointType Dir[3]);
+
+  static
+  void
+  GetDir(vtkFloatingPointType theDir[3],
+        const vtkFloatingPointType theAng[3],
+        const PlaneOrientation& theBasePlane);
+
+  static 
+  void
+  ClearAppendPolyData(vtkAppendPolyData *theAppendPolyData);
+
+  static 
+  void
+  CutWithPlane(vtkAppendPolyData* theAppendPolyData, 
+              vtkDataSet* theDataSet,
+              vtkFloatingPointType theDir[3], 
+              vtkFloatingPointType theOrig[3]);
+
+  static
+  void
+  CutWithPlanes(vtkAppendPolyData* theAppendPolyData, 
+               vtkDataSet* theDataSet,
+               int theNbPlanes, 
+               vtkFloatingPointType theDir[3], 
+               vtkFloatingPointType theBounds[6],
+               const std::vector<vtkFloatingPointType>& thePlanePosition,
+               const std::vector<int>& thePlaneCondition,
+               vtkFloatingPointType theDisplacement);
 protected:
-  virtual THook* DoHook();
-  void SetPartPosition(int theNum = 0);
+  virtual 
+  THook* 
+  DoHook();
+
+  void
+  SetPartPosition(int theNum = 0);
 
   int myNbParts;
   PlaneOrientation myBasePlane[2];
-  float myAng[2][3], myDisplacement[2];
+  vtkFloatingPointType myAng[2][3], myDisplacement[2];
   vtkAppendPolyData *myAppendPolyData;
-  std::vector<float> myPartPosition;
+  std::vector<vtkFloatingPointType> myPartPosition;
   std::vector<int> myPartCondition;
 };
 
index 0b8e346208120b6f36c319bd5c9646e5b313c96f..c8b2133e8c0a7920efab86b0f4201340180c8490 100644 (file)
 
 vtkStandardNewMacro(VISU_DeformedShapePL);
 
-VISU_DeformedShapePL::VISU_DeformedShapePL(){
+VISU_DeformedShapePL
+::VISU_DeformedShapePL()
+{
   myWarpVector = vtkWarpVector::New();
   myCellDataToPointData = vtkCellDataToPointData::New();
 }
 
-VISU_DeformedShapePL::~VISU_DeformedShapePL(){
+VISU_DeformedShapePL
+::~VISU_DeformedShapePL()
+{
   myWarpVector->UnRegisterAllOutputs();
   myWarpVector->Delete();
 
@@ -46,21 +50,27 @@ VISU_DeformedShapePL::~VISU_DeformedShapePL(){
   myCellDataToPointData->Delete();
 }
 
-void VISU_DeformedShapePL::ShallowCopy(VISU_PipeLine *thePipeLine){
+void
+VISU_DeformedShapePL
+::ShallowCopy(VISU_PipeLine *thePipeLine)
+{
   if(VISU_DeformedShapePL *aPipeLine = dynamic_cast<VISU_DeformedShapePL*>(thePipeLine)){
     SetScale(aPipeLine->GetScale());
   }
   VISU_ScalarMapPL::ShallowCopy(thePipeLine);
 }
 
-float VISU_DeformedShapePL::GetScaleFactor(vtkDataSet* theDataSet){
+vtkFloatingPointType
+VISU_DeformedShapePL
+::GetScaleFactor(vtkDataSet* theDataSet)
+{
   if(!theDataSet) return 0.0;
   theDataSet->Update();
   int aNbCells = theDataSet->GetNumberOfCells();
   int aNbPoints = theDataSet->GetNumberOfPoints();
   int aNbElem = aNbCells? aNbCells: aNbPoints;
-  float* aBounds = theDataSet->GetBounds();
-  float aVolume = 1, aVol, idim = 0;
+  vtkFloatingPointType* aBounds = theDataSet->GetBounds();
+  vtkFloatingPointType aVolume = 1, aVol, idim = 0;
   for(int i = 0; i < 6; i += 2){
     aVol = fabs(aBounds[i+1] - aBounds[i]);
     if(aVol > 0) {
@@ -69,26 +79,36 @@ float VISU_DeformedShapePL::GetScaleFactor(vtkDataSet* theDataSet){
     }
   }
   aVolume /= aNbElem;
-  return pow(aVolume,float(1.0/idim));
+  return pow(aVolume,vtkFloatingPointType(1.0/idim));
 }
 
 
-void VISU_DeformedShapePL::SetScale(float theScale) {
+void
+VISU_DeformedShapePL
+::SetScale(vtkFloatingPointType theScale) 
+{
   myWarpVector->SetScaleFactor(theScale);
   myScaleFactor = theScale;
   Modified();
 }
-float VISU_DeformedShapePL::GetScale() {
+
+vtkFloatingPointType
+VISU_DeformedShapePL
+::GetScale() 
+{
   return myScaleFactor;
 }
 
-void VISU_DeformedShapePL::Init(){
+void
+VISU_DeformedShapePL
+::Init()
+{
   VISU_ScalarMapPL::Init();
-  float aScalarRange[2];
+  vtkFloatingPointType aScalarRange[2];
   GetSourceRange(aScalarRange);
 
   vtkDataSet* aDataSet = GetInput2();
-  float aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet );
+  vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet );
 
   static double EPS = 1.0 / VTK_LARGE_FLOAT;
   if(fabs(aScalarRange[1]) > EPS)
@@ -97,16 +117,25 @@ void VISU_DeformedShapePL::Init(){
     SetScale(0.0);
 }
 
-VISU_ScalarMapPL::THook* VISU_DeformedShapePL::DoHook(){
+VISU_ScalarMapPL::THook* 
+VISU_DeformedShapePL
+::DoHook()
+{
   VISU::CellDataToPoint(myWarpVector,myCellDataToPointData,GetInput2(),myFieldTransform);
   return myWarpVector->GetOutput();
 }
 
-void VISU_DeformedShapePL::Update(){
+void
+VISU_DeformedShapePL
+::Update()
+{
   VISU_ScalarMapPL::Update();
 }
 
-void VISU_DeformedShapePL::SetMapScale(float theMapScale){
+void
+VISU_DeformedShapePL
+::SetMapScale(vtkFloatingPointType theMapScale)
+{
   VISU_ScalarMapPL::SetMapScale(theMapScale);
 
   myWarpVector->SetScaleFactor(myScaleFactor*theMapScale);
index 9c2f95a703e043f81b1352e7c0166c12c1d623ce..fb8d71457266a9147ea4efa72fe54353be7b895e 100644 (file)
@@ -33,30 +33,57 @@ class vtkCellDataToPointData;
 class SALOME_Transform;
 class vtkWarpVector;
 
-class VISU_DeformedShapePL : public VISU_ScalarMapPL{
+class VISU_DeformedShapePL : public VISU_ScalarMapPL
+{
 protected:
   VISU_DeformedShapePL();
   VISU_DeformedShapePL(const VISU_DeformedShapePL&);
+
+  virtual
+  ~VISU_DeformedShapePL();
+
 public:
   vtkTypeMacro(VISU_DeformedShapePL,VISU_ScalarMapPL);
-  static VISU_DeformedShapePL* New();
-  virtual ~VISU_DeformedShapePL();
-  virtual void ShallowCopy(VISU_PipeLine *thePipeLine);
 
-  virtual void SetScale(float theScale);
-  virtual float GetScale();
+  static
+  VISU_DeformedShapePL* 
+  New();
+
+  virtual
+  void
+  ShallowCopy(VISU_PipeLine *thePipeLine);
+
+  virtual
+  void
+  SetScale(vtkFloatingPointType theScale);
+
+  virtual
+  vtkFloatingPointType 
+  GetScale();
   
 public:
-  virtual void Init();
-  virtual void Update();
-  virtual void SetMapScale(float theMapScale = 1.0);
+  virtual
+  void
+  Init();
+
+  virtual
+  void
+  Update();
+
+  virtual
+  void
+  SetMapScale(vtkFloatingPointType theMapScale = 1.0);
 
-  static float GetScaleFactor(vtkDataSet* theDataSet);
+  static
+  vtkFloatingPointType
+  GetScaleFactor(vtkDataSet* theDataSet);
 
 protected:
-  virtual THook* DoHook();
+  virtual
+  THook* 
+  DoHook();
 
-  float myScaleFactor;
+  vtkFloatingPointType myScaleFactor;
   vtkWarpVector *myWarpVector;
   vtkCellDataToPointData* myCellDataToPointData;
 };
index b6423a396f1b820848ad579c00e325613e3c7bae..ead86acd85e52de195504dc773c5988be5e9dee2 100644 (file)
@@ -67,7 +67,7 @@ execute(int theNbElems,
   vtkDataArray* aFieldArray = theInputData->GetArray("VISU_FIELD");
   if(vtkFloatArray *aFloatArray = dynamic_cast<vtkFloatArray*>(aFieldArray)){
     int aNbComp = aFloatArray->GetNumberOfComponents();
-    std::vector<float> anArray(aNbComp < 3? 3: aNbComp);
+    std::vector<vtkFloatingPointType> anArray(aNbComp < 3? 3: aNbComp);
     //
     vtkFloatArray *aScalars = vtkFloatArray::New();
     aScalars->SetNumberOfTuples(theNbElems);
@@ -76,8 +76,8 @@ execute(int theNbElems,
     if(!theScalarMode){
       for(int anId = 0; anId < theNbElems; anId++){
        aFloatArray->GetTuple(anId,&anArray[0]);
-       float aVector[3] = {anArray[0], anArray[1], anArray[2]};
-       float aScalar = sqrt(aVector[0]*aVector[0] + aVector[1]*aVector[1] + aVector[2]*aVector[2]);
+       vtkFloatingPointType aVector[3] = {anArray[0], anArray[1], anArray[2]};
+       vtkFloatingPointType aScalar = sqrt(aVector[0]*aVector[0] + aVector[1]*aVector[1] + aVector[2]*aVector[2]);
        aScalars->SetTuple1(anId,aScalar);
       }
     }else{
index 8208185977fe364d9d0cd4c06ecc386239712b18..b29adb0b2c4dd7c037d78927568fb55f93a2af72 100644 (file)
@@ -15,7 +15,7 @@
 #include <vtkDataSet.h>
 #include <vtkMath.h>
 
-static float Tolerance = 1.0 / VTK_LARGE_FLOAT;
+static vtkFloatingPointType Tolerance = 1.0 / VTK_LARGE_FLOAT;
 
 using namespace std;
 
@@ -107,9 +107,9 @@ void VISU_FieldTransform::SetSpaceTransform(VTKViewer_Transform* theTransform){
 
 void
 VISU_FieldTransform
-::SetScalarRange(float theScalarRange[2]) 
+::SetScalarRange(vtkFloatingPointType theScalarRange[2]) 
 {
-  float aDelta = 
+  vtkFloatingPointType aDelta = 
     fabs(myScalarRange[0] - theScalarRange[0]) + 
     fabs(myScalarRange[1] - theScalarRange[1]);
   if(aDelta < Tolerance)
@@ -123,17 +123,17 @@ VISU_FieldTransform
 
 void
 VISU_FieldTransform
-::SetScalarMin(float theValue)
+::SetScalarMin(vtkFloatingPointType theValue)
 {
-  float aScalarRange[2] = {theValue, GetScalarRange()[1]};
+  vtkFloatingPointType aScalarRange[2] = {theValue, GetScalarRange()[1]};
   SetScalarRange(aScalarRange);
 }
 
 void
 VISU_FieldTransform
-::SetScalarMax(float theValue)
+::SetScalarMax(vtkFloatingPointType theValue)
 {
-  float aScalarRange[2] = {GetScalarRange()[0], theValue};
+  vtkFloatingPointType aScalarRange[2] = {GetScalarRange()[0], theValue};
   SetScalarRange(aScalarRange);
 }
 
@@ -141,7 +141,7 @@ VISU_FieldTransform
 template<typename TypeData> void
 ExecVectors(VISU_FieldTransform::TTransformFun theFunction,
            VTKViewer_Transform* theTransform,
-           float theScalarRange[2], 
+           vtkFloatingPointType theScalarRange[2], 
            int theNbOfTuples,
            TypeData* theInputData, 
            TypeData* theOutputData)
@@ -152,10 +152,10 @@ ExecVectors(VISU_FieldTransform::TTransformFun theFunction,
   vtkFloatArray *aNewVectors = vtkFloatArray::New();
   aNewVectors->SetNumberOfComponents(3);
   aNewVectors->SetNumberOfTuples(theNbOfTuples);
-  float aScalarRange[2] = {(*theFunction)(theScalarRange[0]),(*theFunction)(theScalarRange[1])};
-  float aDelta = aScalarRange[1] - aScalarRange[0];
-  float aScale[3] = {1.0, 1.0, 1.0};
-  static float EPS = 1.0 / VTK_LARGE_FLOAT;
+  vtkFloatingPointType aScalarRange[2] = {(*theFunction)(theScalarRange[0]),(*theFunction)(theScalarRange[1])};
+  vtkFloatingPointType aDelta = aScalarRange[1] - aScalarRange[0];
+  vtkFloatingPointType aScale[3] = {1.0, 1.0, 1.0};
+  static vtkFloatingPointType EPS = 1.0 / VTK_LARGE_FLOAT;
   if(theTransform){
     aScale[0] = theTransform->GetScale()[0];
     aScale[1] = theTransform->GetScale()[1];
@@ -163,9 +163,9 @@ ExecVectors(VISU_FieldTransform::TTransformFun theFunction,
   }
   if(theFunction == &(VISU_FieldTransform::Ident)){
     for (int aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++) {
-      float anInVec[3];
+      vtkFloatingPointType anInVec[3];
       anInVectors->GetTuple(aTupleId,anInVec);
-      float anNewVec[3];
+      vtkFloatingPointType anNewVec[3];
       anNewVec[0] = anInVec[0]*aScale[0];
       anNewVec[1] = anInVec[1]*aScale[1];
       anNewVec[2] = anInVec[2]*aScale[2];
@@ -173,14 +173,14 @@ ExecVectors(VISU_FieldTransform::TTransformFun theFunction,
     }
   }else{
     for (int aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++) {
-      float anInVec[3];
+      vtkFloatingPointType anInVec[3];
       anInVectors->GetTuple(aTupleId,anInVec);
-      float aMagn = vtkMath::Norm(anInVec);
+      vtkFloatingPointType aMagn = vtkMath::Norm(anInVec);
       if(aMagn > EPS)
        aMagn = ((*theFunction)(aMagn) - aScalarRange[0]) / aDelta * theScalarRange[1] / aMagn;
       if(aMagn < 0.0) 
        aMagn = 0.0;
-      float anNewVec[3];
+      vtkFloatingPointType anNewVec[3];
       anNewVec[0] = anInVec[0]*aMagn*aScale[0];
       anNewVec[1] = anInVec[1]*aMagn*aScale[1];
       anNewVec[2] = anInVec[2]*aMagn*aScale[2];
@@ -193,7 +193,7 @@ ExecVectors(VISU_FieldTransform::TTransformFun theFunction,
 
 template<typename TypeData> void
 ExecScalars(VISU_FieldTransform::TTransformFun theFunction, 
-           float theScalarRange[2],
+           vtkFloatingPointType theScalarRange[2],
            int theNbOfTuples, 
            TypeData* theInputData, 
            TypeData* theOutputData)
@@ -204,9 +204,9 @@ ExecScalars(VISU_FieldTransform::TTransformFun theFunction,
   vtkFloatArray *aNewScalars = vtkFloatArray::New();
   aNewScalars->SetNumberOfComponents(1);
   aNewScalars->SetNumberOfTuples(theNbOfTuples);
-  float aScalarRange[2] = {(*theFunction)(theScalarRange[0]),(*theFunction)(theScalarRange[1])};
+  vtkFloatingPointType aScalarRange[2] = {(*theFunction)(theScalarRange[0]),(*theFunction)(theScalarRange[1])};
   for (int aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++) {
-    float aScalar = (*theFunction)(anInScalars->GetTuple1(aTupleId));
+    vtkFloatingPointType aScalar = (*theFunction)(anInScalars->GetTuple1(aTupleId));
     if(aScalar < aScalarRange[0]) 
       aScalar = aScalarRange[0];
     aNewScalars->SetTuple1(aTupleId,aScalar);
index 1a22f59a351407cc2de47aedfbe8fd3e69607f37..7050aed3b25364f8a183062dd472054c7c9e6888 100644 (file)
@@ -48,10 +48,10 @@ public:
   void SetSpaceTransform(VTKViewer_Transform* theTransform);
   VTKViewer_Transform* GetSpaceTransform() { return myTransform;}
 
-  float* GetScalarRange(){ return myScalarRange; }
-  void SetScalarRange(float theScalarRange[2]);
-  void SetScalarMin(float theValue);
-  void SetScalarMax(float theValue);
+  vtkFloatingPointType* GetScalarRange(){ return myScalarRange; }
+  void SetScalarRange(vtkFloatingPointType theScalarRange[2]);
+  void SetScalarMin(vtkFloatingPointType theValue);
+  void SetScalarMax(vtkFloatingPointType theValue);
 
 protected:
   VISU_FieldTransform();
@@ -62,7 +62,7 @@ protected:
 
   VTKViewer_Transform *myTransform;
   TTransformFun myFunction;
-  float myScalarRange[2];
+  vtkFloatingPointType myScalarRange[2];
 };
 
 #endif
index 8d1d0dff678a95319de15b0e816b5d19e30b9478..c8827e9f20676c7e004698e638596a46e005c5cd 100644 (file)
@@ -196,9 +196,9 @@ VISU_GaussPointsPL
   Superclass::Init();
 
   vtkDataSet* aDataSet = GetParentMesh();
-  float aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet );
+  vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet );
 
-  float* aScalarRange = GetScalarRange();
+  vtkFloatingPointType* aScalarRange = GetScalarRange();
   static double EPS = 1.0 / VTK_LARGE_FLOAT;
   if(fabs(aScalarRange[1]) > EPS)
     SetScale( aScaleFactor / aScalarRange[1] );
@@ -229,7 +229,7 @@ VISU_GaussPointsPL
 ::Update()
 {
   //cout << "VISU_GaussPointsPL::Update()" << endl;
-  float* aScalarRange = GetScalarRange();
+  vtkFloatingPointType* aScalarRange = GetScalarRange();
   mySourceScalarRange[0] = aScalarRange[0];
   mySourceScalarRange[1] = aScalarRange[1];
   myDeltaScalarRange = aScalarRange[1] - aScalarRange[0];
@@ -256,7 +256,7 @@ VISU_GaussPointsPL
 {
   //cout << "VISU_GaussPointsPL::UpdateGlyph()" << endl;
 
-  float* aScalarRange = GetScalarRange();
+  vtkFloatingPointType* aScalarRange = GetScalarRange();
 
   if( myPSMapper->GetPointSpriteMode() == 0 ) // Results
   {
@@ -265,13 +265,13 @@ VISU_GaussPointsPL
     myGlyph->SetScaleModeToScaleByScalar();
     myGlyph->SetColorModeToColorByScalar();
 
-    float aRange = 0;
-    float aMinSize = GetMinSize();
-    float aMaxSize = GetMaxSize();
+    vtkFloatingPointType aRange = 0;
+    vtkFloatingPointType aMinSize = GetMinSize();
+    vtkFloatingPointType aMaxSize = GetMaxSize();
     if( fabs( aMaxSize - aMinSize ) > 0.0001 )
       aRange = ( aScalarRange[1] - aScalarRange[0] ) / ( aMaxSize - aMinSize );
-    float aMinRange = aScalarRange[0] - aMinSize * aRange;
-    float aMaxRange = aMinRange + aRange;
+    vtkFloatingPointType aMinRange = aScalarRange[0] - aMinSize * aRange;
+    vtkFloatingPointType aMaxRange = aMinRange + aRange;
 
     myGlyph->SetRange( aMinRange, aMaxRange );
     myGlyph->SetScaleFactor( 1.0 );
@@ -306,7 +306,7 @@ VISU_GaussPointsPL
   return myGaussPtsIDMapper->GetObjID(theID);
 }
 
-float
+vtkFloatingPointType
 VISU_GaussPointsPL
 ::GetNodeCoord(int theObjID)
 {
@@ -422,7 +422,7 @@ VISU_GaussPointsPL
 }
 
 //----------------------------------------------------------------------------
-float
+vtkFloatingPointType
 VISU_GaussPointsPL
 ::GetMaximumSupportedSize()
 {
@@ -432,14 +432,14 @@ VISU_GaussPointsPL
 //----------------------------------------------------------------------------
 void
 VISU_GaussPointsPL
-::SetClamp(float theClamp)
+::SetClamp(vtkFloatingPointType theClamp)
 {
   myPSMapper->SetPointSpriteClamp( theClamp );
   Modified();
 }
 
 //----------------------------------------------------------------------------
-float
+vtkFloatingPointType
 VISU_GaussPointsPL
 ::GetClamp()
 {
@@ -449,14 +449,14 @@ VISU_GaussPointsPL
 //----------------------------------------------------------------------------
 void
 VISU_GaussPointsPL
-::SetSize(float theSize)
+::SetSize(vtkFloatingPointType theSize)
 {
   myPSMapper->SetPointSpriteSize( theSize );
   Modified();
 }
 
 //----------------------------------------------------------------------------
-float
+vtkFloatingPointType
 VISU_GaussPointsPL
 ::GetSize()
 {
@@ -466,14 +466,14 @@ VISU_GaussPointsPL
 //----------------------------------------------------------------------------
 void
 VISU_GaussPointsPL
-::SetMinSize(float theMinSize)
+::SetMinSize(vtkFloatingPointType theMinSize)
 {
   myPSMapper->SetPointSpriteMinSize( theMinSize );
   Modified();
 }
 
 //----------------------------------------------------------------------------
-float
+vtkFloatingPointType
 VISU_GaussPointsPL
 ::GetMinSize()
 {
@@ -483,14 +483,14 @@ VISU_GaussPointsPL
 //----------------------------------------------------------------------------
 void
 VISU_GaussPointsPL
-::SetMaxSize(float theMaxSize)
+::SetMaxSize(vtkFloatingPointType theMaxSize)
 {
   myPSMapper->SetPointSpriteMaxSize( theMaxSize );
   Modified();
 }
 
 //----------------------------------------------------------------------------
-float
+vtkFloatingPointType
 VISU_GaussPointsPL
 ::GetMaxSize()
 {
@@ -500,14 +500,14 @@ VISU_GaussPointsPL
 //----------------------------------------------------------------------------
 void
 VISU_GaussPointsPL
-::SetMagnification(float theMagnification)
+::SetMagnification(vtkFloatingPointType theMagnification)
 {
   myPSMapper->SetPointSpriteMagnification( theMagnification );
   Modified();
 }
 
 //----------------------------------------------------------------------------
-float
+vtkFloatingPointType
 VISU_GaussPointsPL
 ::GetMagnification()
 {
@@ -517,7 +517,7 @@ VISU_GaussPointsPL
 //----------------------------------------------------------------------------
 void
 VISU_GaussPointsPL
-::SetMagnificationIncrement(float theIncrement)
+::SetMagnificationIncrement(vtkFloatingPointType theIncrement)
 {
   myMagnificationIncrement = theIncrement;
 }
@@ -525,14 +525,14 @@ VISU_GaussPointsPL
 //----------------------------------------------------------------------------
 void
 VISU_GaussPointsPL
-::SetAlphaThreshold(float theAlphaThreshold)
+::SetAlphaThreshold(vtkFloatingPointType theAlphaThreshold)
 {
   myPSMapper->SetPointSpriteAlphaThreshold( theAlphaThreshold );
   Modified();
 }
 
 //----------------------------------------------------------------------------
-float
+vtkFloatingPointType
 VISU_GaussPointsPL
 ::GetAlphaThreshold()
 {
@@ -554,25 +554,25 @@ void
 VISU_GaussPointsPL
 ::ChangeMagnification( bool up )
 {
-  float anIncrement = up ? myMagnificationIncrement : 1.0 / myMagnificationIncrement;
+  vtkFloatingPointType anIncrement = up ? myMagnificationIncrement : 1.0 / myMagnificationIncrement;
   SetMagnification( GetMagnification() * anIncrement );
 }
 
 //----------------------------------------------------------------------------
-float
+vtkFloatingPointType
 VISU_GaussPointsPL
 ::GetPointSize(vtkIdType theID, vtkDataArray* theScalarArray)
 {
-  float aMaxSize = GetAverageCellSize() * GetMaxSize();
-  float aMinSize = GetAverageCellSize() * GetMinSize();
-  float aDelta = aMaxSize - aMinSize;
-  float aVal = theScalarArray->GetTuple1(theID);
+  vtkFloatingPointType aMaxSize = GetAverageCellSize() * GetMaxSize();
+  vtkFloatingPointType aMinSize = GetAverageCellSize() * GetMinSize();
+  vtkFloatingPointType aDelta = aMaxSize - aMinSize;
+  vtkFloatingPointType aVal = theScalarArray->GetTuple1(theID);
 
   return aMinSize + aDelta*(aVal - mySourceScalarRange[0])/myDeltaScalarRange;
 }
 
 //----------------------------------------------------------------------------
-float
+vtkFloatingPointType
 VISU_GaussPointsPL
 ::GetMaxPointSize()
 {
@@ -580,7 +580,7 @@ VISU_GaussPointsPL
 }
 
 //----------------------------------------------------------------------------
-float
+vtkFloatingPointType
 VISU_GaussPointsPL
 ::GetPointSize(vtkIdType theID)
 {
@@ -594,14 +594,14 @@ VISU_GaussPointsPL
 //----------------------------------------------------------------------------
 void
 VISU_GaussPointsPL
-::SetAverageCellSize(float theAverageCellSize)
+::SetAverageCellSize(vtkFloatingPointType theAverageCellSize)
 {
   myPSMapper->SetAverageCellSize( theAverageCellSize );
   Modified();
 }
 
 //----------------------------------------------------------------------------
-float
+vtkFloatingPointType
 VISU_GaussPointsPL
 ::GetAverageCellSize()
 {
@@ -678,19 +678,19 @@ VISU_GaussPointsPL
   return aCompositeImageData;
 }
 
-void VISU_GaussPointsPL::SetScale( float theScale )
+void VISU_GaussPointsPL::SetScale( vtkFloatingPointType theScale )
 {
   myWarpVector->SetScaleFactor( theScale );
   myScaleFactor = GetScale();
   Modified();
 }
 
-float VISU_GaussPointsPL::GetScale()
+vtkFloatingPointType VISU_GaussPointsPL::GetScale()
 {
   return myWarpVector->GetScaleFactor();
 }
 
-void VISU_GaussPointsPL::SetMapScale( float theMapScale )
+void VISU_GaussPointsPL::SetMapScale( vtkFloatingPointType theMapScale )
 {
   VISU_ScalarMapPL::SetMapScale( theMapScale );
 
index b342ab56f04f7a3832929bd34094fe8130b31552..e8b47fc437d2af169977bddf74ec0257f283b70c 100644 (file)
@@ -107,7 +107,7 @@ public:
   GetObjID(vtkIdType theID) const;
 
   virtual
-  float
+  vtkFloatingPointType
   GetNodeCoord(vtkIdType theObjID);
 
   void 
@@ -150,63 +150,63 @@ public:
   GetPrimitiveType();
 
   //! Get the maximum Point Sprite size, which is supported by hardware.
-  float 
+  vtkFloatingPointType 
   GetMaximumSupportedSize();
 
   //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteClamp.
   void
-  SetClamp(float theClamp);
+  SetClamp(vtkFloatingPointType theClamp);
 
-  //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteClamp, float).
-  float
+  //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteClamp, vtkFloatingPointType).
+  vtkFloatingPointType
   GetClamp();
 
   //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteSize.
   void
-  SetSize(float theSize);
+  SetSize(vtkFloatingPointType theSize);
 
-  //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteSize, float).
-  float 
+  //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteSize, vtkFloatingPointType).
+  vtkFloatingPointType 
   GetSize();
 
   //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteMinSize.
   void
-  SetMinSize(float theMinSize);
+  SetMinSize(vtkFloatingPointType theMinSize);
 
-  //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMinSize, float).
-  float 
+  //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMinSize, vtkFloatingPointType).
+  vtkFloatingPointType 
   GetMinSize();
 
   //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteMinSize.
   void
-  SetMaxSize(float theMaxSize);
+  SetMaxSize(vtkFloatingPointType theMaxSize);
 
-  //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMaxSize, float).
-  float 
+  //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMaxSize, vtkFloatingPointType).
+  vtkFloatingPointType 
   GetMaxSize();
 
   //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteMagnification.
   void
-  SetMagnification(float theMagnification);
+  SetMagnification(vtkFloatingPointType theMagnification);
 
-  //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMagnification, float).
-  float
+  //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMagnification, vtkFloatingPointType).
+  vtkFloatingPointType
   GetMagnification();
 
   //! Set the increment of changing Magnification parameter.
   void
-  SetMagnificationIncrement(float theIncrement);
+  SetMagnificationIncrement(vtkFloatingPointType theIncrement);
 
   //! Get the increment of changing Magnification parameter.
-  float
+  vtkFloatingPointType
   GetMagnificationIncrement() { return myMagnificationIncrement; }
 
   //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteAlphaThreshold.
   void
-  SetAlphaThreshold(float theAlphaThreshold);
+  SetAlphaThreshold(vtkFloatingPointType theAlphaThreshold);
 
-  //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteAlphaThreshold, float).
-  float
+  //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteAlphaThreshold, vtkFloatingPointType).
+  vtkFloatingPointType
   GetAlphaThreshold();
 
   //! Set resolution of the Geometrical Sphere.
@@ -222,23 +222,23 @@ public:
   ChangeMagnification( bool up );
 
   //! Get the maximum size of Point Sprites in the presentation.
-  float
+  vtkFloatingPointType
   GetMaxPointSize();
 
   //! Get point size by element's Id.
-  float
+  vtkFloatingPointType
   GetPointSize(vtkIdType theID);
 
   //! Get point size by element's Id using the specified scalar array.
-  float
+  vtkFloatingPointType
   GetPointSize(vtkIdType theID, vtkDataArray* theScalarArray);
 
-  //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkSetMacro(AverageCellSize, float).
+  //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkSetMacro(AverageCellSize, vtkFloatingPointType).
   void
-  SetAverageCellSize(float AverageCellSize);
+  SetAverageCellSize(vtkFloatingPointType AverageCellSize);
 
-  //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(AverageCellSize, float).
-  float
+  //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(AverageCellSize, vtkFloatingPointType).
+  vtkFloatingPointType
   GetAverageCellSize();
 
   //! Set image data for the Point Sprite texture.
@@ -259,13 +259,13 @@ public:
   virtual void  SetIsDeformed( bool theIsDeformed );
   virtual bool  GetIsDeformed() const;
 
-  virtual void  SetScale( float theScale );
-  virtual float GetScale();
-  virtual void  SetMapScale( float theMapScale = 1.0 );
+  virtual void  SetScale( vtkFloatingPointType theScale );
+  virtual vtkFloatingPointType GetScale();
+  virtual void  SetMapScale( vtkFloatingPointType theMapScale = 1.0 );
 
 protected:
   bool myIsDeformed;
-  float myScaleFactor;
+  vtkFloatingPointType myScaleFactor;
   vtkWarpVector *myWarpVector;
   vtkCellDataToPointData* myCellDataToPointData;
   std::vector<VTKViewer_PassThroughFilter*> myPassFilter;
@@ -281,11 +281,11 @@ protected:
   vtkGeometryFilter* myGeomFilter;
 
   vtkDataArray *myScalarArray;
-  float mySourceScalarRange[2];
-  float myDeltaScalarRange;
+  vtkFloatingPointType mySourceScalarRange[2];
+  vtkFloatingPointType myDeltaScalarRange;
 
   int   myPrimitiveType;
-  float myMagnificationIncrement;
+  vtkFloatingPointType myMagnificationIncrement;
 };
   
 #endif
index 3a3c21a821b34fc30441da84b86b5344b82e7f21..08a8dbba4d601dbcea55be358b321fc9fa0a7829 100644 (file)
@@ -54,7 +54,7 @@ VISU_UnScaledActor::VISU_UnScaledActor()
 // function: SetCenter
 // purpose:
 //====================================================================
-void VISU_UnScaledActor::SetCenter(float *pC)
+void VISU_UnScaledActor::SetCenter(vtkFloatingPointType *pC)
 {
   for (int i=0; i<3; ++i){
     myCenter[i]=pC[i];
@@ -64,7 +64,7 @@ void VISU_UnScaledActor::SetCenter(float *pC)
 // function:GetBounds
 // purpose:
 //====================================================================
-float* VISU_UnScaledActor::GetBounds()
+vtkFloatingPointType* VISU_UnScaledActor::GetBounds()
 {
   Superclass::GetBounds();
   //
@@ -81,20 +81,20 @@ float* VISU_UnScaledActor::GetBounds()
 void VISU_UnScaledActor::Render(vtkRenderer *theRenderer)
 {
   if(theRenderer){
-    float P[2][3] = {{-1.0, -1.0, 0.0},{+1.0, +1.0, 0.0}};
+    vtkFloatingPointType 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]);
-    float 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]));
+    vtkFloatingPointType 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();
-    float aWinDiag = sqrt(float(aSize[0]*aSize[0]+aSize[1]*aSize[1]));
+    vtkFloatingPointType aWinDiag = sqrt(vtkFloatingPointType(aSize[0]*aSize[0]+aSize[1]*aSize[1]));
     vtkDataSet* aDataSet = GetMapper()->GetInput();
-    float aLength = aDataSet->GetLength();
-    float aPrecision = 1.e-3;
-    float anOldScale = GetScale()[0];
-    float aScale = 
-      mySize*aWorldDiag/aWinDiag/aLength*sqrt(float(aSize[0])/float(aSize[1]));
+    vtkFloatingPointType aLength = aDataSet->GetLength();
+    vtkFloatingPointType aPrecision = 1.e-3;
+    vtkFloatingPointType anOldScale = GetScale()[0];
+    vtkFloatingPointType aScale = 
+      mySize*aWorldDiag/aWinDiag/aLength*sqrt(vtkFloatingPointType(aSize[0])/vtkFloatingPointType(aSize[1]));
 
     SetOrigin(myCenter);  
     //
index 8f46e43ba636d11cb643dcbc57928b40f92d938d..3e278dc0ac8579439b60436c6394558a9ab2c10b 100644 (file)
@@ -43,16 +43,16 @@ public:
   static VISU_UnScaledActor *New();
   
   
-  void SetCenter(float *);
+  void SetCenter(vtkFloatingPointType *);
   virtual void SetSize(int theSize);
   virtual void Render(vtkRenderer *theRenderer);
-  virtual float *GetBounds();
+  virtual vtkFloatingPointType *GetBounds();
 
 protected:
   VISU_UnScaledActor();
   ~VISU_UnScaledActor(){}
 
-  float myCenter[3];
+  vtkFloatingPointType myCenter[3];
   int mySize;
 };
 
index 8e14bca9949723895838d7cf74c9a5f2d357fafe..13941e70f5a34d124376e95192439fc55da96441 100644 (file)
 
 vtkStandardNewMacro(VISU_IsoSurfacesPL);
 
-VISU_IsoSurfacesPL::VISU_IsoSurfacesPL(){
+VISU_IsoSurfacesPL
+::VISU_IsoSurfacesPL()
+{
   myContourFilter = vtkContourFilter::New();
   myCellDataToPointData = vtkCellDataToPointData::New();
   myIsShrinkable = false;
 }
 
-VISU_IsoSurfacesPL::~VISU_IsoSurfacesPL(){
+VISU_IsoSurfacesPL
+::~VISU_IsoSurfacesPL()
+{
   myContourFilter->UnRegisterAllOutputs();
   myContourFilter->Delete();
 
@@ -47,71 +51,105 @@ VISU_IsoSurfacesPL::~VISU_IsoSurfacesPL(){
   myCellDataToPointData->Delete();
 }
 
-void VISU_IsoSurfacesPL::ShallowCopy(VISU_PipeLine *thePipeLine){
+void
+VISU_IsoSurfacesPL
+::ShallowCopy(VISU_PipeLine *thePipeLine)
+{
   if(VISU_IsoSurfacesPL *aPipeLine = dynamic_cast<VISU_IsoSurfacesPL*>(thePipeLine)){
     SetNbParts(aPipeLine->GetNbParts());
-    float aRange[2] = {aPipeLine->GetMin(), aPipeLine->GetMax()};
+    vtkFloatingPointType aRange[2] = {aPipeLine->GetMin(), aPipeLine->GetMax()};
     SetRange(aRange);
   }
   VISU_ScalarMapPL::ShallowCopy(thePipeLine);
 }
 
-int VISU_IsoSurfacesPL::GetNbParts() {
+int
+VISU_IsoSurfacesPL
+::GetNbParts() 
+{
   return myContourFilter->GetNumberOfContours();
 }
-void VISU_IsoSurfacesPL::SetNbParts(int theNb) {
+void
+VISU_IsoSurfacesPL
+::SetNbParts(int theNb) 
+{
   myContourFilter->SetNumberOfContours(theNb);
   Modified();
 }
 
 
-void VISU_IsoSurfacesPL::SetScaling(int theScaling) {
+void
+VISU_IsoSurfacesPL
+::SetScaling(int theScaling) 
+{
   VISU_ScalarMapPL::SetScaling(theScaling);
   SetRange(myRange);
 }
-void VISU_IsoSurfacesPL::SetRange(float theRange[2]){
+void
+VISU_IsoSurfacesPL
+::SetRange(vtkFloatingPointType theRange[2])
+{
   if(theRange[0] <= theRange[1]){
     myRange[0] = theRange[0];  myRange[1] = theRange[1];
-    float aRange[2] = {myRange[0], myRange[1]};
+    vtkFloatingPointType aRange[2] = {myRange[0], myRange[1]};
     if(GetScaling() == VTK_SCALE_LOG10)
       VISU_LookupTable::ComputeLogRange(theRange,aRange);
     myContourFilter->GenerateValues(GetNbParts(),aRange);
     Modified();
   }
 }
-float VISU_IsoSurfacesPL::GetMin() {
+
+vtkFloatingPointType
+VISU_IsoSurfacesPL
+::GetMin() 
+{
   return myRange[0];
 }
-float VISU_IsoSurfacesPL::GetMax() {
+
+vtkFloatingPointType
+VISU_IsoSurfacesPL
+::GetMax() 
+{
   return myRange[1];
 }
 
 
-void VISU_IsoSurfacesPL::Init(){
+void
+VISU_IsoSurfacesPL
+::Init()
+{
   VISU_ScalarMapPL::Init();
 
   SetNbParts(10);
-  float aScalarRange[2];
+  vtkFloatingPointType aScalarRange[2];
   GetSourceRange(aScalarRange);
   SetRange(aScalarRange);
 }
 
-VISU_ScalarMapPL::THook* VISU_IsoSurfacesPL::DoHook(){
+VISU_ScalarMapPL::THook* 
+VISU_IsoSurfacesPL
+::DoHook()
+{
   VISU::CellDataToPoint(myContourFilter,myCellDataToPointData,GetInput2(),myFieldTransform);
   return myContourFilter->GetOutput();
 }
 
 
-void VISU_IsoSurfacesPL::Update()
+void
+VISU_IsoSurfacesPL
+::Update()
 {
   VISU_ScalarMapPL::Update();
 }
 
-void VISU_IsoSurfacesPL::SetMapScale(float theMapScale){
+void
+VISU_IsoSurfacesPL
+::SetMapScale(vtkFloatingPointType theMapScale)
+{
   VISU_ScalarMapPL::SetMapScale(theMapScale);
 
-  float aRange[2] = {GetMax() - theMapScale*(GetMax()-GetMin()), GetMax()};
-  float aNewRange[2] = {aRange[0], aRange[1]};
+  vtkFloatingPointType aRange[2] = {GetMax() - theMapScale*(GetMax()-GetMin()), GetMax()};
+  vtkFloatingPointType aNewRange[2] = {aRange[0], aRange[1]};
   if(GetScaling() == VTK_SCALE_LOG10)
     VISU_LookupTable::ComputeLogRange(aRange,aNewRange);
   myContourFilter->GenerateValues(GetNbParts(),aNewRange);
index 68732e377d1abe0688041a5e0aadd98301a7a84e..2b62fb188d2c337da545f014c7890d8de158d45a 100644 (file)
 class vtkContourFilter;
 class vtkCellDataToPointData;
 
-class VISU_IsoSurfacesPL : public VISU_ScalarMapPL{
+class VISU_IsoSurfacesPL : public VISU_ScalarMapPL
+{
 protected:
   VISU_IsoSurfacesPL();
   VISU_IsoSurfacesPL(const VISU_IsoSurfacesPL&);
+
+  virtual
+  ~VISU_IsoSurfacesPL();
+
 public:
   vtkTypeMacro(VISU_IsoSurfacesPL,VISU_ScalarMapPL);
-  static VISU_IsoSurfacesPL* New();
-  virtual ~VISU_IsoSurfacesPL();
-  virtual void ShallowCopy(VISU_PipeLine *thePipeLine);
 
-  virtual int GetNbParts();
-  virtual void SetNbParts(int theNb = 10);
+  static
+  VISU_IsoSurfacesPL* 
+  New();
+
+  virtual
+  void
+  ShallowCopy(VISU_PipeLine *thePipeLine);
+
+  virtual
+  int
+  GetNbParts();
+
+  virtual
+  void
+  SetNbParts(int theNb = 10);
+
+  virtual
+  void
+  SetScaling(int theScaling = VTK_SCALE_LINEAR);
 
-  virtual void SetScaling(int theScaling = VTK_SCALE_LINEAR);
-  virtual void SetRange(float theRange[2]);
-  virtual float GetMin();
-  virtual float GetMax();
+  virtual
+  void
+  SetRange(vtkFloatingPointType theRange[2]);
+
+  virtual
+  vtkFloatingPointType
+  GetMin();
+
+  virtual
+  vtkFloatingPointType
+  GetMax();
   
 public:
-  virtual void Init();
-  virtual void Update();
-  virtual THook* DoHook();
-  virtual void SetMapScale(float theMapScale = 1.0);
+  virtual
+  void
+  Init();
+
+  virtual
+  void
+  Update();
+
+  virtual
+  THook* 
+  DoHook();
+
+  virtual
+  void
+  SetMapScale(vtkFloatingPointType theMapScale = 1.0);
 
 protected:
   int myNbParts;
-  float myRange[2];
+  vtkFloatingPointType myRange[2];
   vtkCellDataToPointData* myCellDataToPointData;
   vtkContourFilter *myContourFilter;
 };
index c15fdd27c4b9208735b23f3bd3573f99cd97776b..9d9b533bb7fc8b1c80b63e5b10e9749c2a071fda 100644 (file)
 
 using namespace std;
 
-VISU_LookupTable *VISU_LookupTable::New() {
-  vtkObject* ret = vtkObjectFactory::CreateInstance("VISU_LookupTable");
-  if(ret)
-    return (VISU_LookupTable*)ret;
-  return new VISU_LookupTable;
-}
+vtkStandardNewMacro(VISU_LookupTable);
 
-VISU_LookupTable::VISU_LookupTable(int sze, int ext)
-  : vtkLookupTable(sze, ext), myScale(1.0), myBicolor(false) {}
+VISU_LookupTable
+::VISU_LookupTable(int sze, int ext):
+  vtkLookupTable(sze, ext), 
+  myScale(1.0), 
+  myBicolor(false) 
+{}
 
-void VISU_LookupTable::SetMapScale(float theScale)
+void 
+VISU_LookupTable
+::SetMapScale(vtkFloatingPointType theScale)
 {
   if( myScale != theScale )
   {
@@ -61,7 +62,11 @@ void VISU_LookupTable::SetBicolor( bool theBicolor )
 }
 
 
-int VISU_LookupTable::ComputeLogRange(float inRange[2], float outRange[2]){
+int 
+VISU_LookupTable
+::ComputeLogRange(vtkFloatingPointType inRange[2], 
+                 vtkFloatingPointType outRange[2])
+{
   if(inRange[0] >= inRange[1])
     return -1;
   if(0.0 <= inRange[0] && 0.0 < inRange[1]){
@@ -79,9 +84,12 @@ int VISU_LookupTable::ComputeLogRange(float inRange[2], float outRange[2]){
     return -1;
 }
 
-unsigned char* VISU_LookupTable::MapValue(float v) {
+unsigned char* 
+VISU_LookupTable
+::MapValue(vtkFloatingPointType v) 
+{
   if(GetScale() == VTK_SCALE_LOG10) {
-    float aLowBound = log10(this->TableRange[0]);
+    vtkFloatingPointType aLowBound = log10(this->TableRange[0]);
     v = pow(10.0f,aLowBound + (v - aLowBound)*myScale);
     return vtkLookupTable::MapValue(v);
   } else if (!myBicolor) {
@@ -95,8 +103,11 @@ unsigned char* VISU_LookupTable::MapValue(float v) {
 }
 
 // Apply log to value, with appropriate constraints.
-inline float VISU_ApplyLogScale(float v, float range[2], 
-                               float logRange[2])
+inline 
+vtkFloatingPointType 
+VISU_ApplyLogScale(vtkFloatingPointType v, 
+                  vtkFloatingPointType range[2], 
+                  vtkFloatingPointType logRange[2])
 {
   // is the range set for negative numbers?
   if (range[0] < 0)
@@ -133,15 +144,18 @@ inline float VISU_ApplyLogScale(float v, float range[2],
 }                 
 
 // Apply shift/scale to the scalar value v and do table lookup.
-inline unsigned char *VISU_LinearLookup(float v,   
-                                       unsigned char *table,
-                                       float maxIndex,
-                                       float shift, float scale,
-                                       bool bicolor)
+inline 
+unsigned char *
+VISU_LinearLookup(vtkFloatingPointType v,   
+                 unsigned char *table,
+                 vtkFloatingPointType maxIndex,
+                 vtkFloatingPointType shift, 
+                 vtkFloatingPointType scale,
+                 bool bicolor)
 {
   if( !bicolor )
   {
-    float findx = (v + shift)*scale;
+    vtkFloatingPointType findx = (v + shift)*scale;
     if (findx < 0)
       findx = 0;
     if (findx > maxIndex)
@@ -161,25 +175,30 @@ inline unsigned char *VISU_LinearLookup(float v,
 // accelerate the mapping by copying the data in 32-bit chunks instead
 // of 8-bit chunks
 template<class T>
-void VISU_LookupTableMapData(vtkLookupTable *self, T *input, 
-                            unsigned char *output, int length, 
-                            int inIncr, int outFormat,
-                            float theMapScale, bool bicolor)
+void
+VISU_LookupTableMapData(vtkLookupTable *self, 
+                       T *input, 
+                       unsigned char *output, 
+                       int length, 
+                       int inIncr, 
+                       int outFormat,
+                       vtkFloatingPointType theMapScale, 
+                       bool bicolor)
 {
   int i = length;
-  float *range = self->GetTableRange();
-  float maxIndex = self->GetNumberOfColors() - 1;
-  float shift, scale;
+  vtkFloatingPointType *range = self->GetTableRange();
+  vtkFloatingPointType maxIndex = self->GetNumberOfColors() - 1;
+  vtkFloatingPointType shift, scale;
   unsigned char *table = self->GetPointer(0);
   unsigned char *cptr;
-  float alpha;
+  vtkFloatingPointType alpha;
 
   if ( (alpha=self->GetAlpha()) >= 1.0 ) //no blending required 
     {
     if (self->GetScale() == VTK_SCALE_LOG10)
       {
-      float val;
-      float logRange[2];
+      vtkFloatingPointType val;
+      vtkFloatingPointType logRange[2];
       VISU_LookupTable::ComputeLogRange(range, logRange);
       shift = -logRange[0];
       if (logRange[1] <= logRange[0])
@@ -309,8 +328,8 @@ void VISU_LookupTableMapData(vtkLookupTable *self, T *input,
     {
     if (self->GetScale() == VTK_SCALE_LOG10)
       {
-      float val;
-      float logRange[2];
+      vtkFloatingPointType val;
+      vtkFloatingPointType logRange[2];
       VISU_LookupTable::ComputeLogRange(range, logRange);
       shift = -logRange[0];
       if (logRange[1] <= logRange[0])
@@ -441,10 +460,15 @@ void VISU_LookupTableMapData(vtkLookupTable *self, T *input,
 // it is only done on the first render. Colors are cached
 // for subsequent renders.
 template<class T>
-void VISU_LookupTableMapMag(vtkLookupTable *self, T *input, 
-                           unsigned char *output, int length, 
-                           int inIncr, int outFormat,
-                           float theMapScale, bool bicolor)
+void
+VISU_LookupTableMapMag(vtkLookupTable *self, 
+                      T *input, 
+                      unsigned char *output, 
+                      int length, 
+                      int inIncr, 
+                      int outFormat,
+                      vtkFloatingPointType theMapScale, 
+                      bool bicolor)
 {
   double tmp, sum;
   double *mag;
index 20f7c23e5b2b0673f2c7e974e4d51a8d71dca03a..72af94a33fbab893f5b9fd0a5b78587fba9079c9 100644 (file)
@@ -20,20 +20,20 @@ class VISU_LookupTable: public vtkLookupTable {
                                        int inputDataType, int numberOfValues,
                                        int inputIncrement, int outputIncrement);
 
-  float GetMapScale() { return myScale; }
-  void SetMapScale(float theScale = 1.0);
+  vtkFloatingPointType GetMapScale() { return myScale; }
+  void SetMapScale(vtkFloatingPointType theScale = 1.0);
 
-  float GetBicolor() { return myBicolor; }
+  bool GetBicolor() { return myBicolor; }
   void SetBicolor( bool theBicolor );
 
-   static int ComputeLogRange(float inRange[2], float outRange[2]);
-   unsigned char *MapValue(float v);
+   static int ComputeLogRange(vtkFloatingPointType inRange[2], vtkFloatingPointType outRange[2]);
+   unsigned char *MapValue(vtkFloatingPointType v);
 
  protected:
    VISU_LookupTable(int sze=256, int ext=256);
    ~VISU_LookupTable() {};
    
-   float myScale;
+   vtkFloatingPointType myScale;
 
    bool myBicolor;
 };
index d8eb9e8ae9824755d88e8f2a0c8960d4be8a8b56..9edaf2e9a09147f6ed6eb270b1abb2d62d1e1f87 100755 (executable)
@@ -406,7 +406,7 @@ bool VISU_OpenGLPointSpriteMapper::InitExtensions()
 //-----------------------------------------------------------------------------
 float ViewToDisplay( vtkRenderer* theRenderer )
 {
-  float p1[3], p2[3];
+  vtkFloatingPointType p1[3], p2[3];
 
   theRenderer->SetViewPoint( 0.0, 0.0, 0.0 );
   theRenderer->ViewToDisplay();
@@ -416,7 +416,7 @@ float ViewToDisplay( vtkRenderer* theRenderer )
   theRenderer->ViewToDisplay();
   theRenderer->GetDisplayPoint( p2 );
 
-  float coefficient = sqrt( pow( p2[0] - p1[0], 2 ) + pow( p2[1] - p1[1], 2 ) ) / sqrt( 2 );
+  vtkFloatingPointType coefficient = sqrt( pow( p2[0] - p1[0], 2 ) + pow( p2[1] - p1[1], 2 ) ) / sqrt( 2 );
   //cout << p1[0] << " " << p1[1] << " " << p1[2] << endl;
   //cout << p2[0] << " " << p2[1] << " " << p2[2] << endl;
   //cout << "ZOOM  : " << coefficient << endl;
@@ -753,7 +753,7 @@ void VISU_OpenGLPointSpriteMapper::DrawPoints(vtkPoints *thePoints,
 
   TVertex* aVertexArr = new TVertex[ this->TotalCells ];
 
-  float* aPropertyColor = theActor->GetProperty()->GetColor();
+  vtkFloatingPointType* aPropertyColor = theActor->GetProperty()->GetColor();
   float aColor[3] = {aPropertyColor[0], aPropertyColor[1], aPropertyColor[2]};
 
   unsigned long i = 0;
@@ -763,7 +763,7 @@ void VISU_OpenGLPointSpriteMapper::DrawPoints(vtkPoints *thePoints,
   {
     TVertex& aVertex = aVertexArr[i];
     vtkIdType aPointId = pts[0];
-    float* aCoords = thePoints->GetPoint( aPointId );
+    vtkFloatingPointType* aCoords = thePoints->GetPoint( aPointId );
     aVertex.vx = aCoords[0];
     aVertex.vy = aCoords[1];
     aVertex.vz = aCoords[2];
index 9fcd66fdc9a6fec787350d49acd4c93a8a69ceb3..34ba2a61d3267af34b9054d66b8ad7f17564b9eb 100644 (file)
@@ -181,7 +181,7 @@ VISU_PipeLine
 
 int
 VISU_PipeLine
-::CheckAvailableMemory(const float& theSize)
+::CheckAvailableMemory(const vtkFloatingPointType& theSize)
 {
   try{
     if(theSize > ULONG_MAX) return 0;
@@ -202,10 +202,10 @@ VISU_PipeLine
   return 0;
 }
 
-float
+vtkFloatingPointType
 VISU_PipeLine
-::GetAvailableMemory(float theSize, 
-                    float theMinSize)
+::GetAvailableMemory(vtkFloatingPointType theSize, 
+                    vtkFloatingPointType theMinSize)
 {
   while(!CheckAvailableMemory(theSize))
     if(theSize > theMinSize)
@@ -279,36 +279,36 @@ VISU_PipeLine
 static
 void
 ComputeBoundsParam (vtkDataSet* theDataSet,
-                   float theDirection[3], 
-                   float theMinPnt[3],
-                   float& theMaxBoundPrj, 
-                   float& theMinBoundPrj)
+                   vtkFloatingPointType theDirection[3], 
+                   vtkFloatingPointType theMinPnt[3],
+                   vtkFloatingPointType& theMaxBoundPrj, 
+                   vtkFloatingPointType& theMinBoundPrj)
 {
-  float aBounds[6];
+  vtkFloatingPointType aBounds[6];
   theDataSet->GetBounds(aBounds);
 
   //Enlarge bounds in order to avoid conflicts of precision
   for(int i = 0; i < 6; i += 2){
     static double EPS = 1.0E-3;
-    float aDelta = (aBounds[i+1] - aBounds[i])*EPS;
+    vtkFloatingPointType aDelta = (aBounds[i+1] - aBounds[i])*EPS;
     aBounds[i] -= aDelta;
     aBounds[i+1] += aDelta;
   }
 
-  float aBoundPoints[8][3] = { {aBounds[0],aBounds[2],aBounds[4]},
-                              {aBounds[1],aBounds[2],aBounds[4]},
-                              {aBounds[0],aBounds[3],aBounds[4]},
-                              {aBounds[1],aBounds[3],aBounds[4]},
-                              {aBounds[0],aBounds[2],aBounds[5]},
-                              {aBounds[1],aBounds[2],aBounds[5]},
-                              {aBounds[0],aBounds[3],aBounds[5]},
-                              {aBounds[1],aBounds[3],aBounds[5]}};
+  vtkFloatingPointType aBoundPoints[8][3] = { {aBounds[0],aBounds[2],aBounds[4]},
+                                             {aBounds[1],aBounds[2],aBounds[4]},
+                                             {aBounds[0],aBounds[3],aBounds[4]},
+                                             {aBounds[1],aBounds[3],aBounds[4]},
+                                             {aBounds[0],aBounds[2],aBounds[5]},
+                                             {aBounds[1],aBounds[2],aBounds[5]},
+                                             {aBounds[0],aBounds[3],aBounds[5]},
+                                             {aBounds[1],aBounds[3],aBounds[5]}};
 
   int aMaxId = 0, aMinId = aMaxId;
   theMaxBoundPrj = vtkMath::Dot(theDirection,aBoundPoints[aMaxId]);
   theMinBoundPrj = theMaxBoundPrj;
   for(int i = 1; i < 8; i++){
-    float aTmp = vtkMath::Dot(theDirection,aBoundPoints[i]);
+    vtkFloatingPointType aTmp = vtkMath::Dot(theDirection,aBoundPoints[i]);
     if(theMaxBoundPrj < aTmp){
       theMaxBoundPrj = aTmp;
       aMaxId = i;
@@ -318,7 +318,7 @@ ComputeBoundsParam (vtkDataSet* theDataSet,
       aMinId = i;
     }
   }
-  float *aMinPnt = aBoundPoints[aMaxId];
+  vtkFloatingPointType *aMinPnt = aBoundPoints[aMaxId];
   theMinPnt[0] = aMinPnt[0];
   theMinPnt[1] = aMinPnt[1];
   theMinPnt[2] = aMinPnt[2];
@@ -327,13 +327,13 @@ ComputeBoundsParam (vtkDataSet* theDataSet,
 static
 void
 DistanceToPosition(vtkDataSet* theDataSet,
-                  float theDirection[3], 
-                  float theDist, 
-                  float thePos[3])
+                  vtkFloatingPointType theDirection[3], 
+                  vtkFloatingPointType theDist, 
+                  vtkFloatingPointType thePos[3])
 {
-  float aMaxBoundPrj, aMinBoundPrj, aMinPnt[3];
+  vtkFloatingPointType aMaxBoundPrj, aMinBoundPrj, aMinPnt[3];
   ComputeBoundsParam(theDataSet,theDirection,aMinPnt,aMaxBoundPrj,aMinBoundPrj);
-  float aLength = (aMaxBoundPrj-aMinBoundPrj)*theDist;
+  vtkFloatingPointType aLength = (aMaxBoundPrj-aMinBoundPrj)*theDist;
   thePos[0] = aMinPnt[0]-theDirection[0]*aLength;
   thePos[1] = aMinPnt[1]-theDirection[1]*aLength;
   thePos[2] = aMinPnt[2]-theDirection[2]*aLength;
@@ -342,37 +342,37 @@ DistanceToPosition(vtkDataSet* theDataSet,
 static
 void
 PositionToDistance (vtkDataSet* theDataSet,
-                   float theDirection[3], 
-                   float thePos[3], 
-                   float& theDist)
+                   vtkFloatingPointType theDirection[3], 
+                   vtkFloatingPointType thePos[3], 
+                   vtkFloatingPointType& theDist)
 {
-  float aMaxBoundPrj, aMinBoundPrj, aMinPnt[3];
+  vtkFloatingPointType aMaxBoundPrj, aMinBoundPrj, aMinPnt[3];
   ComputeBoundsParam(theDataSet,theDirection,aMinPnt,aMaxBoundPrj,aMinBoundPrj);
-  float aPrj = vtkMath::Dot(theDirection,thePos);
+  vtkFloatingPointType aPrj = vtkMath::Dot(theDirection,thePos);
   theDist = (aPrj-aMinBoundPrj)/(aMaxBoundPrj-aMinBoundPrj);
 }
 
 void
 VISU_PipeLine
-::SetPlaneParam(float theDir[3], 
-               float theDist, 
+::SetPlaneParam(vtkFloatingPointType theDir[3], 
+               vtkFloatingPointType theDist, 
                vtkPlane* thePlane)
 {
   thePlane->SetNormal(theDir);
-  float anOrigin[3];
+  vtkFloatingPointType anOrigin[3];
   ::DistanceToPosition(GetInput(),theDir,theDist,anOrigin);
   thePlane->SetOrigin(anOrigin);
 }
 
 void
 VISU_PipeLine
-::GetPlaneParam(float theDir[3], 
-               float& theDist, 
+::GetPlaneParam(vtkFloatingPointType theDir[3], 
+               vtkFloatingPointType& theDist, 
                vtkPlane* thePlane)
 {
   thePlane->GetNormal(theDir);
 
-  float anOrigin[3];
+  vtkFloatingPointType anOrigin[3];
   thePlane->GetOrigin(anOrigin);
   ::PositionToDistance(GetInput(),theDir,anOrigin,theDist);
 }
@@ -385,7 +385,7 @@ bool
 VISU_PipeLine
 ::IsPlanarInput() const
 {
-  float aBounds[6];
+  vtkFloatingPointType aBounds[6];
   GetInput()->GetBounds( aBounds ); // xmin,xmax, ymin,ymax, zmin,zmax
   if (fabs( aBounds[0] - aBounds[1] ) <= FLT_MIN ||
       fabs( aBounds[2] - aBounds[3] ) <= FLT_MIN ||
@@ -412,7 +412,7 @@ VISU_PipeLine
   return myExtractGeometry->GetNodeVTKId(anID);
 }
 
-float
+vtkFloatingPointType
 VISU_PipeLine
 ::GetNodeCoord(int theObjID)
 {
index 5e2a1ed8bf8bb85694140c757ef8ffdb2845a112..76d3d2bc33a97fd481911ca654308fe793ebede5 100644 (file)
@@ -135,12 +135,12 @@ public:
 
   static
   int
-  CheckAvailableMemory(const float& theSize);
+  CheckAvailableMemory(const vtkFloatingPointType& theSize);
   
   static
-  float
-  GetAvailableMemory(float theSize = 16*1024*1024.0,
-                    float theMinSize = 1024*1024.0);
+  vtkFloatingPointType
+  GetAvailableMemory(vtkFloatingPointType theSize = 16*1024*1024.0,
+                    vtkFloatingPointType theMinSize = 1024*1024.0);
 
   // Clipping planes
   void 
@@ -156,13 +156,13 @@ public:
   GetClippingPlane(vtkIdType theID) const;
 
   void
-  SetPlaneParam(float theDir[3], 
-               float theDist, 
+  SetPlaneParam(vtkFloatingPointType theDir[3], 
+               vtkFloatingPointType theDist, 
                vtkPlane* thePlane);
 
   void
-  GetPlaneParam(float theDir[3], 
-               float& theDist, 
+  GetPlaneParam(vtkFloatingPointType theDir[3], 
+               vtkFloatingPointType& theDist, 
                vtkPlane* thePlane);
 
   bool 
@@ -177,7 +177,7 @@ public:
   GetNodeVTKID(vtkIdType theID);
 
   virtual
-  float
+  vtkFloatingPointType
   GetNodeCoord(vtkIdType theObjID);
 
   virtual
index f60c2ccab5a269f1547ce8e352d6ad6c9460d487..404baf1e69934dc638e5a0f1a9300f49682ab01e 100644 (file)
 
 #include "VISU_PipeLineUtils.hxx"
 
-void VISU::Mul(const float A[3], float b, float C[3]){ // A*b;
+void
+VISU::Mul(const vtkFloatingPointType A[3], 
+         vtkFloatingPointType b, 
+         vtkFloatingPointType C[3])
+{ // A*b;
   for(int i = 0; i < 3; i++)  C[i] = A[i]*b;
 }
 
-void VISU::Sub(const float A[3], const float B[3], float C[3]){ //A-B
+void
+VISU::Sub(const vtkFloatingPointType A[3], 
+         const vtkFloatingPointType B[3], 
+         vtkFloatingPointType C[3])
+{ //A-B
   for(int i = 0; i < 3; i++)  C[i] = A[i] - B[i];
 }
 
index 7b2523506501a1ffc50665c16906e6843b7ba61f..af67ea96902aa3721b1fb047bde60d8ed2d23068 100644 (file)
 
 #endif
 
-namespace VISU{
-  void Mul(const float A[3], float b, float C[3]); // C = A * b
-  void Sub(const float A[3], const float B[3], float C[3]); // C = A - B
+namespace VISU
+{
+  void
+  Mul(const vtkFloatingPointType A[3], 
+      vtkFloatingPointType b, 
+      vtkFloatingPointType C[3]); // C = A * b
+  
+  void
+  Sub(const vtkFloatingPointType A[3], 
+      const vtkFloatingPointType B[3], 
+      vtkFloatingPointType C[3]); // C = A - B
 
   template<class TItem> 
   void
index 93efa07bc2e136994da5fe3bb6c2853630d27fb7..dff6b274b00a8741c61dd41b4debc484fd4ec1fe 100644 (file)
 #include <vtkRenderWindow.h>
 
 static
-  bool IsValidPlane2Position(vtkPlane *pPx,
-                            vtkDataSet *pDataSet,
-                            float aTol=0.003);
+bool 
+IsValidPlane2Position(vtkPlane *pPx,
+                     vtkDataSet *pDataSet,
+                     vtkFloatingPointType aTol=0.003);
 static 
-  void GetBndPoints(vtkDataSet *pDataSet, 
-                   float aPnts[24]);
+void 
+GetBndPoints(vtkDataSet *pDataSet, 
+            vtkFloatingPointType aPnts[24]);
 static 
-  float DistanceToPlane(const float x[3], 
-                       const float n[3], 
-                       const float p0[3]);
+vtkFloatingPointType
+DistanceToPlane(const vtkFloatingPointType x[3], 
+               const vtkFloatingPointType n[3], 
+               const vtkFloatingPointType p0[3]);
 
 vtkCxxRevisionMacro(VISU_PlanesWidget, "$Revision$");
 vtkStandardNewMacro(VISU_PlanesWidget);
@@ -207,7 +210,7 @@ VISU_PlanesWidget::VISU_PlanesWidget()
   this->Transform = vtkTransform::New();
 
   // Define the point coordinates
-  float bounds[6];
+  vtkFloatingPointType bounds[6];
   bounds[0] = -0.5;
   bounds[1] = 0.5;
   bounds[2] = -0.5;
@@ -311,14 +314,16 @@ vtkImplicitFunction* VISU_PlanesWidget::ImplicitFunction()
 // function: SetDistance
 // purpose :
 //==================================================================
-void VISU_PlanesWidget::SetDistance(const float theDistance)
+void 
+VISU_PlanesWidget
+::SetDistance(const vtkFloatingPointType theDistance)
 {
   if( theDistance <= 0.0 || theDistance == myDistance )
     return;
 
   myDistance=theDistance;
   //
-  float *origin, *normal, oNew[3], aN2[3]; 
+  vtkFloatingPointType *origin, *normal, oNew[3], aN2[3]; 
   origin = myPlane1->GetOrigin();
   normal = myPlane1->GetNormal();
   vtkMath::Normalize(normal);
@@ -335,7 +340,9 @@ void VISU_PlanesWidget::SetDistance(const float theDistance)
 // function: Distance
 // purpose :
 //==================================================================
-float VISU_PlanesWidget::Distance()const
+vtkFloatingPointType
+VISU_PlanesWidget
+::Distance() const
 {
   return myDistance;
 }
@@ -853,13 +860,13 @@ void VISU_PlanesWidget::Push(double *p1, double *p2)
 {
   //Get the motion vector
   int i;
-  float v[3];
+  vtkFloatingPointType v[3];
   //
   for (i=0; i<3; ++i){  
     v[i] = p2[i] - p1[i];
   }
   //
-  float aOr1[3], aNr1[3], aNr2[3], aD, z1;
+  vtkFloatingPointType aOr1[3], aNr1[3], aNr2[3], aD, z1;
   //
   myPlane1->GetOrigin(aOr1);
   myPlane1->GetNormal(aNr1);
@@ -893,9 +900,9 @@ void VISU_PlanesWidget::TranslateOrigin(double *p1, double *p2)
   }
   //
   //Add to the current point, project back down onto plane
-  float *o = myPlane1->GetOrigin();
-  float *n = myPlane1->GetNormal();
-  float newOrigin[3];
+  vtkFloatingPointType *o = myPlane1->GetOrigin();
+  vtkFloatingPointType *n = myPlane1->GetNormal();
+  vtkFloatingPointType newOrigin[3];
   //
   for (i=0; i<3; ++i){
     newOrigin[i]=o[i] + v[i];
@@ -908,9 +915,9 @@ void VISU_PlanesWidget::TranslateOrigin(double *p1, double *p2)
 // function: SetOriginInternal
 // purpose : Set the origin of the plane.(for Internal calls)
 //==================================================================
-void VISU_PlanesWidget::SetOriginInternal(float x[3]) 
+void VISU_PlanesWidget::SetOriginInternal(vtkFloatingPointType x[3]) 
 {
-  float *bounds = this->myOutline->GetOutput()->GetBounds();
+  vtkFloatingPointType *bounds = this->myOutline->GetOutput()->GetBounds();
   int i, j;
   for (i=0; i<3; ++i)    {
     j=2*i;
@@ -923,7 +930,7 @@ void VISU_PlanesWidget::SetOriginInternal(float x[3])
   }
   //
   bool bFlag;
-  float aOr2[3], aNr2[3], aNr1[3];
+  vtkFloatingPointType aOr2[3], aNr2[3], aNr1[3];
   vtkPlane *pPx;
   //
   myPlane1->GetNormal(aNr1);
@@ -959,8 +966,8 @@ void VISU_PlanesWidget::Rotate(int X, int Y,
     v[i] = p2[i] - p1[i];
   }
   //
-  float *origin = myPlane1->GetOrigin();
-  float *normal = myPlane1->GetNormal();
+  vtkFloatingPointType *origin = myPlane1->GetOrigin();
+  vtkFloatingPointType *normal = myPlane1->GetNormal();
 
   // Create axis of rotation and angle of rotation
   vtkMath::Cross(vpn,v,axis);
@@ -982,7 +989,7 @@ void VISU_PlanesWidget::Rotate(int X, int Y,
   this->Transform->Translate(-origin[0],-origin[1],-origin[2]);
 
   //Set the new normal
-  float nNew[3], aN2[3], oNew[3];
+  vtkFloatingPointType nNew[3], aN2[3], oNew[3];
   this->Transform->TransformNormal(normal,nNew);
   //
   for (i=0; i<3; ++i){  
@@ -1013,7 +1020,7 @@ void VISU_PlanesWidget::Rotate(int X, int Y,
 void VISU_PlanesWidget::PushDistance(double *p1, double *p2)
 {
   int i;
-  float v[3],  *anOrigin1, *aN1, *anOrigin2, *aN2, aD;
+  vtkFloatingPointType v[3],  *anOrigin1, *aN1, *anOrigin2, *aN2, aD;
   //Get the motion vector
   for (i=0; i<3; ++i){ 
     v[i] = p2[i] - p1[i];
@@ -1026,17 +1033,17 @@ void VISU_PlanesWidget::PushDistance(double *p1, double *p2)
 
   vtkMath::Normalize(aN1);
 
-  float origin[3];
+  vtkFloatingPointType origin[3];
   double distance = vtkMath::Dot( v, aN2 );
   for(i=0; i<3; ++i) {
     origin[i] = anOrigin2[i] + distance * aN2[i];
   }
-  float d = DistanceToPlane(origin, aN1, anOrigin1);
+  vtkFloatingPointType d = DistanceToPlane(origin, aN1, anOrigin1);
   if( d <= 0.0 )
     return;
   //
   bool bFlag;
-  float aOr2[3], aNr2[3];
+  vtkFloatingPointType aOr2[3], aNr2[3];
   vtkPlane *pPx;
   //
   myPlane2->GetOrigin(aOr2);
@@ -1073,8 +1080,8 @@ void VISU_PlanesWidget::TranslatePlane(double *p1, double *p2)
   v[2] = p2[2] - p1[2];
   
   //Translate the plane
-  float oNew[3];
-  float *origin = myPlane1->GetOrigin();
+  vtkFloatingPointType oNew[3];
+  vtkFloatingPointType *origin = myPlane1->GetOrigin();
   oNew[0] = origin[0] + v[0];
   oNew[1] = origin[1] + v[1];
   oNew[2] = origin[2] + v[2];
@@ -1101,8 +1108,8 @@ void VISU_PlanesWidget::TranslateOutline(double *p1, double *p2)
   v[2] = p2[2] - p1[2];
   
   //Translate the bounding box
-  float *origin = myBox->GetOrigin();
-  float oNew[3];
+  vtkFloatingPointType *origin = myBox->GetOrigin();
+  vtkFloatingPointType oNew[3];
   oNew[0] = origin[0] + v[0];
   oNew[1] = origin[1] + v[1];
   oNew[2] = origin[2] + v[2];
@@ -1138,10 +1145,10 @@ void VISU_PlanesWidget::Scale(double *p1, double *p2,
   v[2] = p2[2] - p1[2];
 
   //int res = this->PlaneSource->GetXResolution();
-  float *o = myPlane1->GetOrigin();
+  vtkFloatingPointType *o = myPlane1->GetOrigin();
 
   // Compute the scale factor
-  float sf = vtkMath::Norm(v) / this->myOutline->GetOutput()->GetLength();
+  vtkFloatingPointType sf = vtkMath::Norm(v) / this->myOutline->GetOutput()->GetLength();
   if ( Y > this->Interactor->GetLastEventPosition()[1] )    {
     sf = 1.0 + sf;
   }
@@ -1154,9 +1161,9 @@ void VISU_PlanesWidget::Scale(double *p1, double *p2,
   this->Transform->Scale(sf,sf,sf);
   this->Transform->Translate(-o[0],-o[1],-o[2]);
 
-  float *origin = myBox->GetOrigin();
-  float *spacing = myBox->GetSpacing();
-  float oNew[3], p[3], pNew[3];
+  vtkFloatingPointType *origin = myBox->GetOrigin();
+  vtkFloatingPointType *spacing = myBox->GetSpacing();
+  vtkFloatingPointType oNew[3], p[3], pNew[3];
   p[0] = origin[0] + spacing[0];
   p[1] = origin[1] + spacing[1];
   p[2] = origin[2] + spacing[2];
@@ -1215,9 +1222,9 @@ void VISU_PlanesWidget::CreateDefaultProperties()
 // function: InitialPlaceWidget
 // purpose :
 //==================================================================
-void VISU_PlanesWidget::InitialPlaceWidget(float bds[6])
+void VISU_PlanesWidget::InitialPlaceWidget(vtkFloatingPointType bds[6])
 {
-  float bounds[6], origin[3];
+  vtkFloatingPointType bounds[6], origin[3];
 
   PlaceWidget(bds);
   //
@@ -1226,7 +1233,7 @@ void VISU_PlanesWidget::InitialPlaceWidget(float bds[6])
                  (bounds[3]+bounds[2])/2.0,
                  (bounds[5]+bounds[4])/2.0);
 
-  static float DIST_COEFF = 0.1;
+  static vtkFloatingPointType DIST_COEFF = 0.1;
   SetDistance(this->InitialLength*DIST_COEFF);
   //
   this->UpdateRepresentation();
@@ -1235,10 +1242,10 @@ void VISU_PlanesWidget::InitialPlaceWidget(float bds[6])
 // function: PlaceWidget
 // purpose :
 //==================================================================
-void VISU_PlanesWidget::PlaceWidget(float bds[6])
+void VISU_PlanesWidget::PlaceWidget(vtkFloatingPointType bds[6])
 {
   int i;
-  float bounds[6], origin[3];
+  vtkFloatingPointType bounds[6], origin[3];
 
   this->AdjustBounds(bds, bounds, origin);
 
@@ -1281,9 +1288,9 @@ void VISU_PlanesWidget::PlaceWidget(float bds[6])
 // function: SetOrigin
 // purpose :Set the origin of the plane.(for external calls)
 //==================================================================
-void VISU_PlanesWidget::SetOrigin(float x, float y, float z) 
+void VISU_PlanesWidget::SetOrigin(vtkFloatingPointType x, vtkFloatingPointType y, vtkFloatingPointType z) 
 {
-  float origin[3];
+  vtkFloatingPointType origin[3];
   origin[0] = x;
   origin[1] = y;
   origin[2] = z;
@@ -1293,9 +1300,9 @@ void VISU_PlanesWidget::SetOrigin(float x, float y, float z)
 // function: SetOrigin 
 // purpose : Set the origin of the plane.(for external calls)
 //==================================================================
-void VISU_PlanesWidget::SetOrigin(float x[3])
+void VISU_PlanesWidget::SetOrigin(vtkFloatingPointType x[3])
 {
-  float *bounds = this->myOutline->GetOutput()->GetBounds();
+  vtkFloatingPointType *bounds = this->myOutline->GetOutput()->GetBounds();
   for (int i=0; i<3; i++)    {
     if ( x[i] < bounds[2*i] )      {
       x[i] = bounds[2*i];
@@ -1305,7 +1312,7 @@ void VISU_PlanesWidget::SetOrigin(float x[3])
     }
   }
   myPlane1->SetOrigin(x);
-  float *origin, *normal, oNew[3];
+  vtkFloatingPointType *origin, *normal, oNew[3];
   origin = myPlane1->GetOrigin();
   normal = myPlane1->GetNormal();
   vtkMath::Normalize(normal);
@@ -1319,12 +1326,12 @@ void VISU_PlanesWidget::SetOrigin(float x[3])
 // function: GetOrigin
 // purpose :Get the origin of the plane.
 //==================================================================
-float* VISU_PlanesWidget::GetOrigin() 
+vtkFloatingPointType* VISU_PlanesWidget::GetOrigin() 
 {
   return myPlane1->GetOrigin();
 }
 
-void VISU_PlanesWidget::GetOrigin(float xyz[3]) 
+void VISU_PlanesWidget::GetOrigin(vtkFloatingPointType xyz[3]) 
 {
   myPlane1->GetOrigin(xyz);
 }
@@ -1332,9 +1339,9 @@ void VISU_PlanesWidget::GetOrigin(float xyz[3])
 // function: SetNormal
 // purpose :Set the normal to the plane.
 //==================================================================
-void VISU_PlanesWidget::SetNormal(float x, float y, float z) 
+void VISU_PlanesWidget::SetNormal(vtkFloatingPointType x, vtkFloatingPointType y, vtkFloatingPointType z) 
 {
-  float n[3];
+  vtkFloatingPointType n[3];
   n[0] = x;
   n[1] = y;
   n[2] = z;
@@ -1352,7 +1359,7 @@ void VISU_PlanesWidget::SetNormal(float x, float y, float z)
 // function: SetNormal
 // purpose :Set the normal to the plane.
 //==================================================================
-void VISU_PlanesWidget::SetNormal(float n[3]) 
+void VISU_PlanesWidget::SetNormal(vtkFloatingPointType n[3]) 
 {
   this->SetNormal(n[0], n[1], n[2]);
 }
@@ -1360,7 +1367,7 @@ void VISU_PlanesWidget::SetNormal(float n[3])
 // function: GetNormal
 // purpose :Get the normal to the plane.
 //==================================================================
-float* VISU_PlanesWidget::GetNormal() 
+vtkFloatingPointType* VISU_PlanesWidget::GetNormal() 
 {
   return myPlane1->GetNormal();
 }
@@ -1368,7 +1375,7 @@ float* VISU_PlanesWidget::GetNormal()
 // function: GetNormal
 // purpose :Get the normal to the plane.
 //==================================================================
-void VISU_PlanesWidget::GetNormal(float xyz[3]) 
+void VISU_PlanesWidget::GetNormal(vtkFloatingPointType xyz[3]) 
 {
   myPlane1->GetNormal(xyz);
 }
@@ -1492,12 +1499,12 @@ void VISU_PlanesWidget::UpdateRepresentation()
     return;
   }
 
-  float *origin = myPlane1->GetOrigin();
-  float *normal = myPlane1->GetNormal();
-  float p2[3];
+  vtkFloatingPointType *origin = myPlane1->GetOrigin();
+  vtkFloatingPointType *normal = myPlane1->GetNormal();
+  vtkFloatingPointType p2[3];
 
   // Setup the plane normal
-  float d = this->myOutline->GetOutput()->GetLength();
+  vtkFloatingPointType d = this->myOutline->GetOutput()->GetLength();
 
   p2[0] = origin[0] + 0.30 * d * normal[0];
   p2[1] = origin[1] + 0.30 * d * normal[1];
@@ -1540,12 +1547,12 @@ void VISU_PlanesWidget::PrintSelf(ostream& os, vtkIndent indent)
 //==================================================================
 bool IsValidPlane2Position(vtkPlane *pPx,
                            vtkDataSet *pDataSet,
-                           float aTol)
+                           vtkFloatingPointType aTol)
 {
   bool bRet;
   int i, iFound;
-  float aD, aDmax, aPnts[24], aDiagonal;
-  float aTol1, aOr[3], aN[3];
+  vtkFloatingPointType aD, aDmax, aPnts[24], aDiagonal;
+  vtkFloatingPointType aTol1, aOr[3], aN[3];
   //
   bRet=false;
   aDiagonal=pDataSet->GetLength();
@@ -1575,15 +1582,16 @@ bool IsValidPlane2Position(vtkPlane *pPx,
 // function: GetBndPoints
 // purpose :
 //==================================================================
-void GetBndPoints(vtkDataSet *pDataSet, 
-                  float aPnts[24])
+void 
+GetBndPoints(vtkDataSet *pDataSet, 
+            vtkFloatingPointType aPnts[24])
 {
-  int aIndx[24]={
+  int aIndx[24] = {
     0,2,4,1,2,4,1,3,4,0,3,4,
     0,2,5,1,2,5,1,3,5,0,3,5
   };
   int i;
-  float *pBounds=pDataSet->GetBounds();
+  vtkFloatingPointType *pBounds=pDataSet->GetBounds();
   //
   for (i=0; i<24; ++i){
     aPnts[i]=pBounds[aIndx[i]];
@@ -1593,13 +1601,14 @@ void GetBndPoints(vtkDataSet *pDataSet,
 // function: DistanceToPlane
 // purpose :
 //==================================================================
-float DistanceToPlane(const float x[3], 
-                     const float n[3], 
-                     const float p0[3])
+vtkFloatingPointType 
+DistanceToPlane(const vtkFloatingPointType x[3], 
+               const vtkFloatingPointType n[3], 
+               const vtkFloatingPointType p0[3])
 {
-  return ((float) (n[0]*(x[0]-p0[0]) + 
-                  n[1]*(x[1]-p0[1]) +  
-                  n[2]*(x[2]-p0[2])));
+  return ((n[0]*(x[0]-p0[0]) + 
+          n[1]*(x[1]-p0[1]) +  
+          n[2]*(x[2]-p0[2])));
 }
 /*
 //==================================================================
@@ -1608,7 +1617,7 @@ float DistanceToPlane(const float x[3],
 //==================================================================
 void VISU_PlanesWidget::SizeHandles()
 {
-  //  float radius = 
+  //  vtkFloatingPointType radius = 
   this->vtk3DWidget::SizeHandles(1.35);
 }
 */
index fdf45367f80800451ff67fc7b315ae388239d5db..2b4370d01c4b31270d43d61e0563fd365e2d52d6 100644 (file)
@@ -59,31 +59,59 @@ public:
   vtkTypeRevisionMacro(VISU_PlanesWidget,VISU_ImplicitFunctionWidget);
   void PrintSelf(ostream& os, vtkIndent indent);
 
-  void SetDistance (const float theDistance);
-  float Distance()const;
+  void 
+  SetDistance(const vtkFloatingPointType theDistance);
 
-  vtkGetMacro(InitialLength,float);
+  vtkFloatingPointType
+  Distance() const;
 
-  virtual vtkImplicitFunction* ImplicitFunction();
+  vtkGetMacro(InitialLength,vtkFloatingPointType);
+
+  virtual 
+  vtkImplicitFunction* 
+  ImplicitFunction();
 
   // Description:
   // Methods that satisfy the superclass' API.
-  virtual void SetEnabled(int);
-  virtual void PlaceWidget(float bounds[6]);
+  virtual
+  void
+  SetEnabled(int);
+
+  virtual
+  void
+  PlaceWidget(vtkFloatingPointType bounds[6]);
 
   // Description:
   // Get the origin of the plane.
-  void SetOrigin(float x, float y, float z);
-  void SetOrigin(float x[3]);
-  float* GetOrigin();
-  void GetOrigin(float xyz[3]);
+  void
+  SetOrigin(vtkFloatingPointType x, 
+           vtkFloatingPointType y, 
+           vtkFloatingPointType z);
+
+  void
+  SetOrigin(vtkFloatingPointType x[3]);
+
+  vtkFloatingPointType* 
+  GetOrigin();
+
+  void
+  GetOrigin(vtkFloatingPointType xyz[3]);
 
   // Description:
   // Get the normal to the plane.
-  void SetNormal(float x, float y, float z);
-  void SetNormal(float x[3]);
-  float* GetNormal();
-  void GetNormal(float xyz[3]);
+  void 
+  SetNormal(vtkFloatingPointType x, 
+           vtkFloatingPointType y, 
+           vtkFloatingPointType z);
+
+  void 
+  SetNormal(vtkFloatingPointType x[3]);
+
+  vtkFloatingPointType* 
+  GetNormal();
+
+  void
+  GetNormal(vtkFloatingPointType xyz[3]);
   
   // Description:
   // Force the plane widget to be aligned with one of the x-y-z axes.
@@ -91,13 +119,20 @@ public:
   // Remember that when the state changes, a ModifiedEvent is invoked.
   // This can be used to snap the plane to the axes if it is orginally
   // not aligned.
-  void SetNormalToXAxis(int);
+  void
+  SetNormalToXAxis(int);
+
   vtkGetMacro(NormalToXAxis,int);
   vtkBooleanMacro(NormalToXAxis,int);
-  void SetNormalToYAxis(int);
+
+  void
+  SetNormalToYAxis(int);
+
   vtkGetMacro(NormalToYAxis,int);
   vtkBooleanMacro(NormalToYAxis,int);
-  void SetNormalToZAxis(int);
+
+  void
+  SetNormalToZAxis(int);
   vtkGetMacro(NormalToZAxis,int);
   vtkBooleanMacro(NormalToZAxis,int);
 
@@ -113,8 +148,12 @@ public:
   // interferes with the object that it is operating on (i.e., the
   // plane interferes with the cut surface it produces producing
   // z-buffer artifacts.)
-  void SetDrawPlane(int plane);
-  int GetDrawPlane(){
+  void
+  SetDrawPlane(int plane);
+
+  int
+  GetDrawPlane()
+  {
     return myDrawPlane;
   }
 
@@ -128,7 +167,8 @@ public:
   // Description:
   // Grab the polydata that defines the plane. The polydata contains a single
   // polygon that is clipped by the bounding box.
-  void GetPolyData(vtkPolyData *pd);
+  void
+  GetPolyData(vtkPolyData *pd);
 
   // Description:
   // Satisfies superclass API.  This returns a pointer to the underlying
@@ -140,12 +180,14 @@ public:
   // instance of the class vtkPlane. Note that vtkPlane is a subclass of
   // vtkImplicitFunction, meaning that it can be used by a variety of filters
   // to perform clipping, cutting, and selection of data.
-  void GetPlane(vtkPlane *plane);
+  void
+  GetPlane(vtkPlane *plane);
 
   // Description:
   // Satisfies the superclass API.  This will change the state of the widget
   // to match changes that have been made to the underlying PolyDataSource
-  void UpdatePlacement(void);
+  void
+  UpdatePlacement(void);
 
   // Description:
   // Get the properties on the normal (line and cone).
@@ -168,7 +210,8 @@ public:
   // applies to the edges when tubed.)
   vtkGetObjectMacro(EdgesProperty,vtkProperty);
 
-  void InitialPlaceWidget(float bds[6]);
+  void
+  InitialPlaceWidget(vtkFloatingPointType bds[6]);
 
 protected:
   VISU_PlanesWidget();
@@ -191,8 +234,10 @@ protected:
 //ETX
     
   //handles the events
-  static void ProcessEvents(vtkObject* object, unsigned long event,
-                            void* clientdata, void* calldata);
+  static
+  void
+  ProcessEvents(vtkObject* object, unsigned long event,
+               void* clientdata, void* calldata);
 
   // ProcessEvents() dispatches to these methods.
   void OnLeftButtonDown();
@@ -204,7 +249,7 @@ protected:
   void OnMouseMove();
   //
   // Methods to manipulate the plane
-  void ConstrainOrigin(float x[3]);
+  void ConstrainOrigin(vtkFloatingPointType x[3]);
   void Rotate(int X, int Y, double *p1, double *p2, double *vpn);
   void TranslatePlane(double *p1, double *p2);
   void TranslateOutline(double *p1, double *p2);
@@ -221,7 +266,7 @@ protected:
   void HighlightNormal(int highlight);
   void HighlightOutline(int highlight);
   void UpdateRepresentation();
-  void SetOriginInternal(float x[3]);
+  void SetOriginInternal(vtkFloatingPointType x[3]);
 
   // Controlling ivars
   int NormalToXAxis;
@@ -238,7 +283,7 @@ protected:
   vtkPlane *myPlane1;
   vtkPlane *myPlane2;
   
-  float myDistance; 
+  vtkFloatingPointType myDistance; 
   vtkImplicitBoolean *myImplicitFunction;
 
   // The bounding box is represented by a single voxel image data
index 164d9a7ac6fb06377105d9c7d98417f243364dd4..928accc0a723092bbf3fbb665b4402e74543010c 100644 (file)
@@ -86,9 +86,9 @@ GetOrientation(vtkDataSet* theDataSet)
 {
   theDataSet->Update();
 
-  float aBounds[6];
+  vtkFloatingPointType aBounds[6];
   theDataSet->GetBounds(aBounds);
-  float aDelta[3] = {aBounds[1] - aBounds[0], aBounds[3] - aBounds[2], aBounds[5] - aBounds[4]};
+  vtkFloatingPointType aDelta[3] = {aBounds[1] - aBounds[0], aBounds[3] - aBounds[2], aBounds[5] - aBounds[4]};
 
   if(aDelta[0] >= aDelta[1] && aDelta[0] >= aDelta[2])
     if(aDelta[1] >= aDelta[2])
@@ -111,18 +111,18 @@ GetOrientation(vtkDataSet* theDataSet)
   return VISU_CutPlanesPL::XY;
 }
 
-float
+vtkFloatingPointType
 VISU_Plot3DPL::
 GetScaleFactor(vtkDataSet* theDataSet)
 {
   theDataSet->Update();
-  float aLength = theDataSet->GetLength(); // diagonal length
+  vtkFloatingPointType aLength = theDataSet->GetLength(); // diagonal length
 
-  float aScalarRange[2];
+  vtkFloatingPointType aScalarRange[2];
   GetSourceRange(aScalarRange);
 
-  static float EPS = 0.3;
-  float aRange = aScalarRange[1];
+  static vtkFloatingPointType EPS = 0.3;
+  vtkFloatingPointType aRange = aScalarRange[1];
   if(aRange > 0.0)
     return aLength / aRange * EPS;
 
@@ -150,8 +150,8 @@ void
 VISU_Plot3DPL::
 Update()
 {
-  float aPlaneNormal[3];
-  float anOrigin[3];
+  vtkFloatingPointType aPlaneNormal[3];
+  vtkFloatingPointType anOrigin[3];
   GetBasePlane( anOrigin, aPlaneNormal );
 
   vtkPolyData* aPolyData = 0;
@@ -198,7 +198,7 @@ Update()
     }else
       myContourFilter->SetInput(aPolyData);
 
-    float aScalarRange[2];
+    vtkFloatingPointType aScalarRange[2];
     GetSourceRange(aScalarRange);
 
     myContourFilter->GenerateValues(GetNumberOfContours(),aScalarRange);
@@ -232,13 +232,13 @@ GetNumberOfContours() const
 
 void
 VISU_Plot3DPL::
-SetScaleFactor(float theScaleFactor)
+SetScaleFactor(vtkFloatingPointType theScaleFactor)
 {
   myScaleFactor = theScaleFactor;
   myWarpScalar->SetScaleFactor(theScaleFactor);
 }
 
-float
+vtkFloatingPointType
 VISU_Plot3DPL::
 GetScaleFactor() const
 {
@@ -247,7 +247,7 @@ GetScaleFactor() const
 
 void
 VISU_Plot3DPL::
-SetPlanePosition(float thePosition,
+SetPlanePosition(vtkFloatingPointType thePosition,
                 bool theIsRelative)
 {
   myIsRelative = theIsRelative;
@@ -269,7 +269,7 @@ GetPlaneOrientation() const
 }
 
 
-float
+vtkFloatingPointType
 VISU_Plot3DPL::
 GetRotateX()
 {
@@ -281,7 +281,7 @@ GetRotateX()
   return 0;
 }
 
-float
+vtkFloatingPointType
 VISU_Plot3DPL::
 GetRotateY(){
   switch(myOrientation){
@@ -295,8 +295,8 @@ GetRotateY(){
 void
 VISU_Plot3DPL::
 SetOrientation(VISU_CutPlanesPL::PlaneOrientation theOrientation,
-              float theXAngle,
-              float theYAngle)
+              vtkFloatingPointType theXAngle,
+              vtkFloatingPointType theYAngle)
 {
   switch(theOrientation){
   case VISU_CutPlanesPL::XY: myAngle[0] = theXAngle; break;
@@ -311,7 +311,7 @@ SetOrientation(VISU_CutPlanesPL::PlaneOrientation theOrientation,
   myOrientation = theOrientation;
 }
 
-float
+vtkFloatingPointType
 VISU_Plot3DPL::
 GetPlanePosition() const
 {
@@ -323,14 +323,14 @@ GetPlanePosition() const
 //purpose  :
 //=======================================================================
 
-void VISU_Plot3DPL::GetBasePlane(float theOrigin[3],
-                                 float theNormal[3],
+void VISU_Plot3DPL::GetBasePlane(vtkFloatingPointType theOrigin[3],
+                                 vtkFloatingPointType theNormal[3],
                                  bool  theCenterOrigine ) const
 {
   VISU_CutPlanesPL::GetDir(theNormal,myAngle,myOrientation);
 
-  float aPosition = myPosition;
-  float aBounds[6], aBoundPrj[3];
+  vtkFloatingPointType aPosition = myPosition;
+  vtkFloatingPointType aBounds[6], aBoundPrj[3];
   if ( myIsRelative )
   {
     GetInput()->GetBounds(aBounds);
@@ -342,7 +342,7 @@ void VISU_Plot3DPL::GetBasePlane(float theOrigin[3],
   if ( theCenterOrigine ) {
     // move theOrigin to the center of aBounds projections to the plane
     GetInput2()->GetBounds(aBounds);
-    float boundPoints[8][3] = {
+    vtkFloatingPointType boundPoints[8][3] = {
       {aBounds[0],aBounds[2],aBounds[4]},
       {aBounds[1],aBounds[2],aBounds[4]},
       {aBounds[0],aBounds[3],aBounds[4]},
@@ -351,9 +351,9 @@ void VISU_Plot3DPL::GetBasePlane(float theOrigin[3],
       {aBounds[1],aBounds[2],aBounds[5]},
       {aBounds[0],aBounds[3],aBounds[5]},
       {aBounds[1],aBounds[3],aBounds[5]}};
-    float newOrigin[3] = { 0,0,0 };
+    vtkFloatingPointType newOrigin[3] = { 0,0,0 };
     for(int i = 0; i < 8; i++) {
-      float proj[3];
+      vtkFloatingPointType proj[3];
       vtkPlane::ProjectPoint( boundPoints[i], theOrigin, theNormal, proj );
       newOrigin[0] += proj[0];
       newOrigin[1] += proj[1];
@@ -370,9 +370,10 @@ void VISU_Plot3DPL::GetBasePlane(float theOrigin[3],
 //purpose  : return absolute position range
 //=======================================================================
 
-void VISU_Plot3DPL::GetMinMaxPosition( float& minPos, float& maxPos ) const
+void VISU_Plot3DPL::GetMinMaxPosition( vtkFloatingPointType& minPos, 
+                                      vtkFloatingPointType& maxPos ) const
 {
-  float aBounds[6], aBoundPrj[3], aNormal[3];
+  vtkFloatingPointType aBounds[6], aBoundPrj[3], aNormal[3];
   VISU_CutPlanesPL::GetDir(aNormal,myAngle,myOrientation);
   GetInput()->GetBounds(aBounds);
   VISU_CutPlanesPL::GetBoundProject(aBoundPrj,aBounds,aNormal);
@@ -385,14 +386,14 @@ void VISU_Plot3DPL::GetMinMaxPosition( float& minPos, float& maxPos ) const
 //purpose  :
 //=======================================================================
 
-void VISU_Plot3DPL::SetMapScale(float theMapScale)
+void VISU_Plot3DPL::SetMapScale(vtkFloatingPointType theMapScale)
 {
   VISU_ScalarMapPL::SetMapScale(theMapScale);
 
   if ( myIsContour ) {
-    float aRange[2];
+    vtkFloatingPointType aRange[2];
     GetSourceRange(aRange);
-    float aNewRange[] = { aRange[1] - theMapScale*(aRange[1]-aRange[0]), aRange[1] };
+    vtkFloatingPointType aNewRange[] = { aRange[1] - theMapScale*(aRange[1]-aRange[0]), aRange[1] };
     myContourFilter->GenerateValues(GetNumberOfContours(),aNewRange);
   }
   myWarpScalar->SetScaleFactor(myScaleFactor*theMapScale);
index 9df47b2d6734717b569599385e77bf6c8c214a83..4b60e226fc4e41e9db34f983c354c667dd5e2d7e 100644 (file)
@@ -52,31 +52,31 @@ public:
   VISU_CutPlanesPL::PlaneOrientation
   GetPlaneOrientation() const;
 
-  float
+  vtkFloatingPointType
   GetRotateX();
 
-  float
+  vtkFloatingPointType
   GetRotateY();
 
   void
   SetOrientation(VISU_CutPlanesPL::PlaneOrientation theOrientation,
-                float theXAngle = 0.0,
-                float theYAngle = 0.0);
+                vtkFloatingPointType theXAngle = 0.0,
+                vtkFloatingPointType theYAngle = 0.0);
 
-  float
+  vtkFloatingPointType
   GetPlanePosition() const;
 
   bool
   IsPositionRelative() const;
 
   void
-  SetPlanePosition(float thePosition,
+  SetPlanePosition(vtkFloatingPointType thePosition,
                   bool theIsRelative);
 
   void
-  SetScaleFactor(float theScaleFactor);
+  SetScaleFactor(vtkFloatingPointType theScaleFactor);
 
-  float
+  vtkFloatingPointType
   GetScaleFactor() const;
 
   void
@@ -91,11 +91,12 @@ public:
   int
   GetNumberOfContours() const;
 
-  void GetBasePlane (float theOrigin[3],
-                     float theNormal[3],
+  void GetBasePlane (vtkFloatingPointType theOrigin[3],
+                     vtkFloatingPointType theNormal[3],
                      bool  theCenterOrigine = false ) const;
 
-  void GetMinMaxPosition( float& minPos, float& maxPos ) const;
+  void GetMinMaxPosition( vtkFloatingPointType& minPos, 
+                         vtkFloatingPointType& maxPos ) const;
 
 public:
   virtual void Init();
@@ -105,17 +106,17 @@ public:
   VISU_CutPlanesPL::PlaneOrientation
   GetOrientation(vtkDataSet* theDataSet);
 
-  float
+  vtkFloatingPointType
   GetScaleFactor(vtkDataSet* theDataSet);
 
-  void SetMapScale(float theMapScale);
+  void SetMapScale(vtkFloatingPointType theMapScale);
 
 protected:
   virtual THook* DoHook();
 
-  float myAngle[3];
+  vtkFloatingPointType myAngle[3];
   bool myIsRelative, myIsContour;
-  float myPosition, myScaleFactor;
+  vtkFloatingPointType myPosition, myScaleFactor;
   VISU_CutPlanesPL::PlaneOrientation myOrientation;
 
   TVTKSmartPtr<vtkCellDataToPointData> myCellDataToPointData;
index afa44bd76023fbaa2d36451fc0ac6b71c49e9fbb..b662585373ab84c1f96cd5786a4cf03cc062d752 100644 (file)
@@ -258,7 +258,7 @@ int VISU_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
     
     // we hard code how many steps to display
     int numColors = this->MaximumNumberOfColors;
-    float *range = lut->GetRange();
+    vtkFloatingPointType *range = lut->GetRange();
 
     int numPts = 2*(numColors + 1);
     vtkPoints *pts = vtkPoints::New();
@@ -315,13 +315,13 @@ int VISU_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
     this->NumberOfLabelsBuilt = this->NumberOfLabels;
     
     // generate points
-    float x[3]; x[2] = 0.0;
-    float delta, val;
+    vtkFloatingPointType x[3]; x[2] = 0.0;
+    vtkFloatingPointType delta, val;
     if ( this->Orientation == VTK_ORIENT_VERTICAL )
       {
       barWidth = size[0] - 4 - labelSize[0];
       barHeight = (int)(0.86*size[1]);
-      delta=(float)barHeight/numColors;
+      delta=(vtkFloatingPointType)barHeight/numColors;
       for (i=0; i<numPts/2; i++)
         {
         x[0] = 0;
@@ -335,7 +335,7 @@ int VISU_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
       {
       barWidth = size[0];
       barHeight = (int)(0.4*size[1]);
-      delta=(float)barWidth/numColors;
+      delta=(vtkFloatingPointType)barWidth/numColors;
       for (i=0; i<numPts/2; i++)
         {
         x[0] = i*delta;
@@ -358,12 +358,12 @@ int VISU_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
       polys->InsertNextCell(4,ptIds);
 
       if ( isLogTable ){ //SALOME specific
-        float rgbval = log10(range[0]) + 
+        vtkFloatingPointType rgbval = log10(range[0]) + 
           i*(log10(range[1])-log10(range[0]))/(numColors -1);
         rgba = lut->MapValue(rgbval);
       }else{
         rgba = lut->MapValue(range[0] + (range[1] - range[0])*
-                             ((float)i /(numColors-1.0)));
+                             ((vtkFloatingPointType)i /(numColors-1.0)));
       }
 
       rgb = colors->GetPointer(3*i); //write into array directly
@@ -383,7 +383,7 @@ int VISU_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
       
       for (i=0; i < this->NumberOfLabels; i++)
         {
-        val = (float)i/(this->NumberOfLabels-1) *barHeight;
+        val = (vtkFloatingPointType)i/(this->NumberOfLabels-1) *barHeight;
         this->TextMappers[i]->GetSize(viewport,sizeTextData);
         this->TextMappers[i]->GetTextProperty()->SetJustificationToLeft();
         this->TextActors[i]->SetPosition(barWidth+3,
@@ -397,7 +397,7 @@ int VISU_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
       for (i=0; i < this->NumberOfLabels; i++)
         {
         this->TextMappers[i]->GetTextProperty()->SetJustificationToCentered();
-        val = (float)i/(this->NumberOfLabels-1) * barWidth;
+        val = (vtkFloatingPointType)i/(this->NumberOfLabels-1) * barWidth;
         this->TextActors[i]->SetPosition(val, barHeight + 0.05*size[1]);
         }
       }
@@ -503,7 +503,7 @@ void VISU_ScalarBarActor::ShallowCopy(vtkProp *prop)
 
 void VISU_ScalarBarActor::AllocateAndSizeLabels(int *labelSize, int *size,
                                               vtkViewport *viewport,
-                                              float *range)
+                                              vtkFloatingPointType *range)
 {
   labelSize[0] = labelSize[1] = 0;
 
@@ -512,7 +512,7 @@ void VISU_ScalarBarActor::AllocateAndSizeLabels(int *labelSize, int *size,
 
   char string[512];
 
-  float val;
+  vtkFloatingPointType val;
   int i;
   
   // TODO: this should be optimized, maybe by keeping a list of
@@ -529,11 +529,11 @@ void VISU_ScalarBarActor::AllocateAndSizeLabels(int *labelSize, int *size,
     this->TextMappers[i] = vtkTextMapper::New();
 
     if(isLogTable && 0 < i && i < this->NumberOfLabels - 1){ // SALOME specific
-      float lval = log10(range[0]) + (float)i/(this->NumberOfLabels-1) *
+      vtkFloatingPointType lval = log10(range[0]) + (vtkFloatingPointType)i/(this->NumberOfLabels-1) *
         (log10(range[1])-log10(range[0]));
       val = pow(10,lval);
     }else{
-      val = range[0] + (float)i/(this->NumberOfLabels-1) * (range[1]-range[0]);
+      val = range[0] + (vtkFloatingPointType)i/(this->NumberOfLabels-1) * (range[1]-range[0]);
     }
     sprintf(string, this->LabelFormat, val);
     this->TextMappers[i]->SetInput(string);
index be2f62ce0d1b5fde487c46bbb00e86cfc8532cfd..7db60d5a7ad0c48724bf965453eb0750acc069d1 100644 (file)
@@ -138,7 +138,7 @@ protected:
 
   vtkTextMapper **TextMappers;
   virtual void AllocateAndSizeLabels(int *labelSize, int *size,
-                                     vtkViewport *viewport, float *range);
+                                     vtkViewport *viewport, vtkFloatingPointType *range);
 
 private:
   vtkTextMapper *TitleMapper;
index 561b243289bbba59fe0e05bffbaaede08b486c49..8f24c298e9524514e8053c041b44ad1e4b194b34 100644 (file)
@@ -45,7 +45,7 @@ namespace
   inline
   void
   MarkValueByColor(vtkLookupTable* theTable,
-                  float theValue,
+                  vtkFloatingPointType theValue,
                   unsigned char* theColor)
   { 
     vtkIdType anIndex = theTable->GetIndex(theValue);
@@ -81,12 +81,12 @@ namespace
     unsigned char aRedPtr[3] = {255, 0, 0};
     unsigned char aBluePtr[3] = {0, 0, 255};
 
-    float aRange[2];
+    vtkFloatingPointType aRange[2];
     theTable->GetTableRange(aRange);
     vtkIdType aNbColors = theTable->GetNumberOfColors();
 
-    float aDelta = (aRange[1]-aRange[0])/aNbColors;
-    float aValue = aRange[0]+0.5*aDelta;
+    vtkFloatingPointType aDelta = (aRange[1]-aRange[0])/aNbColors;
+    vtkFloatingPointType aValue = aRange[0]+0.5*aDelta;
     for(int i = 0; i < aNbColors; i++){
       vtkIdType anIndex = theTable->GetIndex(aValue);
       unsigned char* aTablePtr = theTable->GetPointer(anIndex);
@@ -206,15 +206,15 @@ VISU_ScalarBarCtrl
 //----------------------------------------------------------------------------
 void
 VISU_ScalarBarCtrl
-::SetRangeLocal(float *theRange)
+::SetRangeLocal(vtkFloatingPointType *theRange)
 {
   myLocalLookupTable->SetTableRange(theRange);
 }
 
 void
 VISU_ScalarBarCtrl
-::SetRangeLocal(float theMin,
-               float theMax)
+::SetRangeLocal(vtkFloatingPointType theMin,
+               vtkFloatingPointType theMax)
 {
   myLocalLookupTable->SetTableRange(theMin,theMax);
 }
@@ -223,15 +223,15 @@ VISU_ScalarBarCtrl
 //----------------------------------------------------------------------------
 void
 VISU_ScalarBarCtrl
-::SetRangeGlobal(float *theRange)
+::SetRangeGlobal(vtkFloatingPointType *theRange)
 {
   myGlobalLookupTable->SetTableRange(theRange);
 }
 
 void
 VISU_ScalarBarCtrl
-::SetRangeGlobal(float theMin,
-                float theMax)
+::SetRangeGlobal(vtkFloatingPointType theMin,
+                vtkFloatingPointType theMax)
 {
   myGlobalLookupTable->SetTableRange(theMin,theMax);
 }
@@ -298,13 +298,13 @@ VISU_ScalarBarCtrl
 //----------------------------------------------------------------------------
 void
 VISU_ScalarBarCtrl
-::SetWidth(float theWidth)
+::SetWidth(vtkFloatingPointType theWidth)
 {
   myGlobalScalarBar->SetWidth(theWidth);
   myLocalScalarBar->SetWidth(theWidth);
 }
 
-float
+vtkFloatingPointType
 VISU_ScalarBarCtrl
 ::GetWidth() const
 {
@@ -315,14 +315,14 @@ VISU_ScalarBarCtrl
 //----------------------------------------------------------------------------
 void
 VISU_ScalarBarCtrl
-::SetHeight(float theHeight)
+::SetHeight(vtkFloatingPointType theHeight)
 {
   myGlobalScalarBar->SetHeight(theHeight);
   myLocalScalarBar->SetHeight(theHeight);
 }
 
 
-float
+vtkFloatingPointType
 VISU_ScalarBarCtrl
 ::GetHeight() const
 {
@@ -333,13 +333,13 @@ VISU_ScalarBarCtrl
 //----------------------------------------------------------------------------
 void
 VISU_ScalarBarCtrl
-::SetPosition(const float* thePosition)
+::SetPosition(const vtkFloatingPointType* thePosition)
 {
   myPosition[0] = thePosition[0];
   myPosition[1] = thePosition[1];
 }
 
-const float
+const vtkFloatingPointType
 VISU_ScalarBarCtrl::GetPosition() const
 {
   return myPosition;
@@ -349,12 +349,12 @@ VISU_ScalarBarCtrl::GetPosition() const
 //----------------------------------------------------------------------------
 void
 VISU_ScalarBarCtrl
-::SetSpacing(const float theSpacing)
+::SetSpacing(const vtkFloatingPointType theSpacing)
 {
   myDistance = theSpacing;
 }
 
-float
+vtkFloatingPointType
 VISU_ScalarBarCtrl
 ::GetSpacing() const
 {
@@ -381,12 +381,12 @@ VISU_ScalarBarCtrl
 //----------------------------------------------------------------------------
 void
 VISU_ScalarBarCtrl
-::SetMarkValue(const float theValue) 
+::SetMarkValue(const vtkFloatingPointType theValue) 
 {
   myMarkedValue = theValue;
 }
 
-float
+vtkFloatingPointType
 VISU_ScalarBarCtrl
 ::GetMarkValue() const
 {
@@ -441,7 +441,7 @@ VISU_ScalarBarCtrl
     }
   }
   if(myGlobalRangeIsDefined){
-    float aLocalRange[2];
+    vtkFloatingPointType aLocalRange[2];
     myLocalLookupTable->GetTableRange(aLocalRange);
     MarkValueByColor(myGlobalLookupTable, aLocalRange[0], myBlack);
     MarkValueByColor(myGlobalLookupTable, aLocalRange[1], myBlack);
@@ -459,10 +459,10 @@ VISU_ScalarBarCtrl
   vtkCoordinate * aCoordinate = theScalarBarActor->GetPositionCoordinate();
   aCoordinate->SetCoordinateSystemToNormalizedViewport();
   if(theScalarBarActor->GetOrientation() == VTK_ORIENT_VERTICAL){
-    float aWidth = theScalarBarActor->GetWidth();
+    vtkFloatingPointType aWidth = theScalarBarActor->GetWidth();
     aCoordinate->SetValue(myPosition[0]+theId*(aWidth+myDistance), myPosition[1]);
   }else{ 
-    float aHeight = theScalarBarActor->GetHeight();
+    vtkFloatingPointType aHeight = theScalarBarActor->GetHeight();
     aCoordinate->SetValue(myPosition[0], myPosition[1]+theId*(aHeight+myDistance));
   }
   // Initialize Lookup Tables and Scalar Bars 
index c1a2f9586d1974e8770da2076f862b3d6f9adbab..db7bec430fab19f25c016d372bd4a05e3da0f19e 100644 (file)
@@ -37,88 +37,147 @@ class VISU_ScalarBarCtrl :  public vtkObject
 {
 public:
   vtkTypeMacro(VISU_ScalarBarCtrl, vtkObject);
-  static VISU_ScalarBarCtrl* New();
+  static
+  VISU_ScalarBarCtrl* 
+  New();
 
   enum EMode {eSimple, eGlobal, eLocal};
 
   // Mode
-  void SetMode(EMode theMode);
-  EMode GetMode() const;
+  void
+  SetMode(EMode theMode);
+
+  EMode 
+  GetMode() const;
 
   // Ranges
-  void SetRangeGlobal(float theMin,
-                     float theMax);
-  void SetRangeGlobal(float *theRange);
+  void
+  SetRangeGlobal(vtkFloatingPointType theMin,
+                vtkFloatingPointType theMax);
+  void 
+  SetRangeGlobal(vtkFloatingPointType *theRange);
 
-  void SetGlobalRangeIsDefined(bool theIsDefined);
+  void
+  SetGlobalRangeIsDefined(bool theIsDefined);
   
-  void SetRangeLocal(float theMin,
-                    float theMax);
-  void SetRangeLocal(float *theRange);
+  void
+  SetRangeLocal(vtkFloatingPointType theMin,
+               vtkFloatingPointType theMax);
+  void 
+  SetRangeLocal(vtkFloatingPointType *theRange);
   
   // Selectors
-  vtkScalarBarActor* GetLocalBar();
-  vtkLookupTable* GetLocalTable();
+  vtkScalarBarActor* 
+  GetLocalBar();
+
+  vtkLookupTable* 
+  GetLocalTable();
 
-  vtkScalarBarActor* GetGlobalBar();
-  vtkLookupTable* GetGlobalTable();
+  vtkScalarBarActor* 
+  GetGlobalBar();
+
+  vtkLookupTable* 
+  GetGlobalTable();
   //
   // Renderer
-  void AddToRender(vtkRenderer* theRenderer); 
-  void RemoveFromRender(vtkRenderer* theRenderer);
+  void
+  AddToRender(vtkRenderer* theRenderer); 
+
+  void
+  RemoveFromRender(vtkRenderer* theRenderer);
   //
   // Visibility
-  void SetVisibility(int theFlag);
-  int  GetVisibility() const;
-  //
+  void
+  SetVisibility(int theFlag);
+
+  int
+  GetVisibility() const;
+
   // Visibility
-  void SetCtrlVisibility(int theFlag);
-  int GetCtrlVisibility() const;
-  //
+  void
+  SetCtrlVisibility(int theFlag);
+
+  int
+  GetCtrlVisibility() const;
+
   // Build
   void Update();
-  //
+
   // Position
-  void  SetWidth(const float theWidth);
-  float GetWidth()const;
-  void  SetHeight(const float theHeight);
-  float GetHeight()const;
-  void  SetPosition(const float* thePosition);
-  const float* GetPosition()const;
+  void
+  SetWidth(const vtkFloatingPointType theWidth);
+
+  vtkFloatingPointType
+  GetWidth() const;
+
+  void  
+  SetHeight(const vtkFloatingPointType theHeight);
+
+  vtkFloatingPointType
+  GetHeight() const;
+
+  void
+  SetPosition(const vtkFloatingPointType* thePosition);
+  
+  const vtkFloatingPointType* 
+  GetPosition() const;
   //
   // Spacing
-  void  SetSpacing(const float theSpacing);
-  float GetSpacing()const;
+  void
+  SetSpacing(const vtkFloatingPointType theSpacing);
+
+  vtkFloatingPointType
+  GetSpacing() const;
   //
   // Rainbow/bicolor
-  bool  GetBicolor() const;
-  void  SetBicolor(const bool theBicolor);
+  bool
+  GetBicolor() const;
+
+  void
+  SetBicolor(const bool theBicolor);
   //
   // Misc
-  void  SetMarkValue (const float theValue);
-  float GetMarkValue  ()const;
-  void  SetIsMarked(const bool theFlag);
-  bool  GetIsMarked()const;
+  void  
+  SetMarkValue(const vtkFloatingPointType theValue);
+
+  vtkFloatingPointType
+  GetMarkValue() const;
+
+  void
+  SetIsMarked(const bool theFlag);
+
+  bool
+  GetIsMarked()const;
   //
 protected:
   VISU_ScalarBarCtrl();
-  virtual ~VISU_ScalarBarCtrl();
+
+  virtual
+  ~VISU_ScalarBarCtrl();
   
-  void UpdateForBicolor();
-  void UpdateForColor();
-  void UpdateMarkValue();
-  void PrepareTables();
+  void
+  UpdateForBicolor();
+
+  void
+  UpdateForColor();
+
+  void
+  UpdateMarkValue();
+
+  void
+  PrepareTables();
   
-  void PrepareTables(vtkScalarBarActor* theScalarBarActor,
-                    vtkLookupTable *theLookupTable,
-                    vtkIdType theId);
+  void
+  PrepareTables(vtkScalarBarActor* theScalarBarActor,
+               vtkLookupTable *theLookupTable,
+               vtkIdType theId);
   
 protected:
   EMode myMode;
   bool myGlobalRangeIsDefined;
 
-  float myDistance;
-  float myPosition[2];
+  vtkFloatingPointType myDistance;
+  vtkFloatingPointType myPosition[2];
   bool  myBicolor;
   int   myCtrlVisibility;
 
@@ -126,7 +185,7 @@ protected:
   unsigned char myGrey[3];
   //
   bool  myMarked;
-  float myMarkedValue;
+  vtkFloatingPointType myMarkedValue;
   //
   vtkScalarBarActor *myGlobalScalarBar;
   vtkLookupTable *myGlobalLookupTable; 
index 0d0ccad5785aaaf080fb39e8d92dccd83e4e4160..d911cffc96581019c66da50795e524ae4be93806 100644 (file)
@@ -48,7 +48,9 @@ vtkStandardNewMacro(VISU_ScalarMapOnDeformedShapePL)
  * Merge filter which unify the deformation and scalars
  * \li myScalars is vtk shared pointer to vtkUnstructuredGrid - scalars data
 */
-VISU_ScalarMapOnDeformedShapePL::VISU_ScalarMapOnDeformedShapePL(){
+VISU_ScalarMapOnDeformedShapePL
+::VISU_ScalarMapOnDeformedShapePL()
+{
   myDeformVectors = vtkWarpVector::New();
   myMergeFilter   = vtkMergeFilter::New();
   myExtractorScalars = VISU_Extractor::New();
@@ -59,7 +61,9 @@ VISU_ScalarMapOnDeformedShapePL::VISU_ScalarMapOnDeformedShapePL(){
  * Destructor.
  * Delete all fields.
 */
-VISU_ScalarMapOnDeformedShapePL::~VISU_ScalarMapOnDeformedShapePL(){
+VISU_ScalarMapOnDeformedShapePL
+::~VISU_ScalarMapOnDeformedShapePL()
+{
   myDeformVectors->UnRegisterAllOutputs();
   myDeformVectors->Delete();
 
@@ -76,13 +80,15 @@ VISU_ScalarMapOnDeformedShapePL::~VISU_ScalarMapOnDeformedShapePL(){
 /*!
  * Initial method
  */
-void VISU_ScalarMapOnDeformedShapePL::Init(){
-
+void
+VISU_ScalarMapOnDeformedShapePL
+::Init()
+{
   if (GetScalars() == NULL) SetScalars(GetInput2());
   
   Superclass::Init();
   
-  float aScalarRange[2];
+  vtkFloatingPointType aScalarRange[2];
   GetSourceRange(aScalarRange);
   static double EPS = 1.0 / VTK_LARGE_FLOAT;
   if(aScalarRange[1] > EPS)
@@ -102,7 +108,9 @@ void VISU_ScalarMapOnDeformedShapePL::Init(){
  * Build method
  * Building of deformation and puts result to merge filter.
  */
-void VISU_ScalarMapOnDeformedShapePL::Build()
+void
+VISU_ScalarMapOnDeformedShapePL
+::Build()
 {
   // Set input for extractor
   myExtractor->SetInput(GetInput2());
@@ -119,12 +127,15 @@ void VISU_ScalarMapOnDeformedShapePL::Build()
 /*!
  *  Update method
  */
-void VISU_ScalarMapOnDeformedShapePL::Update(){
+void
+VISU_ScalarMapOnDeformedShapePL
+::Update()
+{
   this->UpdateScalars();
   
-  float aRange[2];
+  vtkFloatingPointType aRange[2];
   GetSourceRange(aRange);
-  float aScalarRange[2] = {aRange[0], aRange[1]};
+  vtkFloatingPointType aScalarRange[2] = {aRange[0], aRange[1]};
   
   if(myBarTable->GetScale() == VTK_SCALE_LOG10)
     VISU_LookupTable::ComputeLogRange(aRange,aScalarRange);
@@ -143,7 +154,10 @@ void VISU_ScalarMapOnDeformedShapePL::Update(){
  * Update scalars method.
  * Put scalars to merge filter.
  */
-void VISU_ScalarMapOnDeformedShapePL::UpdateScalars(){
+void
+VISU_ScalarMapOnDeformedShapePL
+::UpdateScalars()
+{
   if(myScalars->GetCellData()->GetVectors() != NULL ||
      myScalars->GetPointData()->GetVectors() != NULL)
     myMergeFilter->SetScalars(myExtractorScalars->GetOutput());
@@ -155,12 +169,15 @@ void VISU_ScalarMapOnDeformedShapePL::UpdateScalars(){
  * Copy information about pipline.
  * Copy scale and scalars.
  */
-void VISU_ScalarMapOnDeformedShapePL::ShallowCopy(VISU_PipeLine *thePipeLine){
+void
+VISU_ScalarMapOnDeformedShapePL
+::ShallowCopy(VISU_PipeLine *thePipeLine)
+{
   VISU_ScalarMapOnDeformedShapePL *aPipeLine = dynamic_cast<VISU_ScalarMapOnDeformedShapePL*>(thePipeLine);
   if(aPipeLine){
      SetScale(aPipeLine->GetScale());
      SetScalars(aPipeLine->GetScalars());
-     float aRange[2];
+     vtkFloatingPointType aRange[2];
      aPipeLine->GetSourceRange(aRange);
      SetScalarRange(aRange);
   }
@@ -171,7 +188,10 @@ void VISU_ScalarMapOnDeformedShapePL::ShallowCopy(VISU_PipeLine *thePipeLine){
  * Set scalars.
  * Sets vtkDataSet with scalars values to VISU_Extractor filter for scalars extraction.
  */
-void VISU_ScalarMapOnDeformedShapePL::SetScalars(vtkDataSet *theScalars){
+void
+VISU_ScalarMapOnDeformedShapePL
+::SetScalars(vtkDataSet *theScalars)
+{
   myScalars = theScalars;
   vtkUnstructuredGrid* aScalars = GetScalars();
   myExtractorScalars->SetInput(aScalars);
@@ -181,14 +201,20 @@ void VISU_ScalarMapOnDeformedShapePL::SetScalars(vtkDataSet *theScalars){
 /*!
  * Get pointer to input scalars.
  */
-vtkUnstructuredGrid* VISU_ScalarMapOnDeformedShapePL::GetScalars(){
+vtkUnstructuredGrid* 
+VISU_ScalarMapOnDeformedShapePL
+::GetScalars()
+{
   return myScalars.GetPointer();
 }
 
 /*!
  * Sets scale for deformed shape
  */
-void VISU_ScalarMapOnDeformedShapePL::SetScale(float theScale) {
+void
+VISU_ScalarMapOnDeformedShapePL
+::SetScale(vtkFloatingPointType theScale) 
+{
   if(myScaleFactor == theScale) return;
   myScaleFactor = theScale;
   myDeformVectors->SetScaleFactor(myScaleFactor);
@@ -198,15 +224,21 @@ void VISU_ScalarMapOnDeformedShapePL::SetScale(float theScale) {
 /*!
  * Gets scale of deformed shape.
  */
-float VISU_ScalarMapOnDeformedShapePL::GetScale() {
-  float aScale=myDeformVectors->GetScaleFactor();
+vtkFloatingPointType
+VISU_ScalarMapOnDeformedShapePL
+::GetScale() 
+{
+  vtkFloatingPointType aScale=myDeformVectors->GetScaleFactor();
   return aScale;
 }
 
 /*!
  * Set scale factor of deformation.
  */
-void VISU_ScalarMapOnDeformedShapePL::SetMapScale(float theMapScale){
+void
+VISU_ScalarMapOnDeformedShapePL
+::SetMapScale(vtkFloatingPointType theMapScale)
+{
   myDeformVectors->SetScaleFactor(myScaleFactor*theMapScale);
   Modified();
 }
@@ -214,7 +246,10 @@ void VISU_ScalarMapOnDeformedShapePL::SetMapScale(float theMapScale){
 /*!
  * Gets scalar mode.
  */
-int VISU_ScalarMapOnDeformedShapePL::GetScalarMode(){
+int
+VISU_ScalarMapOnDeformedShapePL
+::GetScalarMode()
+{
   int aMode=myExtractorScalars->GetScalarMode();
   return aMode;
 }
@@ -222,7 +257,10 @@ int VISU_ScalarMapOnDeformedShapePL::GetScalarMode(){
 /*!
  * Sets scalar mode.
  */
-void VISU_ScalarMapOnDeformedShapePL::SetScalarMode(int theScalarMode){
+void
+VISU_ScalarMapOnDeformedShapePL
+::SetScalarMode(int theScalarMode)
+{
   myExtractorScalars->SetScalarMode(theScalarMode);
   Modified();
 }
@@ -233,7 +271,10 @@ void VISU_ScalarMapOnDeformedShapePL::SetScalarMode(int theScalarMode){
  * \li theRange[0] - minimum value
  * \li theRange[1] - maximum value
  */
-void VISU_ScalarMapOnDeformedShapePL::GetSourceRange(float theRange[2]){
+void 
+VISU_ScalarMapOnDeformedShapePL
+::GetSourceRange(vtkFloatingPointType theRange[2])
+{
   myExtractorScalars->Update();
   myExtractorScalars->GetUnstructuredGridOutput()->GetScalarRange(theRange);
 }
index 6d1ccf9ae9418f8e81533c13f24a00a38db69310..4105c413d8e3ec8077fc35bab0e7a478ac567a3a 100644 (file)
@@ -50,13 +50,13 @@ public:
 
   virtual void ShallowCopy(VISU_PipeLine *thePipeLine);
 
-  virtual void SetScale(float theScale);
-  virtual float GetScale();
+  virtual void SetScale(vtkFloatingPointType theScale);
+  virtual vtkFloatingPointType GetScale();
 
   virtual int GetScalarMode();
   virtual void SetScalarMode(int theScalarMode = 0);
 
-  virtual void GetSourceRange(float theRange[2]);
+  virtual void GetSourceRange(vtkFloatingPointType theRange[2]);
 
   virtual void SetScalars(vtkDataSet *theScalars);
   virtual vtkUnstructuredGrid* GetScalars();
@@ -81,10 +81,10 @@ public:
   void
   UpdateScalars();
   
-  virtual void SetMapScale(float theMapScale = 1.0);
+  virtual void SetMapScale(vtkFloatingPointType theMapScale = 1.0);
   
 protected:
-  float myScaleFactor;
+  vtkFloatingPointType myScaleFactor;
   vtkWarpVector  *myDeformVectors;
   vtkMergeFilter *myMergeFilter;
   vtkSmartPointer<vtkUnstructuredGrid> myScalars;
index daaa24e689af776bfd498cc6b9c65aed5d312303..0d854a16f17759df2493176c6b1d9787b8d77a29 100644 (file)
@@ -142,7 +142,7 @@ VISU_ScalarMapPL
 
 
 //----------------------------------------------------------------------------
-float
+vtkFloatingPointType
 VISU_ScalarMapPL
 ::GetScalarRange() 
 {
@@ -151,7 +151,7 @@ VISU_ScalarMapPL
 
 void
 VISU_ScalarMapPL
-::SetScalarRange(float theRange[2])
+::SetScalarRange(vtkFloatingPointType theRange[2])
 {
   myFieldTransform->SetScalarRange(theRange);
   myBarTable->SetRange(theRange);
@@ -160,17 +160,17 @@ VISU_ScalarMapPL
 
 void
 VISU_ScalarMapPL
-::SetScalarMin(float theValue)
+::SetScalarMin(vtkFloatingPointType theValue)
 {
-  float aScalarRange[2] = {theValue, GetScalarRange()[1]};
+  vtkFloatingPointType aScalarRange[2] = {theValue, GetScalarRange()[1]};
   SetScalarRange(aScalarRange);
 }
 
 void
 VISU_ScalarMapPL
-::SetScalarMax(float theValue)
+::SetScalarMax(vtkFloatingPointType theValue)
 {
-  float aScalarRange[2] = {GetScalarRange()[0], theValue};
+  vtkFloatingPointType aScalarRange[2] = {GetScalarRange()[0], theValue};
   SetScalarRange(aScalarRange);
 }
 
@@ -224,8 +224,8 @@ void
 VISU_ScalarMapPL
 ::Update() 
 { 
-  float *aRange = myFieldTransform->GetScalarRange();
-  float aScalarRange[2] = {aRange[0], aRange[1]};
+  vtkFloatingPointType *aRange = myFieldTransform->GetScalarRange();
+  vtkFloatingPointType aScalarRange[2] = {aRange[0], aRange[1]};
   if(myBarTable->GetScale() == VTK_SCALE_LOG10)
     VISU_LookupTable::ComputeLogRange(aRange,aScalarRange);
   myMapperTable->SetRange(aScalarRange);
@@ -259,13 +259,13 @@ VISU_ScalarMapPL
 //----------------------------------------------------------------------------
 void 
 VISU_ScalarMapPL
-::SetMapScale(float theMapScale)
+::SetMapScale(vtkFloatingPointType theMapScale)
 {
   myMapperTable->SetMapScale(theMapScale);
   myMapperTable->Build();
 }
 
-float
+vtkFloatingPointType
 VISU_ScalarMapPL::GetMapScale()
 {
   return myMapperTable->GetMapScale();
@@ -275,7 +275,7 @@ VISU_ScalarMapPL::GetMapScale()
 //----------------------------------------------------------------------------
 void
 VISU_ScalarMapPL
-::GetSourceRange(float theRange[2])
+::GetSourceRange(vtkFloatingPointType theRange[2])
 {
   myExtractor->Update();
   myExtractor->GetOutput()->GetScalarRange(theRange);
@@ -285,7 +285,7 @@ void
 VISU_ScalarMapPL
 ::SetSourceRange()
 {
-  float aRange[2];
+  vtkFloatingPointType aRange[2];
   GetSourceRange(aRange);
   SetScalarRange(aRange);
 }
index 1d810fb93cfcca60630bee33aa835bc6b3e510df..526b2daee929a9c94549b3f0d6d89d9bde8340dc 100644 (file)
@@ -77,20 +77,20 @@ public:
   SetScaling(int theScaling = VTK_SCALE_LINEAR);
   
   virtual
-  float
+  vtkFloatingPointType
   GetScalarRange();
 
   virtual
   void
-  SetScalarRange(float theRange[2]);
+  SetScalarRange(vtkFloatingPointType theRange[2]);
 
   virtual
   void
-  SetScalarMin(float theValue);
+  SetScalarMin(vtkFloatingPointType theValue);
 
   virtual
   void
-  SetScalarMax(float theValue);
+  SetScalarMax(vtkFloatingPointType theValue);
   
   virtual
   void
@@ -124,15 +124,15 @@ public:
 
   virtual 
   void
-  SetMapScale(float theMapScale = 1.0);
+  SetMapScale(vtkFloatingPointType theMapScale = 1.0);
 
   virtual
-  float
+  vtkFloatingPointType
   GetMapScale();
 
   virtual
   void
-  GetSourceRange(float theRange[2]);
+  GetSourceRange(vtkFloatingPointType theRange[2]);
 
   virtual
   void
index 2134aeb72f7326d540fd3cc868a1464ea7a04239..985283d6e6f34f4d58343f9bdb8e1fadf40f181b 100755 (executable)
@@ -43,7 +43,7 @@ VISU_SphereWidget::VISU_SphereWidget()
   mySphereActor->SetMapper(mySphereMapper);
   //
   // Define the point coordinates
-  float bounds[6];
+  vtkFloatingPointType bounds[6];
   for(int i = 0; i < 6; i += 2){
     bounds[i]=-.5;
     bounds[i+1]=-bounds[i];
@@ -126,7 +126,7 @@ int VISU_SphereWidget::GetPhiResolution()
 // function: SetRadius
 // purpose :
 //====================================================================
-void VISU_SphereWidget::SetRadius(float theRadius) 
+void VISU_SphereWidget::SetRadius(vtkFloatingPointType theRadius) 
 {
   if ( theRadius <= myRmin ) {
     theRadius = myRmin;
@@ -138,7 +138,7 @@ void VISU_SphereWidget::SetRadius(float theRadius)
 // function: GetRadius
 // purpose :
 //====================================================================
-float VISU_SphereWidget::GetRadius()
+vtkFloatingPointType VISU_SphereWidget::GetRadius()
 { 
   return mySphereSource->GetRadius(); 
 }
@@ -146,7 +146,7 @@ float VISU_SphereWidget::GetRadius()
 // function: SetCenter
 // purpose :
 //====================================================================
-void VISU_SphereWidget::SetCenter(float theCenter[3]) 
+void VISU_SphereWidget::SetCenter(vtkFloatingPointType theCenter[3]) 
 {
   mySphereSource->SetCenter(theCenter);
   mySphere->SetCenter(theCenter);
@@ -155,9 +155,9 @@ void VISU_SphereWidget::SetCenter(float theCenter[3])
 // function: SetCenter
 // purpose :
 //====================================================================
-void VISU_SphereWidget::SetCenter(float theX, float theY, float theZ) 
+void VISU_SphereWidget::SetCenter(vtkFloatingPointType theX, vtkFloatingPointType theY, vtkFloatingPointType theZ) 
 {
-  float aCenter[3] = {theX, theY, theZ};
+  vtkFloatingPointType aCenter[3] = {theX, theY, theZ};
   SetCenter(aCenter);
 }
 
@@ -165,7 +165,7 @@ void VISU_SphereWidget::SetCenter(float theX, float theY, float theZ)
 // function: GetCenter
 // purpose :
 //====================================================================
-float*  VISU_SphereWidget::GetCenter() 
+vtkFloatingPointType*  VISU_SphereWidget::GetCenter() 
 {
   return mySphereSource->GetCenter();
 }
@@ -173,7 +173,7 @@ float*  VISU_SphereWidget::GetCenter()
 // function: GetCenter
 // purpose :
 //====================================================================
-void  VISU_SphereWidget::GetCenter(float theCenter[3]) 
+void  VISU_SphereWidget::GetCenter(vtkFloatingPointType theCenter[3]) 
 {
   mySphereSource->GetCenter(theCenter);
 }
@@ -469,7 +469,7 @@ void VISU_SphereWidget::OnMiddleButtonUp()
 //====================================================================
 void VISU_SphereWidget::Translate(double *p1, double *p2)
 {
-  float v[3], aC[3], aC1[3];
+  vtkFloatingPointType v[3], aC[3], aC1[3];
   //
   v[0] = p2[0] - p1[0];
   v[1] = p2[1] - p1[1];
@@ -495,7 +495,7 @@ void VISU_SphereWidget::Scale(double *p1, double *p2,
   v[1] = p2[1] - p1[1];
   v[2] = p2[2] - p1[2];
   //
-  float aC[3], aR, sf, aR1;
+  vtkFloatingPointType aC[3], aR, sf, aR1;
   aR=mySphereSource->GetRadius();
   mySphereSource->GetCenter(aC);
   sf=vtkMath::Norm(v)/aR;
@@ -561,12 +561,12 @@ void VISU_SphereWidget::CreateDefaultProperties()
 // function:PlaceWidget
 // purpose:
 //====================================================================
-void VISU_SphereWidget::PlaceWidget(float bds[6])
+void VISU_SphereWidget::PlaceWidget(vtkFloatingPointType bds[6])
 {
-  float bounds[6], center[3], radius;
+  vtkFloatingPointType bounds[6], center[3], radius;
 
   this->AdjustBounds(bds, bounds, center);
-  float dX, dY, dZ;
+  vtkFloatingPointType dX, dY, dZ;
   //
   dX=bounds[1]-bounds[0];
   dY=bounds[3]-bounds[2];
@@ -591,7 +591,7 @@ void VISU_SphereWidget::PlaceWidget(float bds[6])
                        (bounds[3]-bounds[2])*(bounds[3]-bounds[2]) +
                        (bounds[5]-bounds[4])*(bounds[5]-bounds[4]));
 
-  static float EPS = 1.0E-1;
+  static vtkFloatingPointType EPS = 1.0E-1;
   myRmin = EPS*InitialLength;
 
 }
index 040a41807f57f3c9b3be7ac27888a530059cfd76..78be7f55dc24da4458fbd5ba2874078ad2752edc 100755 (executable)
@@ -33,7 +33,7 @@ public:
   virtual void SetEnabled(int);
   //
   //PlaceWidget
-  virtual void PlaceWidget(float bounds[6]);
+  virtual void PlaceWidget(vtkFloatingPointType bounds[6]);
   //
   // Description:
   // Set/Get the resolution of the sphere in the Theta direction.
@@ -46,22 +46,24 @@ public:
 
   // Description:
   // Set/Get the radius of sphere. Default is .5.
-  void SetRadius(float r); 
-  float GetRadius();
+  void SetRadius(vtkFloatingPointType r); 
+  vtkFloatingPointType GetRadius();
   
 
   // Description:
   // Set/Get the center of the sphere.
-  void SetCenter(float x, float y, float z); 
-  void SetCenter(float x[3]); 
+  void SetCenter(vtkFloatingPointType x, 
+                vtkFloatingPointType y, 
+                vtkFloatingPointType z); 
+  void SetCenter(vtkFloatingPointType x[3]); 
   
-  float* GetCenter(); 
-  void GetCenter(float xyz[3]); 
+  vtkFloatingPointType* GetCenter(); 
+  void GetCenter(vtkFloatingPointType xyz[3]); 
   
   // Description:
   // Set the ratio of the radius changing.
-  void SetRatio(float r) { myRatio = r; } 
-  float GetRatio() { return myRatio; } 
+  void SetRatio(vtkFloatingPointType r) { myRatio = r; } 
+  vtkFloatingPointType GetRatio() { return myRatio; } 
 
   void ChangeRadius(bool up);
 
@@ -122,10 +124,10 @@ protected:
   // the manipulator in general.
   vtkProperty *mySphereProperty;
   vtkProperty *mySelectedSphereProperty;
-  float myRmin;
+  vtkFloatingPointType myRmin;
   vtkSphere *mySphere;
   vtkImplicitSum* myImplicitSum;
-  float myRatio;
+  vtkFloatingPointType myRatio;
 private:
   VISU_SphereWidget(const VISU_SphereWidget&);  //Not implemented
   void operator=(const VISU_SphereWidget&);  //Not implemented
index 509074a9ebf5d9d679605248ef6f2fe9bc0a730c..834db9de4d18bb39db8f0b42daa05d061fb95630 100644 (file)
@@ -42,10 +42,10 @@ static int MYDEBUG = 0;
 static int MYDEBUG = 0;
 #endif
 
-static float EPS = 1.0e-7;
-static float aMinNbOfSteps = 1.0E+2;
-//static float aMaxNbOfSteps = 1.0E+3;
-static float aCoeffOfIntStep = 1.0E+1;
+static vtkFloatingPointType EPS = 1.0e-7;
+static vtkFloatingPointType aMinNbOfSteps = 1.0E+2;
+//static vtkFloatingPointType aMaxNbOfSteps = 1.0E+3;
+static vtkFloatingPointType aCoeffOfIntStep = 1.0E+1;
 
 
 vtkStandardNewMacro(VISU_StreamLinesPL);
@@ -86,49 +86,57 @@ void VISU_StreamLinesPL::ShallowCopy(VISU_PipeLine *thePipeLine){
 }
 
 
-float VISU_StreamLinesPL::GetNecasseryMemorySize(vtkIdType theNbOfPoints, float theStepLength,
-                                                float thePropogationTime, float thePercents)
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetNecasseryMemorySize(vtkIdType theNbOfPoints, 
+                        vtkFloatingPointType theStepLength,
+                        vtkFloatingPointType thePropogationTime, 
+                        vtkFloatingPointType thePercents)
 {
-  static float aStreamPointSize = sizeof(float)*15 + sizeof(vtkIdType)*2;
-  static float aStreamArraySize = aStreamPointSize*1024; // == 69632
+  static vtkFloatingPointType aStreamPointSize = sizeof(vtkFloatingPointType)*15 + sizeof(vtkIdType)*2;
+  static vtkFloatingPointType aStreamArraySize = aStreamPointSize*1024; // == 69632
 
-  float aNbCells = thePercents*theNbOfPoints*2.0;
-  float aNbPointsPerCell = thePropogationTime/theStepLength;
-  float aCellsSize = aNbCells*(1+aNbPointsPerCell);
-  float aPointsSize = aCellsSize*3.0*sizeof(float);
+  vtkFloatingPointType aNbCells = thePercents*theNbOfPoints*2.0;
+  vtkFloatingPointType aNbPointsPerCell = thePropogationTime/theStepLength;
+  vtkFloatingPointType aCellsSize = aNbCells*(1+aNbPointsPerCell);
+  vtkFloatingPointType aPointsSize = aCellsSize*3.0*sizeof(vtkFloatingPointType);
 
-  float aConnectivitySize = aCellsSize*sizeof(vtkIdType);
-  float aTypesSize = aNbCells*sizeof(char);
-  float aLocationsSize = aNbCells*sizeof(int);
-  //float aNbCellsPerPoint = aCellsSize / aNbCells - 1;
-  float aMeshSize = aPointsSize + aConnectivitySize + aTypesSize + aLocationsSize;
+  vtkFloatingPointType aConnectivitySize = aCellsSize*sizeof(vtkIdType);
+  vtkFloatingPointType aTypesSize = aNbCells*sizeof(char);
+  vtkFloatingPointType aLocationsSize = aNbCells*sizeof(int);
+  //vtkFloatingPointType aNbCellsPerPoint = aCellsSize / aNbCells - 1;
+  vtkFloatingPointType aMeshSize = aPointsSize + aConnectivitySize + aTypesSize + aLocationsSize;
 
-  float anAssignedDataSize = aCellsSize*4.0*sizeof(float);
-  float anOutputDataSetSize = aMeshSize + anAssignedDataSize;
+  vtkFloatingPointType anAssignedDataSize = aCellsSize*4.0*sizeof(vtkFloatingPointType);
+  vtkFloatingPointType anOutputDataSetSize = aMeshSize + anAssignedDataSize;
 
-  float aResult = aStreamArraySize*aNbCells + anOutputDataSetSize;
+  vtkFloatingPointType aResult = aStreamArraySize*aNbCells + anOutputDataSetSize;
   return aResult;
 }
 
-int VISU_StreamLinesPL::FindPossibleParams(vtkPointSet* theDataSet, float& theStepLength,
-                                          float& thePropogationTime, float& thePercents)
+int
+VISU_StreamLinesPL
+::FindPossibleParams(vtkPointSet* theDataSet, 
+                    vtkFloatingPointType& theStepLength,
+                    vtkFloatingPointType& thePropogationTime, 
+                    vtkFloatingPointType& thePercents)
 {
-  static float aPercentsDecrease = 3.0, aStepLengthIncrease = 9.0;
+  static vtkFloatingPointType aPercentsDecrease = 3.0, aStepLengthIncrease = 9.0;
   vtkIdType aNbOfPoints = theDataSet->GetNumberOfPoints();
-  float aSize = GetNecasseryMemorySize(aNbOfPoints,theStepLength,thePropogationTime,thePercents);
+  vtkFloatingPointType aSize = GetNecasseryMemorySize(aNbOfPoints,theStepLength,thePropogationTime,thePercents);
   int isPoss = CheckAvailableMemory(aSize);
   if(!isPoss){
-    float aMaxStepLength = max(GetMaxStepLength(theDataSet),thePropogationTime);
-    float aMinStepLength = GetMinStepLength(theDataSet);
-    float aDeltaStepLength = (aMaxStepLength - aMinStepLength)/aStepLengthIncrease;
+    vtkFloatingPointType aMaxStepLength = max(GetMaxStepLength(theDataSet),thePropogationTime);
+    vtkFloatingPointType aMinStepLength = GetMinStepLength(theDataSet);
+    vtkFloatingPointType aDeltaStepLength = (aMaxStepLength - aMinStepLength)/aStepLengthIncrease;
     for(int i = 2, aStepChanged = 1, aPerecentsChanged = 1; aStepChanged || aPerecentsChanged; i++){
-      float aStepLength = theStepLength + aDeltaStepLength;
+      vtkFloatingPointType aStepLength = theStepLength + aDeltaStepLength;
       if(aStepLength < aMaxStepLength) theStepLength = aStepLength;
       else if(aStepChanged){
        aStepLength = aMaxStepLength;
        aStepChanged = 0;
       }
-      float aPercents = thePercents /= aPercentsDecrease;
+      vtkFloatingPointType aPercents = thePercents /= aPercentsDecrease;
       if(aPercents*aNbOfPoints > 1) thePercents = aPercents;
       else if(aPerecentsChanged) {
        thePercents = 1.1 / aNbOfPoints;
@@ -146,13 +154,15 @@ int VISU_StreamLinesPL::FindPossibleParams(vtkPointSet* theDataSet, float& theSt
 }
 
 
-int VISU_StreamLinesPL::SetParams(float theIntStep,
-                                 float thePropogationTime,
-                                 float theStepLength,
-                                 vtkPointSet* theSource,
-                                 float thePercents,
-                                 int theDirection,
-                                 int isOnlyTry)
+int
+VISU_StreamLinesPL
+::SetParams(vtkFloatingPointType theIntStep,
+           vtkFloatingPointType thePropogationTime,
+           vtkFloatingPointType theStepLength,
+           vtkPointSet* theSource,
+           vtkFloatingPointType thePercents,
+           int theDirection,
+           int isOnlyTry)
 {
   vtkPointSet* aDataSet = theSource? theSource: myFieldTransform->GetUnstructuredGridOutput();
   aDataSet->Update();
@@ -187,31 +197,50 @@ int VISU_StreamLinesPL::SetParams(float theIntStep,
 }
 
 
-vtkPointSet* VISU_StreamLinesPL::GetSource() {
+vtkPointSet* 
+VISU_StreamLinesPL
+::GetSource() 
+{
   return mySource;
 }
 
-float VISU_StreamLinesPL::GetUsedPoints() {
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetUsedPoints() 
+{
   return myPercents;
 }
 
-vtkDataSet* VISU_StreamLinesPL::GetStreamerSource(){
+vtkDataSet* 
+VISU_StreamLinesPL
+::GetStreamerSource()
+{
   return myStream->GetSource();
 }
 
-float VISU_StreamLinesPL::GetVelocityCoeff(){
+vtkFloatingPointType 
+VISU_StreamLinesPL
+::GetVelocityCoeff()
+{
   return GetVelocityCoeff(myExtractor->GetOutput());
 }
 
-float VISU_StreamLinesPL::GetVelocityCoeff(vtkPointSet* theDataSet){
-  float* aScalarRange = theDataSet->GetScalarRange();
+vtkFloatingPointType 
+VISU_StreamLinesPL
+::GetVelocityCoeff(vtkPointSet* theDataSet)
+{
+  vtkFloatingPointType* aScalarRange = theDataSet->GetScalarRange();
   return (fabs(aScalarRange[1]) + fabs(aScalarRange[0]))/2.0;
 }
 
 
-int VISU_StreamLinesPL::IsPossible(vtkPointSet* theDataSet, float thePercents){
-  float aStepLength = GetBaseStepLength(theDataSet);
-  float aBasePropTime = GetBasePropagationTime(theDataSet);
+int
+VISU_StreamLinesPL
+::IsPossible(vtkPointSet* theDataSet, 
+            vtkFloatingPointType thePercents)
+{
+  vtkFloatingPointType aStepLength = GetBaseStepLength(theDataSet);
+  vtkFloatingPointType aBasePropTime = GetBasePropagationTime(theDataSet);
   VISU_UsedPointsFilter *aPointsFilter = VISU_UsedPointsFilter::New();
   aPointsFilter->SetInput(theDataSet);
   vtkPointSet* aDataSet = aPointsFilter->GetOutput();
@@ -223,71 +252,105 @@ int VISU_StreamLinesPL::IsPossible(vtkPointSet* theDataSet, float thePercents){
 }
 
 
-float VISU_StreamLinesPL::GetIntegrationStep(){
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetIntegrationStep()
+{
   return myStream->GetIntegrationStepLength();
 }
-float VISU_StreamLinesPL::GetStepLength() {
+
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetStepLength() 
+{
   return myStream->GetStepLength();
 }
-float VISU_StreamLinesPL::GetPropagationTime() {
+
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetPropagationTime() 
+{
   return myStream->GetMaximumPropagationTime();
 }
-int VISU_StreamLinesPL::GetDirection(){
+
+int
+VISU_StreamLinesPL
+::GetDirection()
+{
   return myStream->GetIntegrationDirection();
 }
 
 
-float VISU_StreamLinesPL::GetMinIntegrationStep(vtkPointSet* theDataSet, float thePercents) {
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetMinIntegrationStep(vtkPointSet* theDataSet, 
+                       vtkFloatingPointType thePercents) 
+{
   if(!theDataSet) return -1.0;
-  float aVolume = 1.0;
+  vtkFloatingPointType aVolume = 1.0;
   int degree = 0;
   theDataSet->Update();
-  float* aBounds = theDataSet->GetBounds();
+  vtkFloatingPointType* aBounds = theDataSet->GetBounds();
   for(int i = 0, j = 0; i < 3; ++i, j = 2*i){
-    float tmp = aBounds[j+1] - aBounds[j];
+    vtkFloatingPointType tmp = aBounds[j+1] - aBounds[j];
     if (tmp > EPS ) {
       aVolume *= tmp;
       degree += 1;
     }
   }
   if (degree < 1) return 0.0; // absolutely empty object
-  float anStepLength = GetMaxIntegrationStep(theDataSet)/aCoeffOfIntStep;
-  float aBasePropTime = GetBasePropagationTime(theDataSet)/GetVelocityCoeff(theDataSet);
+  vtkFloatingPointType anStepLength = GetMaxIntegrationStep(theDataSet)/aCoeffOfIntStep;
+  vtkFloatingPointType aBasePropTime = GetBasePropagationTime(theDataSet)/GetVelocityCoeff(theDataSet);
   thePercents = 1.0;
   vtkIdType aNbOfPoints = theDataSet->GetNumberOfPoints();
-  float aSize = GetNecasseryMemorySize(aNbOfPoints,anStepLength,aBasePropTime,thePercents);
-  float aRealSize = GetAvailableMemory(aSize);
-  float anAverageVolume = aVolume / aRealSize;
-  float aStep = pow(double(anAverageVolume), double(1.0/double(degree)));
+  vtkFloatingPointType aSize = GetNecasseryMemorySize(aNbOfPoints,anStepLength,aBasePropTime,thePercents);
+  vtkFloatingPointType aRealSize = GetAvailableMemory(aSize);
+  vtkFloatingPointType anAverageVolume = aVolume / aRealSize;
+  vtkFloatingPointType aStep = pow(double(anAverageVolume), double(1.0/double(degree)));
   return aStep;
 }
-float VISU_StreamLinesPL::GetMinIntegrationStep(){
+
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetMinIntegrationStep()
+{
   return GetMinIntegrationStep(myExtractor->GetOutput(),GetUsedPoints());
 }
 
 
-float VISU_StreamLinesPL::GetMaxIntegrationStep(vtkPointSet* theDataSet) {
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetMaxIntegrationStep(vtkPointSet* theDataSet) 
+{
   if(!theDataSet) return -1.0;
   theDataSet->Update();
-  float aLength = theDataSet->GetLength();
-  float* aBounds = theDataSet->GetBounds();
-  float aMaxSizeY = (aBounds[3]-aBounds[2])/aLength;
-  float aMaxSizeZ = (aBounds[5]-aBounds[4])/aLength;
-  float aMinMax = (aBounds[1] - aBounds[0])/aLength;
+  vtkFloatingPointType aLength = theDataSet->GetLength();
+  vtkFloatingPointType* aBounds = theDataSet->GetBounds();
+  vtkFloatingPointType aMaxSizeY = (aBounds[3]-aBounds[2])/aLength;
+  vtkFloatingPointType aMaxSizeZ = (aBounds[5]-aBounds[4])/aLength;
+  vtkFloatingPointType aMinMax = (aBounds[1] - aBounds[0])/aLength;
   if (aMinMax < EPS || (aMaxSizeY < aMinMax && aMaxSizeY > EPS)) aMinMax = aMaxSizeY;
   if (aMinMax < EPS || (aMaxSizeZ < aMinMax && aMaxSizeZ > EPS)) aMinMax = aMaxSizeZ;
   return aMinMax*aLength/2.0;
 }
-float VISU_StreamLinesPL::GetMaxIntegrationStep(){
+
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetMaxIntegrationStep()
+{
   return GetMaxIntegrationStep(myExtractor->GetOutput());
 }
 
-float VISU_StreamLinesPL::GetBaseIntegrationStep(vtkPointSet* theDataSet, float thePercents){
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetBaseIntegrationStep(vtkPointSet* theDataSet, 
+                        vtkFloatingPointType thePercents)
+{
   theDataSet->Update();
-  float aMinIntegrationStep = GetMinIntegrationStep(theDataSet,thePercents);
-  float aMaxIntegrationStep = GetMaxIntegrationStep(theDataSet);
-  float anIntegrationStep = aMaxIntegrationStep / aCoeffOfIntStep;
-  float aMinMax = theDataSet->GetLength()/theDataSet->GetNumberOfPoints();
+  vtkFloatingPointType aMinIntegrationStep = GetMinIntegrationStep(theDataSet,thePercents);
+  vtkFloatingPointType aMaxIntegrationStep = GetMaxIntegrationStep(theDataSet);
+  vtkFloatingPointType anIntegrationStep = aMaxIntegrationStep / aCoeffOfIntStep;
+  vtkFloatingPointType aMinMax = theDataSet->GetLength()/theDataSet->GetNumberOfPoints();
   if(aMinMax > anIntegrationStep)
     anIntegrationStep = (anIntegrationStep*aCoeffOfIntStep*0.9+aMinMax)/aCoeffOfIntStep;
   if(aMinIntegrationStep > anIntegrationStep)
@@ -295,10 +358,15 @@ float VISU_StreamLinesPL::GetBaseIntegrationStep(vtkPointSet* theDataSet, float
   return anIntegrationStep;
 }
 
-float VISU_StreamLinesPL::CorrectIntegrationStep(float theStep, vtkPointSet* theDataSet, float thePercents){
+vtkFloatingPointType
+VISU_StreamLinesPL
+::CorrectIntegrationStep(vtkFloatingPointType theStep, 
+                        vtkPointSet* theDataSet, 
+                        vtkFloatingPointType thePercents)
+{
   theDataSet->Update();
-  float aMinIntegrationStep = GetMinIntegrationStep(theDataSet,thePercents);
-  float aMaxIntegrationStep = GetMaxIntegrationStep(theDataSet);
+  vtkFloatingPointType aMinIntegrationStep = GetMinIntegrationStep(theDataSet,thePercents);
+  vtkFloatingPointType aMaxIntegrationStep = GetMaxIntegrationStep(theDataSet);
   if(aMinIntegrationStep > theStep)
     theStep = aMinIntegrationStep;
   if(aMaxIntegrationStep < theStep)
@@ -307,99 +375,156 @@ float VISU_StreamLinesPL::CorrectIntegrationStep(float theStep, vtkPointSet* the
 }
 
 
-float VISU_StreamLinesPL::GetMinPropagationTime(vtkPointSet* theDataSet){
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetMinPropagationTime(vtkPointSet* theDataSet)
+{
   if(!theDataSet) return -1.0;
   return GetMinStepLength(theDataSet);
 }
-float VISU_StreamLinesPL::GetMinPropagationTime(){
+
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetMinPropagationTime()
+{
   return GetMinPropagationTime(myExtractor->GetOutput());
 }
 
-float VISU_StreamLinesPL::GetMaxPropagationTime(vtkPointSet* theDataSet){
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetMaxPropagationTime(vtkPointSet* theDataSet)
+{
   if(!theDataSet) return -1.0;
   return GetBasePropagationTime(theDataSet)*aMinNbOfSteps;
 }
-float VISU_StreamLinesPL::GetMaxPropagationTime(){
+
+vtkFloatingPointType VISU_StreamLinesPL::GetMaxPropagationTime(){
   return GetMaxPropagationTime(myExtractor->GetOutput());
 }
 
-float VISU_StreamLinesPL::CorrectPropagationTime(float thePropagationTime, vtkPointSet* theDataSet){
-  float aMinPropagationTime = GetMinPropagationTime(theDataSet);
-  float aMaxPropagationTime = GetMaxPropagationTime(theDataSet);
+vtkFloatingPointType
+VISU_StreamLinesPL
+::CorrectPropagationTime(vtkFloatingPointType thePropagationTime, 
+                        vtkPointSet* theDataSet)
+{
+  vtkFloatingPointType aMinPropagationTime = GetMinPropagationTime(theDataSet);
+  vtkFloatingPointType aMaxPropagationTime = GetMaxPropagationTime(theDataSet);
   if(aMinPropagationTime > thePropagationTime)
     thePropagationTime = aMinPropagationTime;
   if(aMaxPropagationTime < thePropagationTime)
     thePropagationTime = aMaxPropagationTime;
   return thePropagationTime;
 }
-float VISU_StreamLinesPL::GetBasePropagationTime(vtkPointSet* theDataSet){
+
+vtkFloatingPointType 
+VISU_StreamLinesPL
+::GetBasePropagationTime(vtkPointSet* theDataSet)
+{
   if(!theDataSet) return -1.0;
   theDataSet->Update();
-  float aPropagationTime = theDataSet->GetLength()/GetVelocityCoeff(theDataSet);
+  vtkFloatingPointType aPropagationTime = theDataSet->GetLength()/GetVelocityCoeff(theDataSet);
   return aPropagationTime;
 }
-float VISU_StreamLinesPL::GetBasePropagationTime(){
+
+vtkFloatingPointType 
+VISU_StreamLinesPL
+::GetBasePropagationTime()
+{
   return GetBasePropagationTime(myExtractor->GetOutput());
 }
 
 
-float VISU_StreamLinesPL::GetMinStepLength(vtkPointSet* theDataSet){
-  static float aNbOfStepsOfIntStep = 1.0E+1;
-  float anIntStep = GetMinIntegrationStep(theDataSet);
-  float aStepLength = anIntStep*aNbOfStepsOfIntStep/GetVelocityCoeff(theDataSet);
+vtkFloatingPointType 
+VISU_StreamLinesPL
+::GetMinStepLength(vtkPointSet* theDataSet)
+{
+  static vtkFloatingPointType aNbOfStepsOfIntStep = 1.0E+1;
+  vtkFloatingPointType anIntStep = GetMinIntegrationStep(theDataSet);
+  vtkFloatingPointType aStepLength = anIntStep*aNbOfStepsOfIntStep/GetVelocityCoeff(theDataSet);
   return aStepLength;
 }
-float VISU_StreamLinesPL::GetMinStepLength(){
+
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetMinStepLength()
+{
   return GetMinStepLength(myExtractor->GetOutput());
 }
 
-float VISU_StreamLinesPL::GetMaxStepLength(vtkPointSet* theDataSet){
-  float aStepLength = GetBasePropagationTime(theDataSet);
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetMaxStepLength(vtkPointSet* theDataSet)
+{
+  vtkFloatingPointType aStepLength = GetBasePropagationTime(theDataSet);
   return aStepLength;
 }
-float VISU_StreamLinesPL::GetMaxStepLength(){
+
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetMaxStepLength()
+{
   return GetMaxStepLength(myExtractor->GetOutput());
 }
 
-float VISU_StreamLinesPL::CorrectStepLength(float theStep, vtkPointSet* theDataSet){
-  float aMinStep = GetMinStepLength(theDataSet);
+vtkFloatingPointType
+VISU_StreamLinesPL
+::CorrectStepLength(vtkFloatingPointType theStep, 
+                   vtkPointSet* theDataSet)
+{
+  vtkFloatingPointType aMinStep = GetMinStepLength(theDataSet);
   if(theStep < aMinStep) theStep = aMinStep;
-  float aMaxStep = GetMaxStepLength(theDataSet);
+  vtkFloatingPointType aMaxStep = GetMaxStepLength(theDataSet);
   if(theStep > aMaxStep) theStep = aMaxStep;
   return theStep;
 }
-float VISU_StreamLinesPL::GetBaseStepLength(vtkPointSet* theDataSet){
-  static float anAvgNbOfSteps = 1.0E+2;
-  float aPropagationTime = GetBasePropagationTime(theDataSet);
-  float aStepLength = aPropagationTime/anAvgNbOfSteps;
+
+vtkFloatingPointType
+VISU_StreamLinesPL
+::GetBaseStepLength(vtkPointSet* theDataSet)
+{
+  static vtkFloatingPointType anAvgNbOfSteps = 1.0E+2;
+  vtkFloatingPointType aPropagationTime = GetBasePropagationTime(theDataSet);
+  vtkFloatingPointType aStepLength = aPropagationTime/anAvgNbOfSteps;
   aStepLength = CorrectStepLength(aStepLength,theDataSet);
   return aStepLength;
 }
 
 
-void VISU_StreamLinesPL::Init(){
+void
+VISU_StreamLinesPL
+::Init()
+{
   VISU_ScalarMapPL::Init();
   vtkPointSet* aDataSet = myExtractor->GetOutput();
-  float anIntStep = GetBaseIntegrationStep(aDataSet);
-  float aPropagationTime = GetBasePropagationTime(aDataSet);
-  float aStepLength = GetBaseStepLength(aDataSet);
+  vtkFloatingPointType anIntStep = GetBaseIntegrationStep(aDataSet);
+  vtkFloatingPointType aPropagationTime = GetBasePropagationTime(aDataSet);
+  vtkFloatingPointType aStepLength = GetBaseStepLength(aDataSet);
   SetParams(anIntStep,aPropagationTime,aStepLength);
 }
 
-VISU_ScalarMapPL::THook* VISU_StreamLinesPL::DoHook(){
+VISU_ScalarMapPL::THook* 
+VISU_StreamLinesPL
+::DoHook()
+{
   GetInput2()->Update();
   VISU::CellDataToPoint(myStream,myCellDataToPointData,GetInput2(),myFieldTransform);
-  float *aBounds = GetInput2()->GetBounds();
+  vtkFloatingPointType *aBounds = GetInput2()->GetBounds();
   myGeomFilter->SetExtent(aBounds);
   myGeomFilter->ExtentClippingOn();
   myGeomFilter->SetInput(myStream->GetOutput());
   return myGeomFilter->GetOutput();
 }
 
-void VISU_StreamLinesPL::Update(){
+void
+VISU_StreamLinesPL
+::Update()
+{
   VISU_ScalarMapPL::Update();
 }
 
-void VISU_StreamLinesPL::SetMapScale(float theMapScale){
+void
+VISU_StreamLinesPL
+::SetMapScale(vtkFloatingPointType theMapScale)
+{
   VISU_ScalarMapPL::SetMapScale(theMapScale);
 }
index b360f97444bfc3de9ab9de57caa2f3ba1e8962b1..448c63cadb8eb798aa47b73e5975e769c36b0aea 100644 (file)
@@ -37,82 +37,197 @@ class vtkCellCenters;
 class VTKViewer_GeometryFilter;
 class VISU_UsedPointsFilter;
 
-class VISU_StreamLinesPL : public VISU_DeformedShapePL{
+class VISU_StreamLinesPL : public VISU_DeformedShapePL
+{
 protected:
   VISU_StreamLinesPL();
   VISU_StreamLinesPL(const VISU_StreamLinesPL&);
+
+  virtual
+  ~VISU_StreamLinesPL();
+
 public:
   vtkTypeMacro(VISU_StreamLinesPL,VISU_DeformedShapePL);
-  static VISU_StreamLinesPL* New();
-  virtual ~VISU_StreamLinesPL();
-  virtual void ShallowCopy(VISU_PipeLine *thePipeLine);
-
-  virtual int SetParams(float theIntStep, 
-                       float thePropogationTime,
-                       float theStepLength,
-                       vtkPointSet* theSource = NULL, 
-                       float thePercents = 0.3,
-                       int theDirection = VTK_INTEGRATE_BOTH_DIRECTIONS,
-                       int isOnlyTry = false);
-  virtual vtkPointSet* GetSource();
-  virtual float GetUsedPoints();
-  virtual float GetIntegrationStep();
-  virtual float GetPropagationTime();
-  virtual float GetStepLength();
-  virtual int GetDirection();
-
-  virtual vtkDataSet* GetStreamerSource();
-  virtual float GetVelocityCoeff();
-
-  virtual float GetMaxIntegrationStep();
-  virtual float GetMinIntegrationStep();
-
-  virtual float GetMinStepLength();
-  virtual float GetMaxStepLength();
-
-  virtual float GetMinPropagationTime();
-  virtual float GetMaxPropagationTime();
-  virtual float GetBasePropagationTime();
+
+  static
+  VISU_StreamLinesPL* 
+  New();
+
+  virtual
+  void
+  ShallowCopy(VISU_PipeLine *thePipeLine);
+
+  virtual
+  int 
+  SetParams(vtkFloatingPointType theIntStep, 
+           vtkFloatingPointType thePropogationTime,
+           vtkFloatingPointType theStepLength,
+           vtkPointSet* theSource = NULL, 
+           vtkFloatingPointType thePercents = 0.3,
+           int theDirection = VTK_INTEGRATE_BOTH_DIRECTIONS,
+           int isOnlyTry = false);
+
+  virtual
+  vtkPointSet*
+  GetSource();
+
+  virtual
+  vtkFloatingPointType
+  GetUsedPoints();
+
+  virtual
+  vtkFloatingPointType 
+  GetIntegrationStep();
+
+  virtual
+  vtkFloatingPointType
+  GetPropagationTime();
+
+  virtual
+  vtkFloatingPointType
+  GetStepLength();
+
+  virtual
+  int
+  GetDirection();
+
+  virtual
+  vtkDataSet* 
+  GetStreamerSource();
+
+  virtual
+  vtkFloatingPointType 
+  GetVelocityCoeff();
+
+  virtual
+  vtkFloatingPointType
+  GetMaxIntegrationStep();
+
+  virtual
+  vtkFloatingPointType
+  GetMinIntegrationStep();
+
+  virtual
+  vtkFloatingPointType
+  GetMinStepLength();
+
+  virtual
+  vtkFloatingPointType
+  GetMaxStepLength();
+
+  virtual
+  vtkFloatingPointType
+  GetMinPropagationTime();
+
+  virtual
+  vtkFloatingPointType
+  GetMaxPropagationTime();
+
+  virtual
+  vtkFloatingPointType
+  GetBasePropagationTime();
 
 public:
-  virtual THook* DoHook();
-  virtual void Init();
-  virtual void Update();
-  virtual void SetMapScale(float theMapScale = 1.0);
+  virtual
+  THook* 
+  DoHook();
+
+  virtual
+  void
+  Init();
+
+  virtual
+  void
+  Update();
+
+  virtual
+  void
+  SetMapScale(vtkFloatingPointType theMapScale = 1.0);
 
 public:
-  static float GetMaxIntegrationStep(vtkPointSet* theDataSet);
-  static float GetMinIntegrationStep(vtkPointSet* theDataSet, float thePercents = 0.3);
-  static float GetBaseIntegrationStep(vtkPointSet* theDataSet, float thePercents = 0.3);
+  static
+  vtkFloatingPointType
+  GetMaxIntegrationStep(vtkPointSet* theDataSet);
+
+  static
+  vtkFloatingPointType
+  GetMinIntegrationStep(vtkPointSet* theDataSet, 
+                       vtkFloatingPointType thePercents = 0.3);
+  static
+  vtkFloatingPointType
+  GetBaseIntegrationStep(vtkPointSet* theDataSet, 
+                        vtkFloatingPointType thePercents = 0.3);
   
-  static float GetMinPropagationTime(vtkPointSet* theDataSet);
-  static float GetMaxPropagationTime(vtkPointSet* theDataSet);
-  static float GetBasePropagationTime(vtkPointSet* theDataSet);
+  static 
+  vtkFloatingPointType
+  GetMinPropagationTime(vtkPointSet* theDataSet);
+
+  static
+  vtkFloatingPointType
+  GetMaxPropagationTime(vtkPointSet* theDataSet);
+
+  static
+  vtkFloatingPointType
+  GetBasePropagationTime(vtkPointSet* theDataSet);
+
+  static
+  vtkFloatingPointType
+  GetMinStepLength(vtkPointSet* theDataSet);
+
+  static
+  vtkFloatingPointType
+  GetMaxStepLength(vtkPointSet* theDataSet);
 
-  static float GetMinStepLength(vtkPointSet* theDataSet);
-  static float GetMaxStepLength(vtkPointSet* theDataSet);
-  static float GetBaseStepLength(vtkPointSet* theDataSet);
+  static
+  vtkFloatingPointType
+  GetBaseStepLength(vtkPointSet* theDataSet);
 
-  static float GetVelocityCoeff(vtkPointSet* theDataSet);
+  static
+  vtkFloatingPointType
+  GetVelocityCoeff(vtkPointSet* theDataSet);
 
-  static int IsPossible(vtkPointSet* theDataSet, float thePercents = 0.3);
+  static
+  int
+  IsPossible(vtkPointSet* theDataSet, 
+            vtkFloatingPointType thePercents = 0.3);
 
 protected:
-  static float GetNecasseryMemorySize(vtkIdType theNbOfPoints, float theStepLength, 
-                                     float thePropogationTime, float thePercents = 0.3);
-  static int FindPossibleParams(vtkPointSet* theDataSet, float& theStepLength, 
-                               float& thePropogationTime, float& thePercents);
+  static 
+  vtkFloatingPointType
+  GetNecasseryMemorySize(vtkIdType theNbOfPoints, 
+                        vtkFloatingPointType theStepLength, 
+                        vtkFloatingPointType thePropogationTime, 
+                        vtkFloatingPointType thePercents = 0.3);
+
+  static
+  int
+  FindPossibleParams(vtkPointSet* theDataSet, 
+                    vtkFloatingPointType& theStepLength, 
+                    vtkFloatingPointType& thePropogationTime, 
+                    vtkFloatingPointType& thePercents);
   
-  static float CorrectIntegrationStep(float theStep, vtkPointSet* theDataSet, float thePercents = 0.3);
-  static float CorrectPropagationTime(float thePropagationTime, vtkPointSet* theDataSet);
-  static float CorrectStepLength(float theStep, vtkPointSet* theDataSet);
+  static 
+  vtkFloatingPointType
+  CorrectIntegrationStep(vtkFloatingPointType theStep, 
+                        vtkPointSet* theDataSet, 
+                        vtkFloatingPointType thePercents = 0.3);
+
+  static 
+  vtkFloatingPointType
+  CorrectPropagationTime(vtkFloatingPointType thePropagationTime, 
+                        vtkPointSet* theDataSet);
+
+  static
+  vtkFloatingPointType
+  CorrectStepLength(vtkFloatingPointType theStep, 
+                   vtkPointSet* theDataSet);
 
   vtkStreamLine* myStream;
   vtkPointSet* mySource;
   vtkCellCenters* myCenters;
   VTKViewer_GeometryFilter *myGeomFilter;
   VISU_UsedPointsFilter *myPointsFilter;
-  float myPercents;
+  vtkFloatingPointType myPercents;
 };
 
 
index 92a5e57591f621e2630166c5afd44252110c2384..d37324f63ae1706cd40f25e4f870cdd67e181bd8 100644 (file)
@@ -101,7 +101,7 @@ VISU_VectorsPL
 
 void
 VISU_VectorsPL
-::SetScale(float theScale) 
+::SetScale(vtkFloatingPointType theScale) 
 {
   if(myScaleFactor == theScale) 
     return;
@@ -114,7 +114,7 @@ VISU_VectorsPL
   Modified();
 }
 
-float
+vtkFloatingPointType
 VISU_VectorsPL
 ::GetScale() 
 {
@@ -219,7 +219,7 @@ VISU_VectorsPL
 
 void
 VISU_VectorsPL
-::SetMapScale(float theMapScale)
+::SetMapScale(vtkFloatingPointType theMapScale)
 {
   VISU_ScalarMapPL::SetMapScale(theMapScale);
 
index 312d56fc989a28362980c66a4054484da6ad7f5b..9f3e6db4aada4027cb62e96e429af82c9093927f 100644 (file)
@@ -39,41 +39,94 @@ class vtkLineSource;
 
 class vtkGlyph3D;
 
-class VISU_VectorsPL : public VISU_DeformedShapePL{
+class VISU_VectorsPL : public VISU_DeformedShapePL
+{
 protected:
   VISU_VectorsPL();
   VISU_VectorsPL(const VISU_VectorsPL&);
+
+  virtual
+  ~VISU_VectorsPL();
+
 public:
   vtkTypeMacro(VISU_VectorsPL,VISU_DeformedShapePL);
-  static VISU_VectorsPL* New();
-  virtual ~VISU_VectorsPL();
-  virtual void ShallowCopy(VISU_PipeLine *thePipeLine);
 
-  virtual void SetScale(float theScale);
-  virtual float GetScale();
+  static
+  VISU_VectorsPL* 
+  New();
+
+  virtual
+  void
+  ShallowCopy(VISU_PipeLine *thePipeLine);
+
+  virtual
+  void
+  SetScale(vtkFloatingPointType theScale);
+
+  virtual
+  vtkFloatingPointType
+  GetScale();
 
   enum GlyphType{ ARROW, CONE2, CONE6, NONE};
-  virtual void SetGlyphType(GlyphType theType) { myTypeGlyph = theType;}
-  virtual GlyphType GetGlyphType() { return myTypeGlyph;}
+
+  virtual
+  void
+  SetGlyphType(GlyphType theType) 
+  {
+    myTypeGlyph = theType;
+  }
+
+  virtual
+  GlyphType
+  GetGlyphType() 
+  {
+    return myTypeGlyph;
+  }
     
   enum GlyphPos{ CENTER, TAIL,HEAD};
-  virtual void SetGlyphPos(GlyphPos thePos) { myPosGlyph = thePos;}
-  virtual GlyphPos GetGlyphPos() { return myPosGlyph;}
+
+  virtual
+  void
+  SetGlyphPos(GlyphPos thePos) 
+  { 
+    myPosGlyph = thePos;
+  }
+
+  virtual
+  GlyphPos
+  GetGlyphPos() 
+  {
+    return myPosGlyph;
+  }
 
 public:
-  virtual void Init();
-  virtual void Update();
+  virtual
+  void
+  Init();
+
+  virtual
+  void
+  Update();
 
   vtkDataSet* 
   GetOutput();
 
-  virtual void SetTransform(VTKViewer_Transform* theTransform); 
-  virtual VTKViewer_Transform* GetTransform();
+  virtual
+  void
+  SetTransform(VTKViewer_Transform* theTransform); 
+
+  virtual
+  VTKViewer_Transform* 
+  GetTransform();
   
-  virtual void SetMapScale(float theMapScale = 1.0);
+  virtual
+  void
+  SetMapScale(vtkFloatingPointType theMapScale = 1.0);
 
 protected:
-  virtual THook* DoHook();
+  virtual
+  THook* 
+  DoHook();
 
   GlyphType myTypeGlyph;
   GlyphPos myPosGlyph;
index bb62dc630599e5adac54175b432c2d9188a5be50..3e970a52153e5ca9e2f543b7b29ea8ad6d951b7d 100644 (file)
@@ -268,7 +268,7 @@ VISU_SphereWidget* VISU_WidgetCtrl::GetSphereWidget()
 // function: PlaceWidget
 // purpose :
 //==================================================================
-void VISU_WidgetCtrl::PlaceWidget(float theBounds[6])
+void VISU_WidgetCtrl::PlaceWidget(vtkFloatingPointType theBounds[6])
 {
   for (int i=0; i<myNbWidgets; ++i) { 
     myWidgets[i]->PlaceWidget(theBounds);
@@ -298,7 +298,7 @@ vtkRenderWindowInteractor* VISU_WidgetCtrl::GetInteractor()
 // function: SetPlaceFactor
 // purpose :
 //==================================================================
-void VISU_WidgetCtrl::SetPlaceFactor(float theFactor)
+void VISU_WidgetCtrl::SetPlaceFactor(vtkFloatingPointType theFactor)
 {
   for (int i=0; i<myNbWidgets; ++i) {
     myWidgets[i]->SetPlaceFactor(theFactor);
@@ -310,7 +310,7 @@ void VISU_WidgetCtrl::SetPlaceFactor(float theFactor)
 // function: GetPlaceFactor
 // purpose :
 //==================================================================
-float VISU_WidgetCtrl::GetPlaceFactor()
+vtkFloatingPointType VISU_WidgetCtrl::GetPlaceFactor()
 {
   return myWidgets[0]->GetPlaceFactor();
 }
@@ -324,9 +324,9 @@ vtkImplicitFunction* VISU_WidgetCtrl::ImplicitFunction()
 }
 
 //==================================================================
-float  
+vtkFloatingPointType   
 VISU_WidgetCtrl
-::EvaluateFunction(float theX[3])
+::EvaluateFunction(vtkFloatingPointType theX[3])
 {
   if(VISU_ImplicitFunctionWidget* aWidget = GetActiveWidget()){
     if(vtkImplicitFunction* aFunction = aWidget->ImplicitFunction())
@@ -338,7 +338,8 @@ VISU_WidgetCtrl
 //==================================================================
 void   
 VISU_WidgetCtrl
-::EvaluateGradient(float theX[3], float theG[3])
+::EvaluateGradient(vtkFloatingPointType theX[3], 
+                  vtkFloatingPointType theG[3])
 {
   theG[0] = theG[1] = theG[2] = 0.0;
   if(VISU_ImplicitFunctionWidget* aWidget = GetActiveWidget()){
index 8737b5dc0206f59b2eae79f960b97f2749475087..78b805664a09cf243896e608015dd198c1fb04da 100644 (file)
@@ -51,18 +51,19 @@ public:
   vtkImplicitFunction* ImplicitFunction();
 
   virtual
-  float        
-  EvaluateFunction(float theX[3]);
+  vtkFloatingPointType         
+  EvaluateFunction(vtkFloatingPointType theX[3]);
 
   virtual
   void         
-  EvaluateGradient(float theX[3], float theG[3]);
+  EvaluateGradient(vtkFloatingPointType theX[3], 
+                  vtkFloatingPointType theG[3]);
 
   virtual
   unsigned long
   GetMTime();
 
-  void PlaceWidget(float theBounds[6]);
+  void PlaceWidget(vtkFloatingPointType theBounds[6]);
   void SetEnabled(int theFlag);
   int  GetEnabled();
   void On() {SetEnabled(1);}
@@ -71,8 +72,11 @@ public:
   void SetInteractor(vtkRenderWindowInteractor* theRWI);
   vtkRenderWindowInteractor* GetInteractor();
   //
-  void  SetPlaceFactor(float theFactor);
-  float GetPlaceFactor();
+  void  
+  SetPlaceFactor(vtkFloatingPointType theFactor);
+
+  vtkFloatingPointType
+  GetPlaceFactor();
   //
   void SetActiveIndex(const int theFlag);
   int  GetActiveIndex()const;
@@ -105,7 +109,7 @@ protected:
   int myActiveIndex;
   int myCounter;
   int myDisableAll;
-  float myPriority;
+  vtkFloatingPointType myPriority;
   VISU_ImplicitFunctionWidget *myWidgets[2];
   VISU_ImplicitFunctionWidget *myDummyWidget;
   VISU_PlanesWidget *myPlanesWidget;
index c2d918bd346eea0184972ef197725b8a978edbb7..656fb80ff74d43c7db9f6c44bbb773ed3f68feee 100644 (file)
@@ -120,7 +120,7 @@ public:
 
 
   VISU::Orientation myOrientation;
-  float myDistance;
+  vtkFloatingPointType myDistance;
   double myAngle[2];
 
   vtkPlaneSource* myPlaneSource;
@@ -129,8 +129,14 @@ public:
   void SetOrientation(VISU::Orientation theOrientation) {myOrientation = theOrientation;}
   VISU::Orientation GetOrientation() {return myOrientation;}
 
-  void SetDistance(float theDistance) {myDistance = theDistance;}
-  float GetDistance() {return myDistance;}
+  void SetDistance(vtkFloatingPointType theDistance) 
+  {
+    myDistance = theDistance;
+  }
+  vtkFloatingPointType GetDistance() 
+  {
+    return myDistance;
+  }
 
   void ShallowCopy(OrientedPlane* theOrientedPlane){
     SetNormal(theOrientedPlane->GetNormal());
@@ -182,7 +188,7 @@ protected:
     myActor->SetMapper(myMapper);
 
     vtkProperty* aProp = vtkProperty::New();
-    float anRGB[3];
+    vtkFloatingPointType anRGB[3];
 
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
 
@@ -607,8 +613,8 @@ void VisuGUI_ClippingDlg::onSelectionChanged()
       std::for_each(myPlanes.begin(),myPlanes.end(),TSetVisiblity(false));
       myPlanes.clear();
 
-      float anOffset [3];
-      myPrs3d->GetOffset(anOffset);
+      CORBA::Float anOffset[3];
+      myPrs3d->GetOffset(anOffset[0],anOffset[1],anOffset[2]);
 
       vtkIdType anId = 0, anEnd = myPrs3d->GetNumberOfClippingPlanes();
       for (; anId < anEnd; anId++) {
@@ -618,7 +624,7 @@ void VisuGUI_ClippingDlg::onSelectionChanged()
             VISU::TVTKPlane aTVTKPlane(anOrientedPlane);
             anOrientedPlane->Delete();
             aTVTKPlane->ShallowCopy(aPlane);
-            aTVTKPlane->myActor->SetPosition(anOffset);
+            aTVTKPlane->myActor->SetPosition(anOffset[0],anOffset[1],anOffset[2]);
             myPlanes.push_back(aTVTKPlane);
           }
         }
@@ -690,9 +696,9 @@ void VisuGUI_ClippingDlg::ClickOnNew()
     VISU::TVTKPlane aTVTKPlane(aPlane);
     myPlanes.push_back(aTVTKPlane);
 
-    float anOffset [3];
-    myPrs3d->GetOffset(anOffset);
-    aTVTKPlane->myActor->SetPosition(anOffset);
+    CORBA::Float anOffset[3];
+    myPrs3d->GetOffset(anOffset[0],anOffset[1],anOffset[2]);
+    aTVTKPlane->myActor->SetPosition(anOffset[0],anOffset[1],anOffset[2]);
 
     if (PreviewCheckBox->isChecked())
       aTVTKPlane->myActor->VisibilityOn();
@@ -817,18 +823,18 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneParam()
 
   OrientedPlane* aPlane = myPlanes[aCurPlaneIndex].GetPointer();
 
-  float aNormal[3];
+  vtkFloatingPointType aNormal[3];
   VISU::Orientation anOrientation;
-  float aDir[3][3] = {{0, 0, 0}, {0, 0, 0}};
+  vtkFloatingPointType aDir[3][3] = {{0, 0, 0}, {0, 0, 0}};
   {
     static double aCoeff = vtkMath::Pi()/180.0;
 
-    float aRot[2] = {getRotation1(), getRotation2()};
+    vtkFloatingPointType aRot[2] = {getRotation1(), getRotation2()};
     aPlane->myAngle[0] = aRot[0];
     aPlane->myAngle[1] = aRot[1];
 
-    float anU[2] = {cos(aCoeff*aRot[0]), cos(aCoeff*aRot[1])};
-    float aV[2] = {sqrt(1.0-anU[0]*anU[0]), sqrt(1.0-anU[1]*anU[1])};
+    vtkFloatingPointType anU[2] = {cos(aCoeff*aRot[0]), cos(aCoeff*aRot[1])};
+    vtkFloatingPointType aV[2] = {sqrt(1.0-anU[0]*anU[0]), sqrt(1.0-anU[1]*anU[1])};
     aV[0] = aRot[0] > 0? aV[0]: -aV[0];
     aV[1] = aRot[1] > 0? aV[1]: -aV[1];
 
@@ -876,37 +882,37 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneParam()
   myPrs3d->SetPlaneParam(aNormal, 1. - getDistance(), aPlane);
 
   vtkDataSet* aDataSet = myPrs3d->GetInput();
-  float *aPnt = aDataSet->GetCenter();
+  vtkFloatingPointType *aPnt = aDataSet->GetCenter();
 
-  float* anOrigin = aPlane->GetOrigin();
-  float aDel = aDataSet->GetLength()/2.0;
+  vtkFloatingPointType* anOrigin = aPlane->GetOrigin();
+  vtkFloatingPointType aDel = aDataSet->GetLength()/2.0;
 
-  float aDelta[2][3] = {{aDir[0][0]*aDel, aDir[0][1]*aDel, aDir[0][2]*aDel},
-                       {aDir[1][0]*aDel, aDir[1][1]*aDel, aDir[1][2]*aDel}};
-  float aParam, aPnt0[3], aPnt1[3], aPnt2[3];
+  vtkFloatingPointType aDelta[2][3] = {{aDir[0][0]*aDel, aDir[0][1]*aDel, aDir[0][2]*aDel},
+                                      {aDir[1][0]*aDel, aDir[1][1]*aDel, aDir[1][2]*aDel}};
+  vtkFloatingPointType aParam, aPnt0[3], aPnt1[3], aPnt2[3];
 
-  float aPnt01[3] = {aPnt[0] - aDelta[0][0] - aDelta[1][0],
-                    aPnt[1] - aDelta[0][1] - aDelta[1][1],
-                    aPnt[2] - aDelta[0][2] - aDelta[1][2]};
-  float aPnt02[3] = {aPnt01[0] + aNormal[0],
-                     aPnt01[1] + aNormal[1],
-                     aPnt01[2] + aNormal[2]};
+  vtkFloatingPointType aPnt01[3] = {aPnt[0] - aDelta[0][0] - aDelta[1][0],
+                                   aPnt[1] - aDelta[0][1] - aDelta[1][1],
+                                   aPnt[2] - aDelta[0][2] - aDelta[1][2]};
+  vtkFloatingPointType aPnt02[3] = {aPnt01[0] + aNormal[0],
+                                   aPnt01[1] + aNormal[1],
+                                   aPnt01[2] + aNormal[2]};
   vtkPlane::IntersectWithLine(aPnt01,aPnt02,aNormal,anOrigin,aParam,aPnt0);
 
-  float aPnt11[3] = {aPnt[0] - aDelta[0][0] + aDelta[1][0],
-                    aPnt[1] - aDelta[0][1] + aDelta[1][1],
-                    aPnt[2] - aDelta[0][2] + aDelta[1][2]};
-  float aPnt12[3] = {aPnt11[0] + aNormal[0],
-                    aPnt11[1] + aNormal[1],
-                    aPnt11[2] + aNormal[2]};
+  vtkFloatingPointType aPnt11[3] = {aPnt[0] - aDelta[0][0] + aDelta[1][0],
+                                   aPnt[1] - aDelta[0][1] + aDelta[1][1],
+                                   aPnt[2] - aDelta[0][2] + aDelta[1][2]};
+  vtkFloatingPointType aPnt12[3] = {aPnt11[0] + aNormal[0],
+                                   aPnt11[1] + aNormal[1],
+                                   aPnt11[2] + aNormal[2]};
   vtkPlane::IntersectWithLine(aPnt11,aPnt12,aNormal,anOrigin,aParam,aPnt1);
 
-  float aPnt21[3] = {aPnt[0] + aDelta[0][0] - aDelta[1][0],
-                    aPnt[1] + aDelta[0][1] - aDelta[1][1],
-                    aPnt[2] + aDelta[0][2] - aDelta[1][2]};
-  float aPnt22[3] = {aPnt21[0] + aNormal[0],
-                    aPnt21[1] + aNormal[1],
-                    aPnt21[2] + aNormal[2]};
+  vtkFloatingPointType aPnt21[3] = {aPnt[0] + aDelta[0][0] - aDelta[1][0],
+                                   aPnt[1] + aDelta[0][1] - aDelta[1][1],
+                                   aPnt[2] + aDelta[0][2] - aDelta[1][2]};
+  vtkFloatingPointType aPnt22[3] = {aPnt21[0] + aNormal[0],
+                                   aPnt21[1] + aNormal[1],
+                                   aPnt21[2] + aNormal[2]};
   vtkPlane::IntersectWithLine(aPnt21,aPnt22,aNormal,anOrigin,aParam,aPnt2);
 
   vtkPlaneSource* aPlaneSource = aPlane->myPlaneSource;
@@ -953,14 +959,14 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneIJKParam()
   int i, axId = ButtonGroupIJKAxis->id (ButtonGroupIJKAxis->selected());
   VISU::Result_i::TAxis axis = (VISU::Result_i::TAxis) axId;
   gp_Dir dir;
-  const vector<float> * values =
+  const vector<vtkFloatingPointType> * values =
     result->GetAxisInfo(myPrs3d->GetMeshName(), axis, dir);
   if (!values)
     return;
 
   // find distance;
   int index = SpinBoxIJKIndex->value();
-  float distance = 0;
+  vtkFloatingPointType distance = 0;
   if (index < values->size())
     distance = (*values)[ index ];
 
@@ -977,14 +983,14 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneIJKParam()
     }
   }
   // find rotation angles
-  float angle[2];
+  vtkFloatingPointType angle[2];
   int rotId[2] = {
     (axId == 0) ? 2 : axId - 1,
     (axId == 2) ? 0 : axId + 1
     };
   static double aCoeff = 180.0/vtkMath::Pi();
   for (i = 0; i < 2; ++i) {
-    float cosin = cos[ rotId[ i ]];
+    vtkFloatingPointType cosin = cos[ rotId[ i ]];
     if (maxCos < 0)
       cosin = -cosin;
     angle[ i ] = asin(cosin) * aCoeff;
@@ -1021,7 +1027,7 @@ void VisuGUI_ClippingDlg::setIJKByNonStructured()
   int planeIndex = ComboBoxPlanes->currentItem();
   OrientedPlane* plane = myPlanes[ planeIndex ].GetPointer();
   vtkPlaneSource* planeSource = plane->myPlaneSource;
-  float * planeNormal = planeSource->GetNormal();
+  vtkFloatingPointType * planeNormal = planeSource->GetNormal();
   gp_Dir normal(planeNormal[0], planeNormal[1], planeNormal[2]);
 
   // find a grid axis most co-directed with plane normal
@@ -1029,7 +1035,7 @@ void VisuGUI_ClippingDlg::setIJKByNonStructured()
   int i, maxAx = 0, gridAxId = 0;
   gp_Dir dir, gridDir;
   double maxDot = 0;
-  const vector<float> *curValues, *values = 0;
+  const vector<vtkFloatingPointType> *curValues, *values = 0;
   VISU::Result_i* result = myPrs3d->GetResult();
   for (i = 0; i < 3; ++i) {
     VISU::Result_i::TAxis axis = (VISU::Result_i::TAxis) i;
@@ -1104,8 +1110,8 @@ void VisuGUI_ClippingDlg::onIJKAxisChanged(int axisId)
   if (result) {
     VISU::Result_i::TAxis axis = (VISU::Result_i::TAxis) axisId;
     gp_Dir dir;
-    const vector<float> * indices = result->GetAxisInfo(myPrs3d->GetMeshName(),
-                                                        axis, dir);
+    const vector<vtkFloatingPointType> * indices = result->GetAxisInfo(myPrs3d->GetMeshName(),
+                                                                      axis, dir);
     if (indices)
       maxIndex = indices->size() - 1;
   }
index bdfe873e653b6d4a911131d1d902e242e90cb55e..b24e48c29163fa00ec755b63015b578f512ed161 100644 (file)
@@ -461,7 +461,7 @@ void VisuGUI_CutLinesDlg::setBaseDefault (bool theUpdate)
         //aView->Repaint();
       }
     }
-    float aPos = myCutLines->GetBasePlanePosition();
+    vtkFloatingPointType aPos = myCutLines->GetBasePlanePosition();
     myBasePlanePos->setText( QString::number(aPos) );
     myBasePlanePos->setEnabled(false);
   } else {
@@ -536,15 +536,15 @@ void VisuGUI_CutLinesDlg::DrawTable()
 
 void VisuGUI_CutLinesDlg::updateGlyphs(bool update){
   if (myPreviewActorGlyphs == 0 ) return;
-  const float *aDirLn = myCutLines->GetCutLinesPL()->GetDirLn();
-  const float *aBasePnt = myCutLines->GetCutLinesPL()->GetBasePnt();
-  float aSecondPnt[3];
-  float aBoundCenter[3];
+  const vtkFloatingPointType *aDirLn = myCutLines->GetCutLinesPL()->GetDirLn();
+  const vtkFloatingPointType *aBasePnt = myCutLines->GetCutLinesPL()->GetBasePnt();
+  vtkFloatingPointType aSecondPnt[3];
+  vtkFloatingPointType aBoundCenter[3];
 
   vtkAppendPolyData* aPolyData = myCutLines->GetCutLinesPL()->GetAppendPolyData();
   vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
   aPlaneMapper->SetInput(aPolyData->GetOutput());
-  float bounds[6];
+  vtkFloatingPointType bounds[6];
   aPlaneMapper->GetBounds(bounds);
 
   for(int i=0; i<3; i++) aBoundCenter[i] = (bounds[i*2] + bounds[i*2+1])/2.0;
@@ -555,7 +555,7 @@ void VisuGUI_CutLinesDlg::updateGlyphs(bool update){
       aSecondPnt[i] = -aBasePnt[i] - aDirLn[i];
   }
   
-  float max_bound = 0;
+  vtkFloatingPointType max_bound = 0;
   max_bound < bounds[1]-bounds[0] ? max_bound = bounds[1] - bounds[0] : max_bound = max_bound;
   max_bound < bounds[3]-bounds[2] ? max_bound = bounds[3] - bounds[2] : max_bound = max_bound;
   max_bound < bounds[5]-bounds[4] ? max_bound = bounds[5] - bounds[4] : max_bound = max_bound;
index dfbe850fed9d75ed41cdc49bbde2f2985c2c5234..c88b47e35541a66e01ee03e25e1d772bdda9c974 100644 (file)
@@ -340,7 +340,7 @@ void VisuGUI_GaussScalarBarPane::initFromPrsObject(VISU::GaussPoints_i* thePrs)
   // "Title"
   myTextDlg->setTitleText(QString(thePrs->GetTitle()));
 
-  float R, G, B;
+  vtkFloatingPointType R, G, B;
   thePrs->GetTitleColor(&R, &G, &B);
 
   myTextDlg->myTitleFont->SetData(QColor((int)(R*255.), (int)(G*255.), (int)(B*255.)),
index b08bb8c9171af6a4546d2230242c1bf407cc1d46..e8c0645f525ba65b1b84da1b29d164c765b331af 100644 (file)
@@ -1017,7 +1017,7 @@ namespace
                const char* theSuffix,
                std::ostringstream& theStr)
   {
-    float aColor[3];
+    vtkFloatingPointType aColor[3];
     vtkRenderer* aRenderer = theViewWindow->getRenderer();
     aRenderer->GetBackground(aColor);
     Storable::DataToStream(theStr,(std::string("myColor") + theSuffix + ".R").c_str(),aColor[0]);
@@ -1043,7 +1043,7 @@ namespace
     Storable::DataToStream(theStr,(std::string("myViewUp") + theSuffix + "[1]").c_str(),aViewUp[1]);
     Storable::DataToStream(theStr,(std::string("myViewUp") + theSuffix + "[2]").c_str(),aViewUp[2]);
       
-    float aParallelScale = aCamera->GetParallelScale();
+    vtkFloatingPointType aParallelScale = aCamera->GetParallelScale();
     Storable::DataToStream(theStr,(std::string("myParallelScale") + theSuffix).c_str(),aParallelScale);
       
     double aScaleFactor[3];
@@ -1059,7 +1059,7 @@ namespace
                const char* theSuffix,
                const Storable::TRestoringMap& theMap)
   {
-    float aColor[3];
+    vtkFloatingPointType aColor[3];
     aColor[0] = Storable::FindValue(theMap,std::string("myColor") + theSuffix + ".R").toDouble();
     aColor[1] = Storable::FindValue(theMap,std::string("myColor") + theSuffix + ".G").toDouble();
     aColor[2] = Storable::FindValue(theMap,std::string("myColor") + theSuffix + ".B").toDouble();
@@ -1085,7 +1085,7 @@ namespace
     aViewUp[2] = Storable::FindValue(theMap,std::string("myViewUp") + theSuffix + "[2]").toDouble();
     aCamera->SetViewUp(aViewUp);
 
-    float aParallelScale = Storable::FindValue(theMap,std::string("myParallelScale") + theSuffix).toDouble();
+    vtkFloatingPointType aParallelScale = Storable::FindValue(theMap,std::string("myParallelScale") + theSuffix).toDouble();
     aCamera->SetParallelScale(aParallelScale);
       
     double aScaleFactor[3];
@@ -1107,31 +1107,31 @@ namespace
       std::string aSegmentationMode;
       if(aWidgetCtrl->IsPlanesActive()){
        VISU_PlanesWidget *aPlanesWidget = aWidgetCtrl->GetPlanesWidget();
-       float anOrigin[3];
+       vtkFloatingPointType anOrigin[3];
        aPlanesWidget->GetOrigin(anOrigin);
        Storable::DataToStream(theStr,"myCursorOrigin[0]",anOrigin[0]);
        Storable::DataToStream(theStr,"myCursorOrigin[1]",anOrigin[1]);
        Storable::DataToStream(theStr,"myCursorOrigin[2]",anOrigin[2]);
        
-       float aNormal[3];
+       vtkFloatingPointType aNormal[3];
        aPlanesWidget->GetNormal(aNormal);
        Storable::DataToStream(theStr,"myCursorNormal[0]",aNormal[0]);
        Storable::DataToStream(theStr,"myCursorNormal[1]",aNormal[1]);
        Storable::DataToStream(theStr,"myCursorNormal[2]",aNormal[2]);
        
-       float aDepth = aPlanesWidget->Distance();
+       vtkFloatingPointType aDepth = aPlanesWidget->Distance();
        Storable::DataToStream(theStr,"myCursorDepth",aDepth);
        
        aSegmentationMode = "Planes";
       }else if(aWidgetCtrl->IsSphereActive()){
        VISU_SphereWidget *aSphereWidget = aWidgetCtrl->GetSphereWidget();
-       float aCenter[3];
+       vtkFloatingPointType aCenter[3];
        aSphereWidget->GetCenter(aCenter);
        Storable::DataToStream(theStr,"mySphereCursorCenter[0]",aCenter[0]);
        Storable::DataToStream(theStr,"mySphereCursorCenter[1]",aCenter[1]);
        Storable::DataToStream(theStr,"mySphereCursorCenter[2]",aCenter[2]);
        
-       float aRadius = aSphereWidget->GetRadius();
+       vtkFloatingPointType aRadius = aSphereWidget->GetRadius();
        Storable::DataToStream(theStr,"mySphereCursorRaduis",aRadius);
        
        aSegmentationMode = "Sphere";
@@ -1499,31 +1499,31 @@ OnRestoreConfiguration()
        
        if(aSegmentationMode == "Planes"){
          VISU_PlanesWidget *aPlanesWidget = aWidgetCtrl->GetPlanesWidget();
-         float anOrigin[3];
+         vtkFloatingPointType anOrigin[3];
          anOrigin[0] = Storable::FindValue(aMap,"myCursorOrigin[0]").toDouble();
          anOrigin[1] = Storable::FindValue(aMap,"myCursorOrigin[1]").toDouble();
          anOrigin[2] = Storable::FindValue(aMap,"myCursorOrigin[2]").toDouble();
          aPlanesWidget->SetOrigin(anOrigin);
          
-         float aNormal[3];
+         vtkFloatingPointType aNormal[3];
          aNormal[0] = Storable::FindValue(aMap,"myCursorNormal[0]").toDouble();
          aNormal[1] = Storable::FindValue(aMap,"myCursorNormal[1]").toDouble();
          aNormal[2] = Storable::FindValue(aMap,"myCursorNormal[2]").toDouble();
          aPlanesWidget->SetNormal(aNormal);
          
-         float aDepth = Storable::FindValue(aMap,"myCursorDepth").toDouble();
+         vtkFloatingPointType aDepth = Storable::FindValue(aMap,"myCursorDepth").toDouble();
          aPlanesWidget->SetDistance(aDepth);
          
          aMainWindow->SetPlanesSegementation(true);
        }else if(aSegmentationMode == "Sphere"){
          VISU_SphereWidget *aSphereWidget = aWidgetCtrl->GetSphereWidget();
-         float aCenter[3];
+         vtkFloatingPointType aCenter[3];
          aCenter[0] = Storable::FindValue(aMap,"mySphereCursorCenter[0]").toDouble();
          aCenter[1] = Storable::FindValue(aMap,"mySphereCursorCenter[1]").toDouble();
          aCenter[2] = Storable::FindValue(aMap,"mySphereCursorCenter[2]").toDouble();
          aSphereWidget->SetCenter(aCenter);
          
-         float aRadius = Storable::FindValue(aMap,"mySphereCursorRaduis").toDouble();
+         vtkFloatingPointType aRadius = Storable::FindValue(aMap,"mySphereCursorRaduis").toDouble();
          aSphereWidget->SetRadius(aRadius);
          
          aMainWindow->SetSphereSegementation(true);
@@ -1679,7 +1679,7 @@ void VisuGUI_Module::storeVisualParameters(int savePoint)
                  ip->setParameter( entry, param, QString::number( vActor->GetRepresentation() ).latin1() );
                  param = vtkParam + "Opacity";  
                  ip->setParameter( entry, param, QString::number( vActor->GetOpacity() ).latin1() );
-                 float r, g, b;
+                 vtkFloatingPointType r, g, b;
                  vActor->GetColor(r, g, b);
                  QString colorStr  = QString::number( r ); colorStr += gDigitsSep;
                          colorStr += QString::number( g ); colorStr += gDigitsSep; 
@@ -1706,7 +1706,7 @@ void VisuGUI_Module::storeVisualParameters(int savePoint)
                      ip->setParameter( entry, param, "Off" );
                    for ( int p = 0; p < nPlanes; p++ ) {
                      vtkPlane* plane = vPrs->GetClippingPlane( p );
-                     float normal[3], origin[3];
+                     vtkFloatingPointType normal[3], origin[3];
                      plane->GetNormal( normal );
                      plane->GetOrigin( origin );
                      std::string planeValue  = QString::number( normal[0] ).latin1(); planeValue += gDigitsSep;
@@ -1941,7 +1941,7 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
            else {
              QStringList vals = QStringList::split( gDigitsSep, val );
              if ( vals.count() == 6 ) { // format check: 6 float values
-               float normal[3], origin[3];
+               vtkFloatingPointType normal[3], origin[3];
                for (int x = 0; x < 3; x++ ) {
                  normal[x] = vals[x].toFloat();
                  origin[x] = vals[x+3].toFloat();
index ed732b9cf80ee56322e925fdc1838ff5899204d0..7a28b3dccc03d7d513d2388aeb25a7a69155ecfc 100644 (file)
@@ -67,25 +67,25 @@ myModule(theModule)
   TopLayout->setSpacing(6);
   TopLayout->setMargin(11);
 
-  QHBox* aOffsetsPane = new QHBox (this);
-  aOffsetsPane->setSpacing(6);
+  QHBox* anOffsetsPane = new QHBox (this);
+  anOffsetsPane->setSpacing(6);
 
-  new QLabel ("dX:", aOffsetsPane);
-  myDxEdt = new QtxDblSpinBox (aOffsetsPane, "myDxEdt");
+  new QLabel ("dX:", anOffsetsPane);
+  myDxEdt = new QtxDblSpinBox (anOffsetsPane, "myDxEdt");
   myDxEdt->setRange(-MAXVAL, MAXVAL);
 
-  new QLabel("dY:", aOffsetsPane);
-  myDyEdt = new QtxDblSpinBox (aOffsetsPane, "myDyEdt");
+  new QLabel("dY:", anOffsetsPane);
+  myDyEdt = new QtxDblSpinBox (anOffsetsPane, "myDyEdt");
   myDyEdt->setRange(-MAXVAL, MAXVAL);
 
-  new QLabel("dZ:", aOffsetsPane);
-  myDzEdt = new QtxDblSpinBox (aOffsetsPane, "myDzEdt");
+  new QLabel("dZ:", anOffsetsPane);
+  myDzEdt = new QtxDblSpinBox (anOffsetsPane, "myDzEdt");
   myDzEdt->setRange(-MAXVAL, MAXVAL);
 
-  QPushButton* aResetBtn = new QPushButton(tr("BTN_RESET"), aOffsetsPane);
+  QPushButton* aResetBtn = new QPushButton(tr("BTN_RESET"), anOffsetsPane);
   connect(aResetBtn, SIGNAL(clicked()), this, SLOT(onReset()));
 
-  TopLayout->addWidget(aOffsetsPane);
+  TopLayout->addWidget(anOffsetsPane);
 
   if (!VISU::GetCStudy(VISU::GetAppStudy(theModule))->GetProperties()->IsLocked()) {
     mySaveChk = new QCheckBox ("Save to presentation", this);
@@ -136,26 +136,26 @@ myModule(theModule)
 void VisuGUI_OffsetDlg::addPresentation (VISU::Prs3d_i* thePrs)
 {
   myPrsList.append(thePrs);
-  OffsetStruct aOffs;
-  thePrs->GetOffset(aOffs.myOffset);
-  myOldOffsets.append(aOffs);
+  CORBA::Float anOffset[3];
+  thePrs->GetOffset(anOffset[0],anOffset[1],anOffset[2]);
+  OffsetStruct anOffs(anOffset[0],anOffset[1],anOffset[2]);
+  myOldOffsets.append(anOffs);
   if (myPrsList.count() == 1) {
-    setOffset(aOffs.myOffset);
+    setOffset(anOffs.myOffset);
   } else if (myPrsList.count() == 2) {
-    float aOffset[3];
-    aOffset[0] = aOffset[1] = aOffset[2] = 0;
-    setOffset(aOffset);
+    OffsetStruct anOffs;
+    setOffset(anOffs.myOffset);
   }
 }
 
-void VisuGUI_OffsetDlg::setOffset (const float* theOffset)
+void VisuGUI_OffsetDlg::setOffset (const vtkFloatingPointType* theOffset)
 {
   myDxEdt->setValue(theOffset[0]);
   myDyEdt->setValue(theOffset[1]);
   myDzEdt->setValue(theOffset[2]);
 }
 
-void VisuGUI_OffsetDlg::getOffset (float* theOffset) const
+void VisuGUI_OffsetDlg::getOffset (vtkFloatingPointType* theOffset) const
 {
   theOffset[0] = myDxEdt->value();
   theOffset[1] = myDyEdt->value();
@@ -177,11 +177,11 @@ bool VisuGUI_OffsetDlg::isToSave() const
     return false;
 }
 
-void VisuGUI_OffsetDlg::updateOffset (VISU::Prs3d_i* thePrs, float* theOffset)
+void VisuGUI_OffsetDlg::updateOffset (VISU::Prs3d_i* thePrs, vtkFloatingPointType* theOffset)
 {
   if (myPrsList.count() == 0) return;
 
-  if (isToSave()) thePrs->SetOffset(theOffset);
+  if (isToSave()) thePrs->SetOffset(theOffset[0],theOffset[1],theOffset[2]);
 
   ViewManagerList aViewManagerList;
   SalomeApp_Application* anApp = myModule->getApp();
@@ -213,10 +213,10 @@ void VisuGUI_OffsetDlg::updateOffset (VISU::Prs3d_i* thePrs, float* theOffset)
 
 void VisuGUI_OffsetDlg::accept()
 {
-  float aOffset[3];
-  getOffset(aOffset);
+  vtkFloatingPointType anOffset[3];
+  getOffset(anOffset);
   for (int i = 0; i < myPrsList.count(); i++) {
-    updateOffset(myPrsList.at(i), aOffset);
+    updateOffset(myPrsList.at(i), anOffset);
   }
   QDialog::accept();
 }
@@ -231,10 +231,10 @@ void VisuGUI_OffsetDlg::reject()
 
 void VisuGUI_OffsetDlg::onApply()
 {
-  float aOffset[3];
-  getOffset(aOffset);
+  vtkFloatingPointType anOffset[3];
+  getOffset(anOffset);
   for (int i = 0; i < myPrsList.count(); i++) {
-    updateOffset(myPrsList.at(i), aOffset);
+    updateOffset(myPrsList.at(i), anOffset);
   }
 }
 
index 98a0bdb09f2bc58b05af3c9a527fb7455cda135a..81a86bbbbf1518e956d5715a8086c5cf93cf84ad 100644 (file)
@@ -21,6 +21,7 @@
 #ifndef DIALOGBOX_OFFSET_H
 #define DIALOGBOX_OFFSET_H
 
+#include "VTKViewer.h"
 #include "VISU_Prs3d_i.hh"
 
 // QT Includes
@@ -31,8 +32,23 @@ class QCheckBox;
 class QtxDblSpinBox;
 class VisuGUI;
 
-struct OffsetStruct {
-  float myOffset[3];
+struct OffsetStruct
+{
+  vtkFloatingPointType myOffset[3];
+
+  OffsetStruct()
+  {
+    myOffset[0] = myOffset[1] = myOffset[2] = 0;
+  }
+
+  OffsetStruct(vtkFloatingPointType theX,
+              vtkFloatingPointType theY,
+              vtkFloatingPointType theZ)
+  {
+    myOffset[0] = theX;
+    myOffset[1] = theY;
+    myOffset[2] = theZ;
+  }
 };
 
 class VisuGUI_OffsetDlg: public QDialog
@@ -45,8 +61,8 @@ class VisuGUI_OffsetDlg: public QDialog
   void addPresentation (VISU::Prs3d_i* thePrs);
   int getPrsCount() const { return myPrsList.count(); }
 
-  void setOffset (const float* theOffset);
-  void getOffset (float* theOffset) const;
+  void setOffset (const vtkFloatingPointType* theOffset);
+  void getOffset (vtkFloatingPointType* theOffset) const;
   bool isToSave() const;
 
  public slots:
@@ -59,7 +75,7 @@ class VisuGUI_OffsetDlg: public QDialog
   void onHelp();
 
  private:
-  void updateOffset (VISU::Prs3d_i* thePrs, float* theOffset);
+  void updateOffset (VISU::Prs3d_i* thePrs, vtkFloatingPointType* theOffset);
 
   VisuGUI * myModule;
 
index ed955d7f298fb00d7e2f336d9612afa56e9ee543..b80b5417084f02bb2b8069eca9e268d936802dd9 100644 (file)
@@ -78,20 +78,20 @@ static void renderViewFrame (SVTK_ViewWindow* vw)
 //=======================================================================
 class TPlane : public SALOME_Actor
 {
-  float                mySize;
+  vtkFloatingPointType mySize;
   vtkDataSetMapper*    myMapper;
   vtkPlaneSource*      myPlaneSource;
 
  public:
   // constructor
-  TPlane(float planeSize): mySize(planeSize)
+  TPlane(vtkFloatingPointType planeSize): mySize(planeSize)
   {
     Init();
   }
   // set plane parameters
-  void Set(float origin[3], float normal[3])
+  void Set(vtkFloatingPointType origin[3], vtkFloatingPointType normal[3])
   {
-    float point2[3], point1[3];
+    vtkFloatingPointType point2[3], point1[3];
     vtkMath::Perpendiculars(normal, point1, point2, 0.);
     for (int i = 0; i < 3; ++i) {
       point1[ i ] = point1[ i ] * mySize + origin[ i ];
@@ -285,7 +285,7 @@ void VisuGUI_Plot3DPane::restorePrsParams()
 void VisuGUI_Plot3DPane::onPositionSpn()
 {
   if (myPrs && !RelativeChkB->isChecked()) {
-    float minPos, maxPos;
+    vtkFloatingPointType minPos, maxPos;
     storePrsParams();
     myPrs->GetPlot3DPL()->GetMinMaxPosition(minPos, maxPos);
     restorePrsParams();
@@ -323,7 +323,7 @@ void VisuGUI_Plot3DPane::orientationChanged(int Id)
 //=======================================================================
 void VisuGUI_Plot3DPane::onRelativePos(bool isRelativePos)
 {
-  float minPos = 0., maxPos = 1., pos = PositionSpn->value();
+  vtkFloatingPointType minPos = 0., maxPos = 1., pos = PositionSpn->value();
   if (myPrs) {
     storePrsParams();
     myPrs->GetPlot3DPL()->GetMinMaxPosition(minPos, maxPos);
@@ -376,7 +376,7 @@ void VisuGUI_Plot3DPane::updatePreview()
     }
     // set plane parameters corresponding to control values
     storePrsParams();
-    float normal[3], origin[3];
+    vtkFloatingPointType normal[3], origin[3];
     myPrs->GetPlot3DPL()->GetBasePlane(origin, normal, true);
     planePreview->Set(origin, normal);
     restorePrsParams();
index bf91604a397451e9e674f5eabd400dcad6e32eba..fbbfa6505024e11ec4be15ba2195556b239a2bab 100644 (file)
@@ -561,7 +561,7 @@ void VisuGUI_ScalarBarPane::initFromPrsObject(VISU::ScalarMap_i* thePrs) {
   default:
     setLogarithmic(false);
   }
-  float aRange[2];
+  vtkFloatingPointType aRange[2];
   thePrs->GetScalarMapPL()->GetSourceRange(aRange);
   Rmin = aRange[0]; Rmax = aRange[1];
   setRange( thePrs->GetMin(), thePrs->GetMax(),
@@ -603,7 +603,7 @@ void VisuGUI_ScalarBarPane::initFromPrsObject(VISU::ScalarMap_i* thePrs) {
   // "Title"
   myTextDlg->setTitleText(QString(thePrs->GetTitle()));
 
-  float R, G, B;
+  vtkFloatingPointType R, G, B;
   thePrs->GetTitleColor(&R, &G, &B);
 
   myTextDlg->myTitleFont->SetData(QColor((int)(R*255.), (int)(G*255.), (int)(B*255.)),
@@ -710,9 +710,9 @@ void VisuGUI_ScalarBarPane::createScalarBar()
                                  isTitleBold,isTitleItalic,isTitleShadow);
   vtkTextProperty* aTitleProp = aScalarBarActor->GetTitleTextProperty();
   aTitleProp->SetFontFamily(aTitleFontFamily);
-  aTitleProp->SetColor(float(aTitleColor.red())/255.,
-                      float(aTitleColor.green())/255.,
-                      float(aTitleColor.blue())/255.);
+  aTitleProp->SetColor(vtkFloatingPointType(aTitleColor.red())/255.,
+                      vtkFloatingPointType(aTitleColor.green())/255.,
+                      vtkFloatingPointType(aTitleColor.blue())/255.);
   (isTitleBold)? aTitleProp->BoldOn() : aTitleProp->BoldOff();
   (isTitleItalic)? aTitleProp->ItalicOn() : aTitleProp->ItalicOff();
   (isTitleShadow)? aTitleProp->ShadowOn() : aTitleProp->ShadowOff();
@@ -727,9 +727,9 @@ void VisuGUI_ScalarBarPane::createScalarBar()
                                  isLabelBold, isLabelItalic, isLabelShadow);
   vtkTextProperty* aLabelProp = aScalarBarActor->GetLabelTextProperty();
   aLabelProp->SetFontFamily(aLabelFontFamily);
-  aLabelProp->SetColor(float(aLabelColor.red())/255.,
-                      float(aLabelColor.green())/255.,
-                      float(aLabelColor.blue())/255.);
+  aLabelProp->SetColor(vtkFloatingPointType(aLabelColor.red())/255.,
+                      vtkFloatingPointType(aLabelColor.green())/255.,
+                      vtkFloatingPointType(aLabelColor.blue())/255.);
   (isLabelBold)? aLabelProp->BoldOn() : aLabelProp->BoldOff();
   (isLabelItalic)? aLabelProp->ItalicOn() : aLabelProp->ItalicOff();
   (isLabelShadow)? aLabelProp->ShadowOn() : aLabelProp->ShadowOff();
@@ -907,7 +907,7 @@ void VisuGUI_ScalarBarPane::changeScalarMode( int theMode )
 {
   if ( myScalarMap ) {
     if ( RBFrange->isChecked() ) {
-      float aRange[2];
+      vtkFloatingPointType aRange[2];
       myScalarMap->SetScalarMode(theMode);
       myScalarMap->GetScalarMapPL()->GetSourceRange(aRange);
       MinEdit->setText( QString::number( aRange[0] ) );
index d23580337d703a0034db43ee723608eeb7bd79c9..cc87ab69df7a1a68b8319de6bbaab94f88dcc3d5 100644 (file)
@@ -444,7 +444,7 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::onTimeStampChanged(int){
 
 void VisuGUI_ScalarMapOnDeformedShapeDlg::UpdateScalarField(){
   myPrs->SetScale(getFactor());
-  float aRange[2];
+  vtkFloatingPointType aRange[2];
   myPrs->GetScalarMapOnDeformedShapePL()->Build();
   myPrs->GetScalarMapOnDeformedShapePL()->Update();
   myPrs->GetScalarMapOnDeformedShapePL()->GetSourceRange(aRange);
index 7e5e658e8474796dd0722af8480ef8d07025b65f..46549cc52a6e8f37bd71a5dae876261c0de6918f 100644 (file)
@@ -322,7 +322,7 @@ void VisuGUI_SelectionDlg::closeEvent (QCloseEvent* theEvent)
 
 template<class TData> QString getValue(TData* theData, int theId){
   if (vtkDataArray *aScalar = theData->GetScalars()){
-    float aVal = aScalar->GetTuple1(theId);
+    vtkFloatingPointType aVal = aScalar->GetTuple1(theId);
     return QString::number(aVal);
   } else {
     return QString("No data");
@@ -331,7 +331,7 @@ template<class TData> QString getValue(TData* theData, int theId){
 
 template<class TData> QString getVector(TData* theData, int theId){
   if (vtkDataArray *aVector = theData->GetVectors()) {
-    float *aVal = aVector->GetTuple3(theId);
+    vtkFloatingPointType *aVal = aVector->GetTuple3(theId);
     return QString("%1; %2; %3").arg(aVal[0]).arg(aVal[1]).arg(aVal[2]);
   } else {
     return QString("No data");
@@ -417,7 +417,7 @@ void VisuGUI_SelectionDlg::onSelectionEvent() {
     VISU_Actor* anVISUActor =
       VISU::FindActor(aViewWindow, aSObject->GetID().c_str());
     if (anVISUActor) {
-      float aCoord[6];
+      vtkFloatingPointType aCoord[6];
       anVISUActor->GetBounds(aCoord);
       myXPosLbl->setText(QString::number( aCoord[0] ));
       myYPosLbl->setText(QString::number( aCoord[2] ));
@@ -428,7 +428,7 @@ void VisuGUI_SelectionDlg::onSelectionEvent() {
       myDZLbl->setText(QString::number( ABS(aCoord[5]-aCoord[4]) ));
 
       TColStd_IndexedMapOfInteger aMapIndex;
-      typedef map<int,float*> PointsMap;
+      typedef map<int,vtkFloatingPointType*> PointsMap;
       PointsMap aPointsMap;
 
       aSelector->GetIndex(anIO, aMapIndex);
@@ -442,7 +442,7 @@ void VisuGUI_SelectionDlg::onSelectionEvent() {
         switch (aType) {
         case 0:
           {
-            float* aCoord = anVISUActor->GetNodeCoord(anID);
+            vtkFloatingPointType* aCoord = anVISUActor->GetNodeCoord(anID);
            int aVTKID = anVISUActor->GetNodeVTKID(anID);
             myXValLbl->setText( QString::number( aCoord[0] ) );
             myYValLbl->setText( QString::number( aCoord[1] ) );
@@ -466,7 +466,7 @@ void VisuGUI_SelectionDlg::onSelectionEvent() {
                 myCellScalarValLbl->setText(getValue(aCellData, aVTKID));
                 myCellVectorValLbl->setText(getVector(aCellData, aVTKID));
 
-                float* aCoord;
+                vtkFloatingPointType* aCoord;
                 vtkIdList *aPointList = aCell->GetPointIds();
 
                 for (int i = 0; i < aNbOfPoints; i++) {
@@ -487,7 +487,7 @@ void VisuGUI_SelectionDlg::onSelectionEvent() {
         myListPoints->verticalHeader()->setLabel(i, QString::number( i ));
         int id = It->first;
         myListPoints->setText(i, 0, QString::number( id ));
-        float* aCoord = It->second;
+        vtkFloatingPointType* aCoord = It->second;
         myListPoints->setText(i, 1, QString::number( aCoord[0] ));
         myListPoints->setText(i, 2, QString::number( aCoord[1] ));
         myListPoints->setText(i, 3, QString::number( aCoord[2] ));
index c5e32dc870deb565edfa8f5c253a70f5453af2ef..3ac37f5f28ce0747f55923a6de2c429a0a23e6bb 100644 (file)
@@ -290,9 +290,9 @@ void ArrangeDlg::acceptAnimation()
     FieldData& aData = myAnimator->getFieldData(myFieldLst->currentItem());
     if (aData.myPrs.empty())
       myAnimator->generatePresentations(myFieldLst->currentItem());
-    float aBounds[6];
+    vtkFloatingPointType aBounds[6];
     aData.myPrs[0]->GetBounds(aBounds);
-    float aDist = 0;
+    vtkFloatingPointType aDist = 0;
     int aAxis = getAxis();
     switch (aAxis) {
     case XAxis:
@@ -305,10 +305,10 @@ void ArrangeDlg::acceptAnimation()
       aDist = fabs(aBounds[5] - aBounds[4]);
     }
 
-    float dx = fabs(aBounds[1] - aBounds[0]);
-    float dy = fabs(aBounds[3] - aBounds[2]);
-    float dz = fabs(aBounds[5] - aBounds[4]);
-    float max = (dx > dy) ? dx : dy;
+    vtkFloatingPointType dx = fabs(aBounds[1] - aBounds[0]);
+    vtkFloatingPointType dy = fabs(aBounds[3] - aBounds[2]);
+    vtkFloatingPointType dz = fabs(aBounds[5] - aBounds[4]);
+    vtkFloatingPointType max = (dx > dy) ? dx : dy;
     max = (dz > max) ? dz : max;
     max /= 100.0;
 
@@ -351,13 +351,13 @@ void ArrangeDlg::acceptViewWindow()
         anActor->SetPosition(aOffs.myOffset);
       if (mySaveChk)
        if (mySaveChk->isChecked())
-         aPrs->SetOffset(aOffs.myOffset);
+         aPrs->SetOffset(aOffs.myOffset[0],aOffs.myOffset[1],aOffs.myOffset[2]);
     }
   } else {
-    float aDist = 0;
-    float aShift = 0;
-    float aPrevDist = 0;
-    float aPrevShift = 0;
+    vtkFloatingPointType aDist = 0;
+    vtkFloatingPointType aShift = 0;
+    vtkFloatingPointType aPrevDist = 0;
+    vtkFloatingPointType aPrevShift = 0;
     int i;
     QMap<VISU::Prs3d_i*, int>::Iterator it;
     for (it = myPrsMap.begin(), i = 0; it != myPrsMap.end(); ++it, i++) {
@@ -365,12 +365,12 @@ void ArrangeDlg::acceptViewWindow()
       if (VISU_Actor* aActor = VISU::GetActor(aPrs, myViewWindow)) {
        int aAxis = getAxis();
 
-       float aZeroOffset[3];
+       vtkFloatingPointType aZeroOffset[3];
         aZeroOffset[0] = aZeroOffset[1] = aZeroOffset[2] = 0;
        aActor->SetPosition(aZeroOffset);
         aActor->GetMapper()->Update();
 
-       float aBounds[6];
+       vtkFloatingPointType aBounds[6];
        aActor->GetBounds(aBounds);
        switch (aAxis) {
        case XAxis:
@@ -382,18 +382,18 @@ void ArrangeDlg::acceptViewWindow()
        case ZAxis:
          aDist = fabs(aBounds[5] - aBounds[4]);
        }
-       float aOffset[3];
+       vtkFloatingPointType aOffset[3];
         aOffset[0] = aOffset[1] = aOffset[2] = 0;
         aOffset[aAxis] =
           (aBounds[2*aAxis+1] < aBounds[2*aAxis]) ? -aBounds[2*aAxis+1] : -aBounds[2*aAxis];
 
         if (i > 0) {
-          float aCCDist = (aDist + aPrevDist) / 2.0;
+          vtkFloatingPointType aCCDist = (aDist + aPrevDist) / 2.0;
 
-          float dx = fabs(aBounds[1] - aBounds[0]);
-          float dy = fabs(aBounds[3] - aBounds[2]);
-          float dz = fabs(aBounds[5] - aBounds[4]);
-          float max = (dx > dy) ? dx : dy;
+          vtkFloatingPointType dx = fabs(aBounds[1] - aBounds[0]);
+          vtkFloatingPointType dy = fabs(aBounds[3] - aBounds[2]);
+          vtkFloatingPointType dz = fabs(aBounds[5] - aBounds[4]);
+          vtkFloatingPointType max = (dx > dy) ? dx : dy;
           max = (dz > max) ? dz : max;
           max /= 100.0;
 
@@ -428,7 +428,7 @@ void ArrangeDlg::acceptViewWindow()
        aActor->SetPosition(aOffset);
        if (mySaveChk)
          if (mySaveChk->isChecked())
-           aPrs->SetOffset(aOffset);
+           aPrs->SetOffset(aOffset[0],aOffset[1],aOffset[2]);
 
        aPrevDist = aDist;
        aPrevShift = aShift;
index af7df3f2a4deb9692a7a48533888a03ba7e0fcdc..7c237eec01703afda3a6a457c0b37871896d08b3 100644 (file)
 #define VISUGUI_TIMEANIMATION_H
 
 #include "QtxDblSpinBox.h"
-
 #include "SALOMEDSClient_Study.hxx"
 
 #include <qdialog.h>
 #include <qbuttongroup.h>
 #include <qwidgetstack.h>
 
+#include <vtkSystemIncludes.h>
+
 #include <vector>
 #include <map>
 
@@ -64,7 +65,7 @@ class ArrangeDlg: public QDialog
 
  private:
   struct Offset {
-    float myOffset[3];
+    vtkFloatingPointType myOffset[3];
   };
 
 
index 79b6607f01bf3a9ab43b6997bf10e8ea57aa2970..4427982a013385f47b82897bd6391dd274fe2d2a 100644 (file)
@@ -617,7 +617,7 @@ namespace VISU
 
     QApplication::setOverrideCursor( Qt::waitCursor );
     try {
-      if (aActor = thePrs->CreateActor())
+      if ((aActor = thePrs->CreateActor()))
         theViewWindow->AddActor(aActor);
     } catch(std::exception& exc) {
       SUIT_MessageBox::warn1
@@ -706,15 +706,17 @@ namespace VISU
     QApplication::restoreOverrideCursor();
   }
 
-  static bool ComputeVisiblePropBounds(SVTK_ViewWindow* theViewWindow,
-                                      float             allBounds[6], 
-                                      const char*       theActorClassName = "VISU_Actor")
+  static 
+  bool
+  ComputeVisiblePropBounds(SVTK_ViewWindow* theViewWindow,
+                          vtkFloatingPointType allBounds[6], 
+                          const char* theActorClassName = "VISU_Actor")
   {
     vtkRenderer *aRen = theViewWindow->getRenderer();
     vtkActorCollection *anActColl = aRen->GetActors(); 
     vtkProp *prop;
-    float   *bounds;
-    int     somethingVisible = false;
+    vtkFloatingPointType *bounds;
+    int somethingVisible = false;
 
     allBounds[0] = allBounds[2] = allBounds[4] = VTK_LARGE_FLOAT;
     allBounds[1] = allBounds[3] = allBounds[5] = -VTK_LARGE_FLOAT;
@@ -744,14 +746,14 @@ namespace VISU
 
   void SetFitAll(SVTK_ViewWindow* theViewWindow)
   {
-    static float PRECISION = 0.000001;
-    static float DEVIATION = 600;
-    float XYZ_Bnd[6];
+    static vtkFloatingPointType PRECISION = 0.000001;
+    static vtkFloatingPointType DEVIATION = 600;
+    vtkFloatingPointType XYZ_Bnd[6];
     if (!ComputeVisiblePropBounds(theViewWindow, XYZ_Bnd)) return;
 
-    float absX = XYZ_Bnd[1] - XYZ_Bnd[0];
-    float absY = XYZ_Bnd[3] - XYZ_Bnd[2];
-    float absZ = XYZ_Bnd[5] - XYZ_Bnd[4];
+    vtkFloatingPointType absX = XYZ_Bnd[1] - XYZ_Bnd[0];
+    vtkFloatingPointType absY = XYZ_Bnd[3] - XYZ_Bnd[2];
+    vtkFloatingPointType absZ = XYZ_Bnd[5] - XYZ_Bnd[4];
 
     enum CameraOrient {e3D, eFront, eLeft, eTop};
     CameraOrient aCameraOrient = e3D;
@@ -762,9 +764,9 @@ namespace VISU
         if (absZ <= PRECISION) aCameraOrient = eTop;
         else {
           // all the three dimensions exceeds precision
-          float dev_abs_XY = absX / absY;
-          float dev_abs_YZ = absY / absZ;
-          float dev_abs_XZ = absX / absZ;
+          vtkFloatingPointType dev_abs_XY = absX / absY;
+          vtkFloatingPointType dev_abs_YZ = absY / absZ;
+          vtkFloatingPointType dev_abs_XZ = absX / absZ;
           if (dev_abs_XY >= DEVIATION || 1./dev_abs_YZ >= DEVIATION)
             aCameraOrient = eLeft;
           else {
@@ -953,14 +955,10 @@ namespace VISU
          if(aPlot){
            QList<Plot2d_Curve> clist;
            aPlot->getCurves( clist );
-           SPlot2d_Curve* plotCurve = 0;
-           SPlot2d_Curve* tmpCurve;
            for (int i = 0; i < clist.count(); i++) {
-             tmpCurve = dynamic_cast<SPlot2d_Curve*>(clist.at(i));
-             if (tmpCurve && 
-                 tmpCurve->hasIO() &&
-                 (tmpCurve->getIO()->getEntry() == anEntry))
-               aPlot->eraseCurve(clist.at(i));
+             if(SPlot2d_Curve* plotCurve = dynamic_cast<SPlot2d_Curve*>(clist.at(i)))
+               if(plotCurve->hasIO() && (plotCurve->getIO()->getEntry() == anEntry))
+                 aPlot->eraseCurve(clist.at(i));
            }
          }
        }
index 5501a17ada3f85bd6b671ae9d0b84eaf7a8bc60f..22977d6773016382b28b861b5ac9aa1715134abc 100644 (file)
@@ -128,7 +128,7 @@ VISU::ColoredPrs3d_i
     SetItalicTitle(anOrigin->IsItalicTitle());
     SetShadowTitle(anOrigin->IsShadowTitle());
     SetTitFontType(anOrigin->GetTitFontType());
-    float r,g,b;
+    vtkFloatingPointType r,g,b;
     anOrigin->GetTitleColor(&r,&g,&b);
     SetTitleColor(r,g,b);
     
@@ -341,7 +341,9 @@ VISU::ColoredPrs3d_i
 
 void
 VISU::ColoredPrs3d_i
-::GetTitleColor(float* theR, float* theG, float* theB)
+::GetTitleColor(vtkFloatingPointType* theR, 
+               vtkFloatingPointType* theG, 
+               vtkFloatingPointType* theB)
 {
   *theR = myTitleColor[0]; 
   *theG = myTitleColor[1]; 
@@ -350,7 +352,9 @@ VISU::ColoredPrs3d_i
 
 void
 VISU::ColoredPrs3d_i
-::SetTitleColor(float theR, float theG, float theB)
+::SetTitleColor(vtkFloatingPointType theR, 
+               vtkFloatingPointType theG, 
+               vtkFloatingPointType theB)
 {
   myTitleColor[0] = theR; 
   myTitleColor[1] = theG; 
@@ -415,7 +419,9 @@ VISU::ColoredPrs3d_i
 
 void
 VISU::ColoredPrs3d_i
-::GetLabelColor(float* theR, float* theG, float* theB)
+::GetLabelColor(vtkFloatingPointType* theR, 
+               vtkFloatingPointType* theG, 
+               vtkFloatingPointType* theB)
 {
   *theR = myLabelColor[0]; 
   *theG = myLabelColor[1]; 
@@ -424,7 +430,9 @@ VISU::ColoredPrs3d_i
 
 void
 VISU::ColoredPrs3d_i
-::SetLabelColor(float theR, float theG, float theB)
+::SetLabelColor(vtkFloatingPointType theR, 
+               vtkFloatingPointType theG, 
+               vtkFloatingPointType theB)
 {
   myLabelColor[0] = theR; 
   myLabelColor[1] = theG; 
@@ -470,11 +478,11 @@ VISU::ColoredPrs3d_i
   // Scalar Bar origin
   QString propertyName = QString( "scalar_bar_%1_" ).arg( anOrientation == 0 ? "vertical" : "horizontal" );
 
-  float aXorigin = (myOrientation == VISU::ScalarMap::VERTICAL) ? 0.01 : 0.2;
+  vtkFloatingPointType aXorigin = (myOrientation == VISU::ScalarMap::VERTICAL) ? 0.01 : 0.2;
   aXorigin = aResourceMgr->doubleValue("VISU", propertyName + "x", aXorigin);
   myPosition[0] = aXorigin;
 
-  float aYorigin = (myOrientation == VISU::ScalarMap::VERTICAL) ? 0.1 : 0.012;
+  vtkFloatingPointType aYorigin = (myOrientation == VISU::ScalarMap::VERTICAL) ? 0.1 : 0.012;
   aYorigin = aResourceMgr->doubleValue("VISU", propertyName + "y", aYorigin);
   myPosition[1] = aYorigin;
 
index 9e277a47e4f46a209bac769872a16b7b8127c7bc..6e2a5fd9814ccb99b4b4e21198c725418348d112 100644 (file)
@@ -135,7 +135,7 @@ namespace VISU
     VISU::ScalarMap::Orientation myOrientation;
     std::string myTitle;
     int myNumberOfLabels;
-    float myPosition[2], myWidth, myHeight;
+    vtkFloatingPointType myPosition[2], myWidth, myHeight;
 
   public:
     //----------------------------------------------------------------------------
@@ -218,11 +218,15 @@ namespace VISU
 
     virtual 
     void
-    GetTitleColor(float* theR, float* theG, float* theB);
+    GetTitleColor(vtkFloatingPointType* theR, 
+                 vtkFloatingPointType* theG, 
+                 vtkFloatingPointType* theB);
     
     virtual
     void
-    SetTitleColor(float theR, float theG, float theB);    
+    SetTitleColor(vtkFloatingPointType theR, 
+                 vtkFloatingPointType theG, 
+                 vtkFloatingPointType theB);    
 
     virtual
     bool
@@ -258,11 +262,15 @@ namespace VISU
 
     virtual 
     void
-    GetLabelColor(float* theR, float* theG, float* theB);
+    GetLabelColor(vtkFloatingPointType* theR, 
+                 vtkFloatingPointType* theG, 
+                 vtkFloatingPointType* theB);
 
     virtual
     void
-    SetLabelColor(float theR, float theG, float theB);
+    SetLabelColor(vtkFloatingPointType theR, 
+                 vtkFloatingPointType theG, 
+                 vtkFloatingPointType theB);
 
     //----------------------------------------------------------------------------
   protected:
@@ -276,13 +284,13 @@ namespace VISU
     bool myIsItalicTitle;
     bool myIsShadowTitle;
     int  myTitFontType;
-    float myTitleColor[3];
+    vtkFloatingPointType myTitleColor[3];
 
     bool myIsBoldLabel;
     bool myIsItalicLabel;
     bool myIsShadowLabel;
     int  myLblFontType;
-    float myLabelColor[3];
+    vtkFloatingPointType myLabelColor[3];
 
     VISU_ScalarMapPL* myScalarMapPL;
     bool myIsFixedRange;
index b1dc814ba896de75545557e01071e18aaacccbbc..e69db1a8827bd8e2d5f20e440f98a04835c2792c 100644 (file)
@@ -1206,7 +1206,6 @@ VISU_MEDConvertor
   if(theFamily->myIsDone) 
     return 0;
 
-  const VISU::TGeom2SubMesh& aGeom2SubMesh = theMeshOnEntity->myGeom2SubMesh;
   SALOME_MED::FAMILY_var aMedFamily = theFamily->myFamily;
   CORBA::Boolean anIsOnAllElements = aMedFamily->isOnAllElements();
   if(!anIsOnAllElements){
index 879b0531b617b305203ecde56bf9350340b47257..065956566954f254a41e8649615801b69cc470d9 100644 (file)
@@ -37,7 +37,7 @@
 using namespace VISU;
 using namespace std;
 
-static float EPS_machine = 1.0E-7;
+static vtkFloatingPointType EPS_machine = 1.0E-7;
 
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
@@ -325,8 +325,8 @@ void VISU::CutLines_i::BuildTableOfReal(SALOMEDS::SObject_ptr theSObject){
     anAttr = aStudyBuilder->FindOrCreateAttribute(theSObject, "AttributeTableOfReal");
     SALOMEDS::AttributeTableOfReal_var aTableOfReal = SALOMEDS::AttributeTableOfReal::_narrow(anAttr);
     
-    typedef set<float> TXCont;
-    typedef map<float,float> TXYMap;
+    typedef set<vtkFloatingPointType> TXCont;
+    typedef map<vtkFloatingPointType,vtkFloatingPointType> TXYMap;
     typedef map<int,TXYMap> TXYMapCont;
     typedef map<long,long> TLineIdCont;
     
@@ -340,9 +340,9 @@ void VISU::CutLines_i::BuildTableOfReal(SALOMEDS::SObject_ptr theSObject){
     TXCont aXCont;
     TXYMapCont aXYMapCont; 
     TLineIdCont aLineIdCont;  // Define internal numeration of lines
-    const float *aDirLn = myCutLinesPL->GetDirLn();
-    const float *aBasePnt = myCutLinesPL->GetBasePnt();
-    const float *aBoundPrjLn = myCutLinesPL->GetBoundPrjLn();
+    const vtkFloatingPointType *aDirLn = myCutLinesPL->GetDirLn();
+    const vtkFloatingPointType *aBasePnt = myCutLinesPL->GetBasePnt();
+    const vtkFloatingPointType *aBoundPrjLn = myCutLinesPL->GetBoundPrjLn();
     for(int iLine = 0, jLine = 0; iLine < iLineEnd; iLine++){
       vtkDataSet *aDataSet = myCutLinesPL->GetAppendPolyData()->GetInput(iLine);
       aDataSet->Update();
@@ -364,7 +364,7 @@ void VISU::CutLines_i::BuildTableOfReal(SALOMEDS::SObject_ptr theSObject){
       if(MYDEBUG) MESSAGE("CutPlanes_i::BuildTableOfReal iLine = "<<iLine<<"; aNbPoints = "<<aNbPoints);
       aLineIdCont[iLine] = jLine++;
       TXYMap& aXYMap = aXYMapCont[iLine];
-      float aPnt[3], aVect[3], aDist;
+      vtkFloatingPointType aPnt[3], aVect[3], aDist;
       for(int i = 0; i < aNbPoints; i++){
        aDataSet->GetPoint(i,aPnt);
        Sub(aPnt,aBasePnt,aVect);
@@ -394,19 +394,19 @@ void VISU::CutLines_i::BuildTableOfReal(SALOMEDS::SObject_ptr theSObject){
        TXYMap aNewXYMap;
        TXYMap& aXYMap = aXYMapCont[iLine];
        TXYMap::const_iterator aXYMapIter = aXYMap.begin();
-       std::list<float> XKeys;
+       std::list<vtkFloatingPointType> XKeys;
        for (;aXYMapIter != aXYMap.end() ; aXYMapIter++) XKeys.push_back(aXYMapIter->first);
        XKeys.sort();
        if (XKeys.size() > 1) {
-         float a_first_indx = XKeys.front();
-         float a_last_indx = XKeys.back();
+         vtkFloatingPointType a_first_indx = XKeys.front();
+         vtkFloatingPointType a_last_indx = XKeys.back();
          if (a_first_indx > a_last_indx){
            XKeys.reverse();
-           float tmp = a_first_indx;
+           vtkFloatingPointType tmp = a_first_indx;
            a_first_indx = a_last_indx;
            a_last_indx = tmp;
          }
-         std::list<float>::const_iterator aIter = XKeys.begin();
+         std::list<vtkFloatingPointType>::const_iterator aIter = XKeys.begin();
          for (int k=0;k<XKeys.size() and aIter != XKeys.end();k++,aIter++){
            // Warning: value '1.0' come from workaround:
            // see also aDist = vtkMath::Dot(aVect,aDirLn) / aBoundPrjLn[2];
@@ -431,9 +431,9 @@ void VISU::CutLines_i::BuildTableOfReal(SALOMEDS::SObject_ptr theSObject){
        aNewXYMap[aXYMapIter[0]->first] = aXYMapIter[0]->second;
        aXCont.insert(aXYMapIter[0]->first);
        for(; aXYMapIter[1] != aXYMap.end(); aXYMapIter[0]++, aXYMapIter[1]++){
-         float aY[3] = {aXYMapIter[0]->second, aXYMapIter[1]->second, 0.0};
+         vtkFloatingPointType aY[3] = {aXYMapIter[0]->second, aXYMapIter[1]->second, 0.0};
          aY[2] = (aY[0] + aY[1])/2.0;
-         float aX[3] = {aXYMapIter[0]->first, aXYMapIter[1]->first, 0.0};
+         vtkFloatingPointType aX[3] = {aXYMapIter[0]->first, aXYMapIter[1]->first, 0.0};
          aX[2] = (aX[0] + aX[1])/2.0;
          aNewXYMap[aX[2]] = aY[2];
          aXCont.insert(aX[2]);
@@ -454,7 +454,7 @@ void VISU::CutLines_i::BuildTableOfReal(SALOMEDS::SObject_ptr theSObject){
     aTableOfReal->SetNbColumns(iEnd);
     TXCont::const_iterator aXContIter = aXCont.begin();
     for(long i = 0; aXContIter != aXCont.end(); aXContIter++, i++){
-      float aDist = *aXContIter; 
+      vtkFloatingPointType aDist = *aXContIter; 
       aTableOfReal->PutValue(aDist,1,i+1);
       aString.sprintf("%d",i);
       aTableOfReal->SetColumnTitle(i+1,aString.latin1());
@@ -467,7 +467,7 @@ void VISU::CutLines_i::BuildTableOfReal(SALOMEDS::SObject_ptr theSObject){
        TXYMap::const_iterator aXYMapIter = aXYMap.find(aDist);
        // Can we find some value that belong to the line and have the same X coordinate?
        if(aXYMapIter == aXYMap.end()) continue;
-       float aVal = aXYMapIter->second;
+       vtkFloatingPointType aVal = aXYMapIter->second;
        aTableOfReal->PutValue(aVal,iLineId+2,i+1);
       }
     }
index 93da92ac33f85fb5c43216f9cd0df2be2f7c2676..cb73301bef5313f5af5611088807c7e20d9fad5d 100644 (file)
@@ -154,16 +154,16 @@ VISU::GaussPoints_i
   int aBicolor = aResourceMgr->integerValue( "VISU", "scalar_bar_bicolor", GetBiColor() );
   SetBiColor( aBicolor == 0 );
 
-  float aSpacing = aResourceMgr->doubleValue( "VISU", "scalar_bar_spacing", GetSpacing() );
+  vtkFloatingPointType aSpacing = aResourceMgr->doubleValue( "VISU", "scalar_bar_spacing", GetSpacing() );
   SetSpacing( aSpacing );
 
-  float aScaleFactor = aResourceMgr->doubleValue( "VISU", "deformed_shape_scale_factor", GetScaleFactor() );
+  vtkFloatingPointType aScaleFactor = aResourceMgr->doubleValue( "VISU", "deformed_shape_scale_factor", GetScaleFactor() );
   SetScaleFactor( aScaleFactor );
 
   int aPrimitiveType = aResourceMgr->integerValue( "VISU", "point_sprite_primitive_type", GetPrimitiveType() );
   SetPrimitiveType( aPrimitiveType );
 
-  float aClamp = aResourceMgr->doubleValue( "VISU", "point_sprite_clamp", GetClamp() );
+  vtkFloatingPointType aClamp = aResourceMgr->doubleValue( "VISU", "point_sprite_clamp", GetClamp() );
   SetClamp( aClamp );
 
   int aMinSize = aResourceMgr->integerValue( "VISU", "point_sprite_min_size", ( int )( GetMinSize() * 100.0 ) );
@@ -178,7 +178,7 @@ VISU::GaussPoints_i
   int aMagnification = aResourceMgr->integerValue( "VISU", "point_sprite_magnification", ( int )( GetMagnification() * 100.0 ) );
   SetMagnification( aMagnification / 100.0 );
 
-  float anIncrement = aResourceMgr->doubleValue( "VISU", "point_sprite_increment", GetMagnificationIncrement() );
+  vtkFloatingPointType anIncrement = aResourceMgr->doubleValue( "VISU", "point_sprite_increment", GetMagnificationIncrement() );
   SetMagnificationIncrement( anIncrement );
 
   bool isColored = aResourceMgr->booleanValue( "VISU", "point_sprite_results", GetIsColored() );
@@ -187,7 +187,7 @@ VISU::GaussPoints_i
   QColor aColor = aResourceMgr->colorValue( "VISU", "point_sprite_color", GetColor() );
   SetColor( aColor );
 
-  float anAlphaThreshold = aResourceMgr->doubleValue( "VISU", "point_sprite_alpha_threshold", GetAlphaThreshold() );
+  vtkFloatingPointType anAlphaThreshold = aResourceMgr->doubleValue( "VISU", "point_sprite_alpha_threshold", GetAlphaThreshold() );
   SetAlphaThreshold( anAlphaThreshold );
 
   int aResolution = aResourceMgr->integerValue( "VISU", "geom_sphere_resolution", GetResolution() );
@@ -322,12 +322,12 @@ VISU::GaussPoints_i
 
 void
 VISU::GaussPoints_i
-::SetScaleFactor( float theScaleFactor )
+::SetScaleFactor( vtkFloatingPointType theScaleFactor )
 {
   myGaussPointsPL->SetScale( theScaleFactor );
 }
 
-float
+vtkFloatingPointType
 VISU::GaussPoints_i
 ::GetScaleFactor()
 {
@@ -376,12 +376,12 @@ VISU::GaussPoints_i
 
 void
 VISU::GaussPoints_i
-::SetAlphaThreshold( float theAlphaThreshold )
+::SetAlphaThreshold( vtkFloatingPointType theAlphaThreshold )
 {
   myGaussPointsPL->SetAlphaThreshold( theAlphaThreshold );
 }
 
-float
+vtkFloatingPointType
 VISU::GaussPoints_i
 ::GetAlphaThreshold()
 {
@@ -416,7 +416,7 @@ VISU::GaussPoints_i
   return myGaussPointsPL->GetPrimitiveType();
 }
 
-float
+vtkFloatingPointType
 VISU::GaussPoints_i
 ::GetMaximumSupportedSize()
 {
@@ -425,12 +425,12 @@ VISU::GaussPoints_i
 
 void
 VISU::GaussPoints_i
-::SetClamp(float theClamp)
+::SetClamp(vtkFloatingPointType theClamp)
 {
   myGaussPointsPL->SetClamp( theClamp );
 }
 
-float
+vtkFloatingPointType
 VISU::GaussPoints_i
 ::GetClamp()
 {
@@ -439,12 +439,12 @@ VISU::GaussPoints_i
 
 void
 VISU::GaussPoints_i
-::SetGeomSize( float theGeomSize )
+::SetGeomSize( vtkFloatingPointType theGeomSize )
 {
   myGaussPointsPL->SetSize( theGeomSize );
 }
 
-float
+vtkFloatingPointType
 VISU::GaussPoints_i
 ::GetGeomSize()
 {
@@ -453,12 +453,12 @@ VISU::GaussPoints_i
 
 void
 VISU::GaussPoints_i
-::SetMinSize( float theMinSize )
+::SetMinSize( vtkFloatingPointType theMinSize )
 {
   myGaussPointsPL->SetMinSize( theMinSize );
 }
 
-float
+vtkFloatingPointType
 VISU::GaussPoints_i
 ::GetMinSize()
 {
@@ -467,12 +467,12 @@ VISU::GaussPoints_i
 
 void
 VISU::GaussPoints_i
-::SetMaxSize( float theMaxSize )
+::SetMaxSize( vtkFloatingPointType theMaxSize )
 {
   myGaussPointsPL->SetMaxSize( theMaxSize );
 }
 
-float
+vtkFloatingPointType
 VISU::GaussPoints_i
 ::GetMaxSize()
 {
@@ -481,12 +481,12 @@ VISU::GaussPoints_i
 
 void
 VISU::GaussPoints_i
-::SetMagnification( float theMagnification )
+::SetMagnification( vtkFloatingPointType theMagnification )
 {
   myGaussPointsPL->SetMagnification( theMagnification );
 }
 
-float
+vtkFloatingPointType
 VISU::GaussPoints_i
 ::GetMagnification()
 {
@@ -495,12 +495,12 @@ VISU::GaussPoints_i
 
 void
 VISU::GaussPoints_i
-::SetMagnificationIncrement( float theIncrement )
+::SetMagnificationIncrement( vtkFloatingPointType theIncrement )
 {
   myGaussPointsPL->SetMagnificationIncrement( theIncrement );
 }
 
-float
+vtkFloatingPointType
 VISU::GaussPoints_i
 ::GetMagnificationIncrement()
 {
@@ -639,14 +639,14 @@ VISU::GaussPoints_i
 
   vtkTextProperty* aTitleProp = theScalarBar->GetTitleTextProperty();
   aTitleProp->SetFontFamily(myTitFontType);
-  aTitleProp->SetColor(myTitleColor);
+  aTitleProp->SetColor(myTitleColor[0],myTitleColor[1],myTitleColor[2]);
   (myIsBoldTitle)? aTitleProp->BoldOn() : aTitleProp->BoldOff();
   (myIsItalicTitle)? aTitleProp->ItalicOn() : aTitleProp->ItalicOff();
   (myIsShadowTitle)? aTitleProp->ShadowOn() : aTitleProp->ShadowOff();
   
   vtkTextProperty* aLabelProp = theScalarBar->GetLabelTextProperty();
   aLabelProp->SetFontFamily(myLblFontType);
-  aLabelProp->SetColor(myLabelColor);
+  aLabelProp->SetColor(myLabelColor[0],myLabelColor[1],myLabelColor[2]);
   (myIsBoldLabel)? aLabelProp->BoldOn() : aLabelProp->BoldOff();
   (myIsItalicLabel)? aLabelProp->ItalicOn() : aLabelProp->ItalicOff();
   (myIsShadowLabel)? aLabelProp->ShadowOn() : aLabelProp->ShadowOff();
@@ -666,7 +666,7 @@ VISU::GaussPoints_i
       anActor->SetBarVisibility(true);
       myPipeLine->GetMapper()->SetScalarVisibility(1);
 
-      float aRange[2];
+      vtkFloatingPointType aRange[2];
       myScalarMapPL->GetSourceRange(aRange);
       aScalarBarCtrl->SetRangeLocal(aRange);
       
@@ -687,7 +687,7 @@ VISU::GaussPoints_i
       }
       
       if(aScalarBarMode == VISU_ScalarBarCtrl::eGlobal){
-       float aRangeGlobal[2];
+       vtkFloatingPointType aRangeGlobal[2];
        //
        aRangeGlobal[0] = aTMinMax.first;
        aRangeGlobal[1] = aTMinMax.second;
@@ -813,12 +813,12 @@ VISU::GaussPoints_i
 
 void
 VISU::GaussPoints_i
-::SetSpacing(const float theSpacing)
+::SetSpacing(const vtkFloatingPointType theSpacing)
 {
   mySpacing = theSpacing;
 }
 
-float
+vtkFloatingPointType
 VISU::GaussPoints_i
 ::GetSpacing() const 
 {
index 5a0fe102627c77a2bdf57cb2dfa1edcd3a8ffb0d..71c49c72aedd743008b68e8a8073c5e0b37d5cdb 100644 (file)
@@ -87,11 +87,11 @@ namespace VISU
     void
     SetIsDeformed( bool theIsDeformed );
 
-    float
+    vtkFloatingPointType
     GetScaleFactor();
 
     void
-    SetScaleFactor( float theScaleFactor );
+    SetScaleFactor( vtkFloatingPointType theScaleFactor );
 
     //! Get color for Geometry mode of the presentation.
     QColor
@@ -133,10 +133,10 @@ namespace VISU
 
     //! Redirect the request to VISU_GaussPointsPL::SetAlphaThreshold.
     void
-    SetAlphaThreshold(float theAlphaThreshold);
+    SetAlphaThreshold(vtkFloatingPointType theAlphaThreshold);
 
     //! Redirect the request to VISU_GaussPointsPL::GetAlphaThreshold.
-    float
+    vtkFloatingPointType
     GetAlphaThreshold();
 
     //! Redirect the request to VISU_GaussPointsPL::SetResolution.
@@ -154,55 +154,55 @@ namespace VISU
     GetPrimitiveType();
 
     //! Redirect the request to VISU_GaussPointsPL::GetMaximumSupportedSize.
-    float 
+    vtkFloatingPointType 
     GetMaximumSupportedSize();
 
     //! Redirect the request to VISU_GaussPointsPL::SetClamp.
     void
-    SetClamp(float theClamp);
+    SetClamp(vtkFloatingPointType theClamp);
 
     //! Redirect the request to VISU_GaussPointsPL::GetClamp.
-    float
+    vtkFloatingPointType
     GetClamp();
 
     //! Redirect the request to VISU_GaussPointsPL::SetSize.
     void
-    SetGeomSize(float theGeomSize);
+    SetGeomSize(vtkFloatingPointType theGeomSize);
 
     //! Redirect the request to VISU_GaussPointsPL::GetSize.
-    float 
+    vtkFloatingPointType 
     GetGeomSize();
 
     //! Redirect the request to VISU_GaussPointsPL::SetMinSize.
     void
-    SetMinSize(float theMinSize);
+    SetMinSize(vtkFloatingPointType theMinSize);
 
     //! Redirect the request to VISU_GaussPointsPL::GetMinSize.
-    float 
+    vtkFloatingPointType 
     GetMinSize();
 
     //! Redirect the request to VISU_GaussPointsPL::SetMaxSize.
     void
-    SetMaxSize(float theMaxSize);
+    SetMaxSize(vtkFloatingPointType theMaxSize);
 
     //! Redirect the request to VISU_GaussPointsPL::GetMaxSize.
-    float 
+    vtkFloatingPointType 
     GetMaxSize();
 
     //! Redirect the request to VISU_GaussPointsPL::SetMagnification.
     void
-    SetMagnification(float theMagnification);
+    SetMagnification(vtkFloatingPointType theMagnification);
 
     //! Redirect the request to VISU_GaussPointsPL::GetMagnification.
-    float
+    vtkFloatingPointType
     GetMagnification();
 
     //! Redirect the request to VISU_GaussPointsPL::SetMagnificationIncrement.
     void
-    SetMagnificationIncrement(float theIncrement);
+    SetMagnificationIncrement(vtkFloatingPointType theIncrement);
 
     //! Redirect the request to VISU_GaussPointsPL::GetMagnificationIncrement.
-    float
+    vtkFloatingPointType
     GetMagnificationIncrement();
 
     //! Set flag indicating which scalar bar is active.
@@ -231,10 +231,10 @@ namespace VISU
 
     //! Set value of the distance between global and local scalar bars.
     void
-    SetSpacing(const float theSpacing);
+    SetSpacing(const vtkFloatingPointType theSpacing);
 
     //! Get value of the distance between global and local scalar bars.
-    float
+    vtkFloatingPointType
     GetSpacing() const;
 
     //! Let know is the global range is already calculated
@@ -280,7 +280,7 @@ namespace VISU
     bool myIsDispGlobalScalarBar;
     bool myIsActiveLocalScalarBar;
     QColor myColor;
-    float mySpacing;
+    vtkFloatingPointType mySpacing;
     int myFaceLimit;
 
     QString myMainTexture;
index 4198c8a6497849222fb098c9207f99461cea2058..eac046c3284345a74253a7bd3369366ee9555ae1 100644 (file)
@@ -115,8 +115,9 @@ CORBA::Long VISU::IsoSurfaces_i::GetNbSurfaces(){
 }
 
 
-void VISU::IsoSurfaces_i::SetSubRange(CORBA::Double theMin, CORBA::Double theMax){ 
-  float aRange[2] = {theMin, theMax};
+void VISU::IsoSurfaces_i::SetSubRange(CORBA::Double theMin, CORBA::Double theMax)
+{ 
+  vtkFloatingPointType aRange[2] = {theMin, theMax};
   myIsoSurfacesPL->SetRange(aRange);
 }
 CORBA::Double VISU::IsoSurfaces_i::GetSubMin(){
index 1bdd88b8620cfb67340c3e95225f5072df705be1..c00463849e1a23d0e2d5f1a82fd9577a0cd145b4 100644 (file)
@@ -252,7 +252,7 @@ VISU::Prs3d_i
 
     theActor->SetPrs3d(this);
     theActor->SetShrinkFactor();
-    theActor->SetPosition(myOffset);
+    theActor->SetPosition(myOffset[0],myOffset[1],myOffset[2]);
     theActor->SetPipeLine(GetPipeLine());
 
     theActor->SetFactory(this);
@@ -295,7 +295,7 @@ VISU::Prs3d_i
 {
   if(MYDEBUG) MESSAGE("Prs3d_i::UpdateActor - this = "<<this<<"; theActor = "<<theActor);
   theActor->ShallowCopyPL(myPipeLine);
-  theActor->SetPosition(myOffset);
+  theActor->SetPosition(myOffset[0],myOffset[1],myOffset[2]);
   theActor->Modified();
 }
 
@@ -342,7 +342,9 @@ GetClippingPlane(vtkIdType theID) const
 
 void
 VISU::Prs3d_i
-::SetPlaneParam (float theDir[3], float theDist, vtkPlane* thePlane) 
+::SetPlaneParam (vtkFloatingPointType theDir[3], 
+                vtkFloatingPointType theDist, 
+                vtkPlane* thePlane) 
 {
   myPipeLine->SetPlaneParam(theDir, theDist, thePlane);
 }
@@ -351,14 +353,14 @@ VISU::Prs3d_i
 //----------------------------------------------------------------------------
 void
 VISU::Prs3d_i
-::GetBounds(float aBounds[6])
+::GetBounds(vtkFloatingPointType aBounds[6])
 {
   myPipeLine->GetMapper()->GetBounds(aBounds);
 }
 
 void 
 VISU::Prs3d_i
-::SetOffset(const float* theOffsets)
+::SetOffset(const CORBA::Float* theOffsets)
 {
   myOffset[0] = theOffsets[0];
   myOffset[1] = theOffsets[1];
@@ -367,7 +369,9 @@ VISU::Prs3d_i
 
 void
 VISU::Prs3d_i
-::SetOffset(float theDx, float theDy, float theDz)
+::SetOffset(CORBA::Float theDx, 
+           CORBA::Float theDy, 
+           CORBA::Float theDz)
 {
   myOffset[0] = theDx;
   myOffset[1] = theDy;
@@ -376,7 +380,7 @@ VISU::Prs3d_i
 
 void
 VISU::Prs3d_i
-::GetOffset(float* theOffsets)
+::GetOffset(CORBA::Float* theOffsets)
 {
   theOffsets[0] = myOffset[0];
   theOffsets[1] = myOffset[1];
@@ -385,7 +389,9 @@ VISU::Prs3d_i
 
 void 
 VISU::Prs3d_i
-::GetOffset(float& theDx, float& theDy, float& theDz)
+::GetOffset(CORBA::Float& theDx, 
+           CORBA::Float& theDy, 
+           CORBA::Float& theDz)
 {
   theDx = myOffset[0];
   theDy = myOffset[1];
index c83955f5bd1c983865b51111269a06ff7371c9ed..c7206654815966f7e7ce3ed1016effce6e9c5931 100644 (file)
@@ -184,25 +184,31 @@ namespace VISU
     GetClippingPlane(vtkIdType theID) const;
 
     void
-    SetPlaneParam(float theDir[3], float theDist, vtkPlane* thePlane);
+    SetPlaneParam(vtkFloatingPointType theDir[3], 
+                 vtkFloatingPointType theDist, 
+                 vtkPlane* thePlane);
 
     //----------------------------------------------------------------------------
     void
-    GetBounds(float aBounds[6]);
+    GetBounds(vtkFloatingPointType aBounds[6]);
 
     void
-    SetOffset(const float* theOffsets);
+    SetOffset(const CORBA::Float* theOffsets);
 
     virtual
     void
-    SetOffset(float theDx, float theDy, float theDz);
+    SetOffset(CORBA::Float theDx, 
+             CORBA::Float theDy, 
+             CORBA::Float theDz);
 
     void
-    GetOffset(float* theOffsets);
+    GetOffset(CORBA::Float* theOffsets);
 
     virtual
     void
-    GetOffset(float& theDx, float& theDy, float& theDz);
+    GetOffset(CORBA::Float& theDx, 
+             CORBA::Float& theDy, 
+             CORBA::Float& theDz);
 
     //----------------------------------------------------------------------------
   protected:
@@ -220,7 +226,7 @@ namespace VISU
     CheckDataSet();
 
     bool myAddToStudy;
-    float myOffset[3];
+    CORBA::Float myOffset[3];
     Result_i *myResult;
     VISU_PipeLine *myPipeLine;
     SALOMEDS::SObject_var mySObject;
index e75c21f1804e494c7cdec585b7ad5a4e8ddb125a..60cb15c822fc3282fdf29da47f872319f8970592 100644 (file)
@@ -1571,11 +1571,13 @@ VISU::Result_i
 //function : GetAxisInfo
 //purpose  :
 //=======================================================================
-const vector< float >* Result_i::GetAxisInfo(const string& theMeshName,
-                                             TAxis         theAxis,
-                                             gp_Dir&       thePlaneNormal)
+const Result_i::TAxisInfo* 
+Result_i
+::GetAxisInfo(const string& theMeshName,
+             TAxis         theAxis,
+             gp_Dir&       thePlaneNormal)
 {
-  const vector< float >* components = NULL;
+  const TAxisInfo* components = NULL;
 
   if ( theAxis < AXIS_X || theAxis > AXIS_Z ) {
     MESSAGE(" Bad axis index " << theAxis );
@@ -1621,7 +1623,7 @@ const vector< float >* Result_i::GetAxisInfo(const string& theMeshName,
       if ( nbPnt != 8 )
         continue;
       vtkPoints * points = cell->GetPoints();
-      float* coords[ 4 ];
+      vtkFloatingPointType* coords[ 4 ];
       coords[0] = points->GetPoint( 0 );
       coords[1] = points->GetPoint( 1 );
       coords[2] = points->GetPoint( 3 );
@@ -1629,10 +1631,10 @@ const vector< float >* Result_i::GetAxisInfo(const string& theMeshName,
       gp_Pnt p0( coords[0][0], coords[0][1], coords[0][2] );
       for ( iAx = 0; iAx < nbAxes; ++iAx )
       {
-        float* coo = coords[ iAx + 1 ];
+        vtkFloatingPointType* coo = coords[ iAx + 1 ];
         gp_Pnt p( coo[0], coo[1], coo[2] );
         // min size
-        float size = p0.SquareDistance( p );
+        vtkFloatingPointType size = p0.SquareDistance( p );
         if ( size > FLT_MIN && size < minSize[ iAx ] )
           minSize[ iAx ] = size;
         // axis direction
@@ -1662,34 +1664,34 @@ const vector< float >* Result_i::GetAxisInfo(const string& theMeshName,
 
     // get and sort intermediate component values - projections of nodes
     // on axis direction; define bnd box
-    set< float > comps[ 3 ];
+    set< vtkFloatingPointType > comps[ 3 ];
     Bnd_Box box;
     vtkPoints * points = aMesh->GetPoints();
     vtkIdType iP, nbP = aMesh->GetNumberOfPoints();
     for ( iP = 0; iP < nbP; ++iP )
     {
-      float* coo = points->GetPoint( iP );
+      vtkFloatingPointType* coo = points->GetPoint( iP );
       gp_Pnt p( coo[0], coo[1], coo[2] );
       box.Add( p );
       for ( iAx = 0; iAx < nbAxes; ++iAx ) {
         const gp_Dir& dir = gInfo->myAxis[ iAx ];
-        float dot = dir.XYZ() * p.XYZ();
+        vtkFloatingPointType dot = dir.XYZ() * p.XYZ();
         comps[ iAx ].insert( dot );
       }
     }
 
     // find a range of projections of bnd box corners on each axis
-    float range[3], firstValue[3];
+    vtkFloatingPointType range[3], firstValue[3];
     double x[2],y[2],z[2];
     box.Get(x[0],y[0],z[0],x[1],y[1],z[1]);
     for ( iAx = 0; iAx < nbAxes; ++iAx ) {
-      set< float > bndComps;
+      set< vtkFloatingPointType > bndComps;
       const gp_Dir& dir = gInfo->myAxis[ iAx ];
       for ( int iX = 0; iX < 2; ++iX ) {
         for ( int iY = 0; iY < 2; ++iY ) {
           for ( int iZ = 0; iZ < 2; ++iZ ) {
             gp_Pnt p( x[ iX ], y[ iY ], z[ iZ ] );
-            float dot = dir.XYZ() * p.XYZ();
+            vtkFloatingPointType dot = dir.XYZ() * p.XYZ();
             bndComps.insert( dot );
           }
         }
@@ -1701,14 +1703,14 @@ const vector< float >* Result_i::GetAxisInfo(const string& theMeshName,
     // compute component values
     for ( iAx = 0; iAx < nbAxes; ++iAx )
     {
-      list< float > values;
+      list< vtkFloatingPointType > values;
       int nbVals = 0;
-      set< float >& comp = comps[ iAx ];
-      set< float >::iterator val = comp.begin();
-      float bnd = -1., rng = range[ iAx ], first = firstValue[ iAx ];
-      float tol = 0.1 * sqrt( minSize[ iAx ]) / rng;
+      set< vtkFloatingPointType >& comp = comps[ iAx ];
+      set< vtkFloatingPointType >::iterator val = comp.begin();
+      vtkFloatingPointType bnd = -1., rng = range[ iAx ], first = firstValue[ iAx ];
+      vtkFloatingPointType tol = 0.1 * sqrt( minSize[ iAx ]) / rng;
       for ( ; val != comp.end(); ++val ) {
-        float value = ( *val - first ) / rng;
+        vtkFloatingPointType value = ( *val - first ) / rng;
         if ( value > bnd ) {
           values.push_back( value );
           bnd = value + tol;
@@ -1716,9 +1718,9 @@ const vector< float >* Result_i::GetAxisInfo(const string& theMeshName,
         }
       }
       // store values in gInfo
-      vector< float >& myComp = gInfo->myComponets[ iAx ];
+      vector< vtkFloatingPointType >& myComp = gInfo->myComponets[ iAx ];
       myComp.resize( nbVals );
-      list< float >::iterator v = values.begin();
+      list< vtkFloatingPointType >::iterator v = values.begin();
       for ( int i = 0; v != values.end(); ++v )
         myComp[ i++ ] = *v;
     }
index 27ec5e085c7b347531dd12f9205f55d70fc9592d..7afaf9b43887a2502247990bab1a2c89d44f0893 100644 (file)
@@ -31,6 +31,7 @@
 #include "VISU_BoostSignals.h"
 #include "SALOME_GenericObj_i.hh"
 
+#include <vtkSystemIncludes.h>
 #include <gp_Dir.hxx>
 #include <vector>
 
@@ -175,17 +176,18 @@ namespace VISU
     // Info on structured mesh contained in TInput
   public:
     typedef enum { AXIS_X = 0, AXIS_Y, AXIS_Z } TAxis;
-    const std::vector< float >* GetAxisInfo(const std::string& theMeshName,
-                                            TAxis              theAxis,
-                                            gp_Dir&            thePlaneNormal);
+    typedef std::vector< vtkFloatingPointType > TAxisInfo;
+    const TAxisInfo* GetAxisInfo(const std::string& theMeshName,
+                                TAxis              theAxis,
+                                gp_Dir&            thePlaneNormal);
     // Return i,j or k values and cutting plane normal for theAxis.
     // In the case of any problems, return NULL pointer
   private:
     struct TGridInfo {
-      std::vector< float > myComponets[ 3 ];
-      gp_Dir               myAxis     [ 3 ];
+      TAxisInfo myComponets[ 3 ];
+      gp_Dir    myAxis     [ 3 ];
     };
-    map< string, TGridInfo > myMeshName2GridInfoMap;
+    std::map< std::string, TGridInfo > myMeshName2GridInfoMap;
   };
 
   Result_var FindResult(SALOMEDS::SObject_ptr theSObject);
index c9ee0e66a3ef620730f2b000c646bca08f5e333d..2639b5b7078a723abdadd94501c42008d6000639 100644 (file)
@@ -193,20 +193,20 @@ CORBA::Double VISU::ScalarMapOnDeformedShape_i::GetScale(){
 }
 
 void VISU::ScalarMapOnDeformedShape_i::SetSourceRange(CORBA::Double theMinRange,CORBA::Double theMaxRange){
-  float aRange[2];
-  aRange[0] = float(theMinRange);
-  aRange[1] = float(theMaxRange);
+  vtkFloatingPointType aRange[2];
+  aRange[0] = vtkFloatingPointType(theMinRange);
+  aRange[1] = vtkFloatingPointType(theMaxRange);
   myScalarMapOnDeformedShapePL->SetScalarRange(aRange);
 }
 
 CORBA::Double VISU::ScalarMapOnDeformedShape_i::GetSourceRangeMin(){
-  float aRange[2];
+  vtkFloatingPointType aRange[2];
   myScalarMapOnDeformedShapePL->GetSourceRange(aRange);
   return aRange[0];
 }
 
 CORBA::Double VISU::ScalarMapOnDeformedShape_i::GetSourceRangeMax(){
-  float aRange[2];
+  vtkFloatingPointType aRange[2];
   myScalarMapOnDeformedShapePL->GetSourceRange(aRange);
   return aRange[1];
 }
@@ -251,8 +251,8 @@ void VISU::ScalarMapOnDeformedShape_i::UpdateActor(VISU_Actor* theActor) {
 
 void VISU::ScalarMapOnDeformedShape_i::SetScalarField(const char* theMeshName,
                                                      const char* theFieldName,
-                                                     const int   theIteration,
-                                                     const VISU::TEntity  theEntity)
+                                                     int   theIteration,
+                                                     VISU::TEntity  theEntity)
 {
   if(MYDEBUG) cout << "VISU::ScalarMapOnDeformedShape_i::SetScalarField:"<<__LINE__<<endl;
   if(MYDEBUG) cout << "\ttheFieldName="<<theFieldName<<endl;
@@ -273,8 +273,8 @@ void VISU::ScalarMapOnDeformedShape_i::SetScalarField(const char* theMeshName,
 
 void VISU::ScalarMapOnDeformedShape_i::SetScalarField(const char* theMeshName,
                                                      const char* theFieldName,
-                                                     const long  theIteration,
-                                                     const VISU::Entity  theEntity)
+                                                     CORBA::Long  theIteration,
+                                                     VISU::Entity  theEntity)
 {
   this->SetScalarField(theMeshName,theFieldName,(int)theIteration,VISU::TEntity(theEntity));
 }
index cdd1444a3589335c5f2d97d197f4842c3e22ffc3..ff5f4aa1d5f9ef3f7978684eae991b9aa315d2b1 100644 (file)
@@ -121,13 +121,13 @@ namespace VISU{
 
     virtual void SetScalarField(const char* theMeshName,
                                const char* theFieldName,
-                               const int   theIteration,
-                               const VISU::TEntity  theEntity);
+                               int   theIteration,
+                               VISU::TEntity  theEntity);
     
     virtual void SetScalarField(const char* theMeshName,
                                const char* theFieldName,
-                               const long  theIteration,
-                               const VISU::Entity  theEntity);
+                               CORBA::Long  theIteration,
+                               VISU::Entity  theEntity);
 
     virtual void SetScalarFieldName(const char* theName);
     virtual std::string GetScalarFieldName();
index 19bdd8dab31163858924ebdc0938cf4ea1906f39..ec5e160ba5f3ca9bb6cc33b88c5643c90110a612 100644 (file)
@@ -240,7 +240,7 @@ VISU::ScalarMap_i
 {
   if(theMin > theMax) 
     return;
-  float aScalarRange[2] = {theMin, theMax};
+  vtkFloatingPointType aScalarRange[2] = {theMin, theMax};
   myScalarMapPL->SetScalarRange(aScalarRange);
   myIsFixedRange = true;
 }
@@ -339,14 +339,14 @@ VISU::ScalarMap_i
 
     vtkTextProperty* aTitleProp = aScalarBar->GetTitleTextProperty();
     aTitleProp->SetFontFamily(myTitFontType);
-    aTitleProp->SetColor(myTitleColor);
+    aTitleProp->SetColor(myTitleColor[0],myTitleColor[1],myTitleColor[2]);
     (myIsBoldTitle)? aTitleProp->BoldOn() : aTitleProp->BoldOff();
     (myIsItalicTitle)? aTitleProp->ItalicOn() : aTitleProp->ItalicOff();
     (myIsShadowTitle)? aTitleProp->ShadowOn() : aTitleProp->ShadowOff();
 
     vtkTextProperty* aLabelProp = aScalarBar->GetLabelTextProperty();
     aLabelProp->SetFontFamily(myLblFontType);
-    aLabelProp->SetColor(myLabelColor);
+    aLabelProp->SetColor(myLabelColor[0],myLabelColor[1],myLabelColor[2]);
     (myIsBoldLabel)? aLabelProp->BoldOn() : aLabelProp->BoldOff();
     (myIsItalicLabel)? aLabelProp->ItalicOn() : aLabelProp->ItalicOff();
     (myIsShadowLabel)? aLabelProp->ShadowOn() : aLabelProp->ShadowOff();
index bb1925a80348bf7b1432a6fc46fe849038347d3f..a090a1db9abd0abaf3913fabfbe7d089f74d91d6 100644 (file)
@@ -20,7 +20,8 @@
 class SVTK_ViewWindow;
 class VISU_Actor;
 
-namespace VISU{
+namespace VISU
+{
   class Result_i;
   class ColoredPrs3d_i;
 }
@@ -34,7 +35,7 @@ struct FieldData
   std::vector<VISU::ColoredPrs3d_i*> myPrs;     // Presentations
   std::vector<VISU_Actor*> myActors;         // Actors
   std::vector<double> myTiming;              // time values
-  float myOffset[3];
+  CORBA::Float myOffset[3];
 };
 
 
index 57a37098107b80b087638d1b0536d23cd2899dfe..06a3893d3b73242adb2b53de58333ab2c144944e 100644 (file)
@@ -1520,7 +1520,7 @@ namespace VISU {
       }else{
        if(SUIT_ViewManager* aViewManager = myApplication->activeViewManager()){
          if(SUIT_ViewWindow* aView = aViewManager->getActiveView()){
-           if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aView)){
+           if(dynamic_cast<SVTK_ViewWindow*>(aView)){
              myView3D->myViewManager = aViewManager;
              myResult = aViewManager->getActiveView();
            }
@@ -1759,7 +1759,7 @@ namespace VISU {
   {
     Storable::DataToStream(theStr,"myType",VISU::TVIEW3D);
 
-    float backint[3];
+    vtkFloatingPointType backint[3];
     GetRenderer(theViewWindow)->GetBackground(backint);
     Storable::DataToStream(theStr,"myColor.R",backint[0]);
     Storable::DataToStream(theStr,"myColor.G",backint[1]);
@@ -1847,7 +1847,7 @@ namespace VISU {
   SALOMEDS::Color View3D_i::GetBackground (SUIT_ViewWindow* theViewWindow)
   {
     SALOMEDS::Color aColor;
-    float backint[3];
+    vtkFloatingPointType backint[3];
     GetRenderer(theViewWindow)->GetBackground(backint);
     aColor.R = backint[0];  aColor.G = backint[1];  aColor.B = backint[2];
     return aColor;
index ba84802508a95def37779c879067577ce3b3440e..ad1f525b0e3b95b316942f3c34d6418c3d7fb7e2 100644 (file)
@@ -55,8 +55,6 @@ VVTK_PickingDlg::VVTK_PickingDlg( QWidget* parent, const char* name )
   myEventCallbackCommand->SetClientData(this); 
   myEventCallbackCommand->SetCallback(VVTK_PickingDlg::ProcessEvents);
 
-  SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
-
   setCaption( tr( "PICKING_DLG_TITLE" ) );
   setSizeGripEnabled(TRUE);
 
@@ -258,7 +256,7 @@ void VVTK_PickingDlg::Update()
     myStepNumberSpinBox->setValue( myPickingSettings->GetStepNumber() );
     myDisplayParentMeshCheckBox->setChecked( myPickingSettings->GetDisplayParentMesh() );
 
-    float* aColor = myPickingSettings->GetColor();
+    vtkFloatingPointType* aColor = myPickingSettings->GetColor();
     mySelectionColorButton->setPaletteBackgroundColor( QColor( ( int )( aColor[0] * 255.0 ),
                                                               ( int )( aColor[1] * 255.0 ),
                                                               ( int )( aColor[2] * 255.0 ) ) );
@@ -357,7 +355,7 @@ void VVTK_PickingDlg::onClickApply()
   myPickingSettings->SetDisplayParentMesh( myDisplayParentMeshCheckBox->isChecked() );
 
   QColor aButtonColor = mySelectionColorButton->paletteBackgroundColor();
-  float aColor[3];
+  vtkFloatingPointType aColor[3];
   aColor[0] = aButtonColor.red() / 255.0;
   aColor[1] = aButtonColor.green() / 255.0;
   aColor[2] = aButtonColor.blue() / 255.0;
index 6b49cc5c2922005c453edb9e160a8260133def6f..8ea2c36e36141e78ff3e4023e51f3a56bef17973 100644 (file)
@@ -142,8 +142,6 @@ VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const c
                                      myEventCallbackCommand.GetPointer(), 
                                      myPriority);
 
-  SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
-
   setCaption( tr( "SEGMENTATION_CURSOR_DLG_TITLE" ) );
   setSizeGripEnabled(TRUE);
 
@@ -469,13 +467,13 @@ void VVTK_SegmentationCursorDlg::UpdateSegmentation()
     myRadiusGroup->hide();
 
     VISU_PlanesWidget *pPlanesWidget=myWidgetCtrl->GetPlanesWidget();
-    float origin[3];
+    vtkFloatingPointType origin[3];
     pPlanesWidget->GetOrigin( origin );
     myXOriginSpinBox->setValue( origin[0] );
     myYOriginSpinBox->setValue( origin[1] );
     myZOriginSpinBox->setValue( origin[2] );
 
-    float normal[3];
+    vtkFloatingPointType normal[3];
     pPlanesWidget->GetNormal( normal );
     myDXDirectionSpinBox->setValue( normal[0] );
     myDYDirectionSpinBox->setValue( normal[1] );
@@ -490,7 +488,7 @@ void VVTK_SegmentationCursorDlg::UpdateSegmentation()
     myRadiusGroup->show();
     
     VISU_SphereWidget *pSphereWidget=myWidgetCtrl->GetSphereWidget();
-    float origin[3], aRadius;
+    vtkFloatingPointType origin[3], aRadius;
     pSphereWidget->GetCenter(origin);
     myXOriginSpinBox->setValue( origin[0] );
     myYOriginSpinBox->setValue( origin[1] );
@@ -504,15 +502,15 @@ void VVTK_SegmentationCursorDlg::UpdateSegmentation()
 void VVTK_SegmentationCursorDlg::UpdateInsideGaussPoints()
 {
   int aPrimitiveType = VISU_OpenGLPointSpriteMapper::PointSprite;
-  float aClamp = 200.0;
+  vtkFloatingPointType aClamp = 200.0;
   QString aMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_texture.bmp";
   QString anAlphaTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_alpha.bmp";
-  float anAlphaThreshold = 0.1;
+  vtkFloatingPointType anAlphaThreshold = 0.1;
   int aResolution = 8;
   int aMinSize = 3;
   int aMaxSize = 33;
   int aMagnification = 100;
-  float anIncrement = 2.0;
+  vtkFloatingPointType anIncrement = 2.0;
 
   if( !myInsideCursorSettings->GetInitial() )
   {
@@ -571,11 +569,11 @@ void VVTK_SegmentationCursorDlg::UpdateInsideGaussPoints()
 
 void VVTK_SegmentationCursorDlg::UpdateOutsideGaussPoints()
 {
-  float aClamp = 256.0;
+  vtkFloatingPointType aClamp = 256.0;
   int aPrimitiveType = VISU_OpenGLPointSpriteMapper::PointSprite;
   QString aMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_texture.bmp";
   QString anAlphaTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_alpha.bmp";
-  float anAlphaThreshold = 0.1;
+  vtkFloatingPointType anAlphaThreshold = 0.1;
   int aResolution = 8;
   int aSize = 25;
   bool aUniform = false;
@@ -593,7 +591,7 @@ void VVTK_SegmentationCursorDlg::UpdateOutsideGaussPoints()
     myOutsideSizeBox->setOutsideSize( myOutsideCursorSettings->GetSize() );
     myOutsideSizeBox->setUniform( myOutsideCursorSettings->GetUniform() );
 
-    float* aColor = myOutsideCursorSettings->GetColor();
+    vtkFloatingPointType* aColor = myOutsideCursorSettings->GetColor();
     myOutsideSizeBox->setColor( QColor( ( int )( aColor[0] * 255.0 ),
                                        ( int )( aColor[1] * 255.0 ),
                                        ( int )( aColor[2] * 255.0 ) ) );
@@ -702,13 +700,13 @@ void VVTK_SegmentationCursorDlg::ApplySegmentationCursor()
   if( myIsPlaneSegmentation )
   {
     VISU_PlanesWidget *pPlanesWidget=myWidgetCtrl->GetPlanesWidget();
-    float origin[3];
+    vtkFloatingPointType origin[3];
     origin[0] = myXOriginSpinBox->value();
     origin[1] = myYOriginSpinBox->value();
     origin[2] = myZOriginSpinBox->value();
     pPlanesWidget->SetOrigin( origin );
 
-    float normal[3];
+    vtkFloatingPointType normal[3];
     normal[0] = myDXDirectionSpinBox->value();
     normal[1] = myDYDirectionSpinBox->value();
     normal[2] = myDZDirectionSpinBox->value();
@@ -728,7 +726,7 @@ void VVTK_SegmentationCursorDlg::ApplySegmentationCursor()
   else
   {
     VISU_SphereWidget *pSphereWidget=myWidgetCtrl->GetSphereWidget();
-    float origin[3], aRadius;
+    vtkFloatingPointType origin[3], aRadius;
     origin[0] = myXOriginSpinBox->value();
     origin[1] = myYOriginSpinBox->value();
     origin[2] = myZOriginSpinBox->value();
@@ -787,7 +785,7 @@ void VVTK_SegmentationCursorDlg::ApplyOutsideGaussPoints()
   myOutsideCursorSettings->SetUniform( myOutsideSizeBox->getUniform() );
 
   QColor aButtonColor = myOutsideSizeBox->getColor();
-  float aColor[3];
+  vtkFloatingPointType aColor[3];
   aColor[0] = aButtonColor.red() / 255.0;
   aColor[1] = aButtonColor.green() / 255.0;
   aColor[2] = aButtonColor.blue() / 255.0;
index 654b69a7f5cf6149fa9fb7f35d22fbf985421ac0..5adfe3bec55d3ef80397dbc1be9a6ca9b8c3b1f5 100644 (file)
@@ -48,8 +48,6 @@ using namespace std;
 VVTK_SizeBox::VVTK_SizeBox( QWidget* parent ) :
   QVBox( parent )
 {
-  SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
-
   layout()->setSpacing( 0 );
   layout()->setMargin( 0 );