From a2b31d871bd4b534ff55fb17d2d3f3561371b19a Mon Sep 17 00:00:00 2001 From: ouv Date: Fri, 1 Feb 2013 11:00:41 +0000 Subject: [PATCH] Porting to VTK 6. Compilation with ParaView built without option "-DVTK_LEGACY_REMOVE:BOOL=OFF". --- src/CONVERTOR/VISUConvertor.cxx | 2 +- src/CONVERTOR/VISU_AppendFilter.cxx | 1 - src/CONVERTOR/VISU_AppendFilter.hxx | 4 +- src/CONVERTOR/VISU_AppendPolyData.cxx | 1 - src/CONVERTOR/VISU_AppendPolyData.hxx | 4 +- src/CONVERTOR/VISU_ConvertorUtils.cxx | 2 +- src/CONVERTOR/VISU_ConvertorUtils.hxx | 2 +- src/CONVERTOR/VISU_Convertor_impl.cxx | 84 +++---- src/CONVERTOR/VISU_GaussMergeFilter.cxx | 2 +- src/CONVERTOR/VISU_IDMapper.cxx | 2 +- src/CONVERTOR/VISU_IDMapper.hxx | 2 +- src/CONVERTOR/VISU_MedConvertor.cxx | 58 ++--- src/CONVERTOR/VISU_MergeFilterUtilities.cxx | 4 +- src/CONVERTOR/VISU_PointCoords.cxx | 2 +- src/CONVERTOR/VISU_Structures.hxx | 2 +- src/CONVERTOR/VISU_Structures_impl.cxx | 8 +- src/CONVERTOR/VISU_Structures_impl.hxx | 6 +- src/CONVERTOR/VISU_Vtk2MedConvertor.cxx | 2 +- src/OBJECT/VISU_Actor.cxx | 68 +++--- src/OBJECT/VISU_Actor.h | 20 +- src/OBJECT/VISU_ActorBase.cxx | 8 +- src/OBJECT/VISU_ActorBase.h | 8 +- src/OBJECT/VISU_GaussPtsAct.cxx | 84 +++---- src/OBJECT/VISU_GaussPtsAct.h | 18 +- src/OBJECT/VISU_GaussPtsDeviceActor.cxx | 36 +-- src/OBJECT/VISU_GaussPtsDeviceActor.h | 32 +-- src/OBJECT/VISU_GaussPtsSettings.h | 48 ++-- src/OBJECT/VISU_MeshAct.cxx | 12 +- src/OBJECT/VISU_MeshAct.h | 12 +- src/OBJECT/VISU_PickingSettings.cxx | 2 +- src/OBJECT/VISU_PickingSettings.h | 36 +-- src/OBJECT/VISU_ScalarMapAct.cxx | 28 +-- src/OBJECT/VISU_ScalarMapAct.h | 16 +- src/PIPELINE/SALOME_ExtractGeometry.cxx | 6 +- .../SALOME_ExtractPolyDataGeometry.cxx | 6 +- src/PIPELINE/VISUPipeLine.cxx | 6 +- src/PIPELINE/VISU_CellDataToPointData.cxx | 1 - src/PIPELINE/VISU_CellDataToPointData.hxx | 2 +- src/PIPELINE/VISU_ColoredPL.cxx | 32 +-- src/PIPELINE/VISU_ColoredPL.hxx | 16 +- src/PIPELINE/VISU_CutLinesBasePL.hxx | 16 +- src/PIPELINE/VISU_CutLinesPL.cxx | 28 +-- src/PIPELINE/VISU_CutLinesPL.hxx | 14 +- src/PIPELINE/VISU_CutPlanesPL.cxx | 92 +++---- src/PIPELINE/VISU_CutPlanesPL.hxx | 66 ++--- src/PIPELINE/VISU_CutSegmentPL.cxx | 42 ++-- src/PIPELINE/VISU_CutSegmentPL.hxx | 28 +-- src/PIPELINE/VISU_DataSetMapperHolder.cxx | 4 +- src/PIPELINE/VISU_DataSetMapperHolder.hxx | 2 +- src/PIPELINE/VISU_DeformationPL.cxx | 14 +- src/PIPELINE/VISU_DeformationPL.hxx | 12 +- src/PIPELINE/VISU_DeformedGridPL.cxx | 14 +- src/PIPELINE/VISU_DeformedGridPL.hxx | 10 +- .../VISU_DeformedShapeAndScalarMapPL.cxx | 12 +- .../VISU_DeformedShapeAndScalarMapPL.hxx | 16 +- src/PIPELINE/VISU_DeformedShapePL.cxx | 24 +- src/PIPELINE/VISU_DeformedShapePL.hxx | 14 +- src/PIPELINE/VISU_ElnoDisassembleFilter.cxx | 12 +- src/PIPELINE/VISU_ElnoDisassembleFilter.hxx | 6 +- src/PIPELINE/VISU_Extractor.cxx | 16 +- src/PIPELINE/VISU_FieldTransform.cxx | 42 ++-- src/PIPELINE/VISU_FieldTransform.hxx | 10 +- src/PIPELINE/VISU_GaussPointsPL.cxx | 96 ++++---- src/PIPELINE/VISU_GaussPointsPL.hxx | 74 +++--- src/PIPELINE/VISU_ImplicitFunctionWidget.cxx | 21 +- src/PIPELINE/VISU_ImplicitFunctionWidget.hxx | 8 +- src/PIPELINE/VISU_IsoSurfacesPL.cxx | 22 +- src/PIPELINE/VISU_IsoSurfacesPL.hxx | 14 +- src/PIPELINE/VISU_LookupTable.cxx | 58 ++--- src/PIPELINE/VISU_LookupTable.hxx | 14 +- src/PIPELINE/VISU_MapperHolder.cxx | 2 +- src/PIPELINE/VISU_MapperHolder.hxx | 2 +- src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx | 13 +- src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx | 2 +- src/PIPELINE/VISU_PipeLine.cxx | 18 +- src/PIPELINE/VISU_PipeLine.hxx | 14 +- src/PIPELINE/VISU_PipeLineUtils.cxx | 76 +++--- src/PIPELINE/VISU_PipeLineUtils.hxx | 52 ++-- src/PIPELINE/VISU_PlanesWidget.cxx | 131 +++++----- src/PIPELINE/VISU_PlanesWidget.hxx | 42 ++-- src/PIPELINE/VISU_Plot3DPL.cxx | 62 ++--- src/PIPELINE/VISU_Plot3DPL.hxx | 32 +-- src/PIPELINE/VISU_PolyDataMapperHolder.cxx | 2 +- src/PIPELINE/VISU_PolyDataMapperHolder.hxx | 2 +- src/PIPELINE/VISU_ScalarBarActor.cxx | 30 ++- src/PIPELINE/VISU_ScalarBarActor.hxx | 6 +- src/PIPELINE/VISU_ScalarBarCtrl.cxx | 38 +-- src/PIPELINE/VISU_ScalarBarCtrl.hxx | 38 +-- src/PIPELINE/VISU_ScalarMapPL.cxx | 2 +- src/PIPELINE/VISU_ScalarMapPL.hxx | 2 +- src/PIPELINE/VISU_SphereWidget.cxx | 29 ++- src/PIPELINE/VISU_SphereWidget.hxx | 28 +-- src/PIPELINE/VISU_StreamLine.cxx | 1 - src/PIPELINE/VISU_StreamLine.hxx | 2 +- src/PIPELINE/VISU_StreamLinesPL.cxx | 228 +++++++++--------- src/PIPELINE/VISU_StreamLinesPL.hxx | 100 ++++---- src/PIPELINE/VISU_Streamer.cxx | 2 - src/PIPELINE/VISU_Streamer.hxx | 2 +- src/PIPELINE/VISU_VectorsPL.cxx | 6 +- src/PIPELINE/VISU_VectorsPL.hxx | 6 +- src/PIPELINE/VISU_WidgetCtrl.cxx | 15 +- src/PIPELINE/VISU_WidgetCtrl.hxx | 18 +- src/PIPELINE/VISU_XYPlotActor.cxx | 1 - src/PIPELINE/VISU_XYPlotActor.hxx | 2 +- src/VISUGUI/VisuGUI_ClippingDlg.cxx | 48 ++-- src/VISUGUI/VisuGUI_CutLinesDlg.cxx | 12 +- src/VISUGUI/VisuGUI_CutSegmentDlg.cxx | 14 +- src/VISUGUI/VisuGUI_GaussPointsDlg.cxx | 2 +- src/VISUGUI/VisuGUI_Module.cxx | 36 +-- src/VISUGUI/VisuGUI_OffsetDlg.cxx | 12 +- src/VISUGUI/VisuGUI_OffsetDlg.h | 16 +- src/VISUGUI/VisuGUI_Plot3DDlg.cxx | 14 +- src/VISUGUI/VisuGUI_Prs3dDlg.cxx | 20 +- src/VISUGUI/VisuGUI_SelectionPanel.cxx | 8 +- src/VISUGUI/VisuGUI_SelectionPanel.h | 6 +- src/VISUGUI/VisuGUI_SelectionPrefDlg.cxx | 6 +- src/VISUGUI/VisuGUI_Table3dDlg.cxx | 2 +- src/VISUGUI/VisuGUI_TimeAnimation.cxx | 52 ++-- src/VISUGUI/VisuGUI_TimeAnimation.h | 2 +- src/VISUGUI/VisuGUI_Tools.cxx | 22 +- src/VISUGUI/VisuGUI_Tools.h | 2 +- src/VISUGUI/VisuGUI_ValuesLabelingDlg.cxx | 2 +- src/VISU_I/VISU_ColoredPrs3d_i.cc | 70 +++--- src/VISU_I/VISU_ColoredPrs3d_i.hh | 52 ++-- src/VISU_I/VISU_CutLinesBase_i.cc | 40 +-- src/VISU_I/VISU_CutLines_i.cc | 8 +- src/VISU_I/VISU_CutPlanes_i.cc | 4 +- src/VISU_I/VISU_Deformation_i.cc | 2 +- .../VISU_DeformedShapeAndScalarMap_i.cc | 2 +- src/VISU_I/VISU_DeformedShape_i.cc | 2 +- src/VISU_I/VISU_Evolution.cxx | 10 +- src/VISU_I/VISU_Evolution.h | 8 +- src/VISU_I/VISU_GaussPoints_i.cc | 36 +-- src/VISU_I/VISU_GaussPoints_i.hh | 8 +- src/VISU_I/VISU_IsoSurfaces_i.cc | 4 +- src/VISU_I/VISU_Plot3D_i.cc | 4 +- src/VISU_I/VISU_PointMap3d_i.cc | 42 ++-- src/VISU_I/VISU_PointMap3d_i.hh | 30 +-- src/VISU_I/VISU_Prs3d_i.cc | 6 +- src/VISU_I/VISU_Prs3d_i.hh | 6 +- src/VISU_I/VISU_Result_i.cc | 46 ++-- src/VISU_I/VISU_Result_i.hh | 2 +- src/VISU_I/VISU_ScalarMap_i.cc | 8 +- src/VISU_I/VISU_ScalarMap_i.hh | 4 +- src/VISU_I/VISU_TimeAnimation.cxx | 8 +- src/VISU_I/VISU_View_i.cc | 14 +- 146 files changed, 1585 insertions(+), 1599 deletions(-) diff --git a/src/CONVERTOR/VISUConvertor.cxx b/src/CONVERTOR/VISUConvertor.cxx index e9b01f33..aff674d5 100644 --- a/src/CONVERTOR/VISUConvertor.cxx +++ b/src/CONVERTOR/VISUConvertor.cxx @@ -109,7 +109,7 @@ void ParseMEDFile(const char* theFileName) for(int anCellId = 0; anCellId < aNbCells; anCellId++){ VISU::TGaussPointID anObjID = aGaussMesh->GetObjID(anCellId); cout<GetNodeVTKID(anObjID.first)<GetNodeCoord(anCellId); + double* aCoord = aGaussMesh->GetNodeCoord(anCellId); cout< //--------------------------------------------------------------- -vtkCxxRevisionMacro(VISU_AppendFilter, "$Revision$"); vtkStandardNewMacro(VISU_AppendFilter); diff --git a/src/CONVERTOR/VISU_AppendFilter.hxx b/src/CONVERTOR/VISU_AppendFilter.hxx index e4bb91ac..c48924d2 100644 --- a/src/CONVERTOR/VISU_AppendFilter.hxx +++ b/src/CONVERTOR/VISU_AppendFilter.hxx @@ -35,10 +35,10 @@ public: */ static VISU_AppendFilter *New(); - /*! \fn vtkTypeRevisionMacro(VISU_AppendFilter, vtkAppendFilter) + /*! \fn vtkTypeMacro(VISU_AppendFilter, vtkAppendFilter) * \brief VTK type revision macros. */ - vtkTypeRevisionMacro(VISU_AppendFilter, vtkAppendFilter); + vtkTypeMacro(VISU_AppendFilter, vtkAppendFilter); protected: /*! \fn VISU_AppendFilter(); diff --git a/src/CONVERTOR/VISU_AppendPolyData.cxx b/src/CONVERTOR/VISU_AppendPolyData.cxx index bd6d8817..0c8334da 100644 --- a/src/CONVERTOR/VISU_AppendPolyData.cxx +++ b/src/CONVERTOR/VISU_AppendPolyData.cxx @@ -31,7 +31,6 @@ #include //--------------------------------------------------------------- -vtkCxxRevisionMacro(VISU_AppendPolyData, "$Revision$"); vtkStandardNewMacro(VISU_AppendPolyData); diff --git a/src/CONVERTOR/VISU_AppendPolyData.hxx b/src/CONVERTOR/VISU_AppendPolyData.hxx index d85d9d5a..49964111 100644 --- a/src/CONVERTOR/VISU_AppendPolyData.hxx +++ b/src/CONVERTOR/VISU_AppendPolyData.hxx @@ -37,10 +37,10 @@ public: */ static VISU_AppendPolyData *New(); - /*! \fn vtkTypeRevisionMacro(VTKViewer_AppendFilter, vtkAppendFilter) + /*! \fn vtkTypeMacro(VTKViewer_AppendFilter, vtkAppendFilter) * \brief VTK type revision macros. */ - vtkTypeRevisionMacro(VISU_AppendPolyData, vtkAppendPolyData); + vtkTypeMacro(VISU_AppendPolyData, vtkAppendPolyData); protected: /*! \fn VTKViewer_AppendFilter(); diff --git a/src/CONVERTOR/VISU_ConvertorUtils.cxx b/src/CONVERTOR/VISU_ConvertorUtils.cxx index 7a5606aa..86a41d5a 100644 --- a/src/CONVERTOR/VISU_ConvertorUtils.cxx +++ b/src/CONVERTOR/VISU_ConvertorUtils.cxx @@ -391,7 +391,7 @@ namespace VISU //--------------------------------------------------------------- - vtkFloatingPointType* + double* GetNodeCoord(vtkDataSet *theDataSet, vtkIdType theObjID) { vtkIdType aVTKID = GetNodeVTKID(theDataSet, theObjID); diff --git a/src/CONVERTOR/VISU_ConvertorUtils.hxx b/src/CONVERTOR/VISU_ConvertorUtils.hxx index ae2160d9..7c38ccd6 100644 --- a/src/CONVERTOR/VISU_ConvertorUtils.hxx +++ b/src/CONVERTOR/VISU_ConvertorUtils.hxx @@ -136,7 +136,7 @@ namespace VISU //--------------------------------------------------------------- VISU_CONVERTOR_EXPORT - vtkFloatingPointType* + double* GetNodeCoord(vtkDataSet *theDataSet, vtkIdType theObjID); //--------------------------------------------------------------- diff --git a/src/CONVERTOR/VISU_Convertor_impl.cxx b/src/CONVERTOR/VISU_Convertor_impl.cxx index 814acd81..a5b7250a 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.cxx +++ b/src/CONVERTOR/VISU_Convertor_impl.cxx @@ -55,7 +55,7 @@ #include -static vtkFloatingPointType ERR_SIZE_CALC = 1.00; +static double ERR_SIZE_CALC = 1.00; static int MYVTKDEBUG = 0; @@ -568,15 +568,15 @@ namespace PrintMemorySize(vtkUnstructuredGrid* theDataSet) { theDataSet->Update(); - BEGMSG(1,"GetPoints() = "<GetPoints()->GetActualMemorySize()*1000)<GetNbPoints() * (vtkIdType(sizeof(vtkIdType)*aNbCellsPerPoint) + sizeof(vtkCellLinks::Link)); aLinksSize = 0; size_t aResult = aPointsSize + aConnectivitySize + aTypesSize + aLocationsSize + aLinksSize; MSG(MYDEBUG,"GetFamilyOnEntitySize "<< - "- aResult = "<GetNbPoints() * (vtkIdType(sizeof(vtkIdType)*aNbCellsPerPoint) + sizeof(short)); aLinksSize = 0; size_t aResult = aPointsSize + aConnectivityAndTypesSize + aLocationsSize + aLinksSize; if(MYDEBUG){ - MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aPointsSize = "<(aFindField); size_t aMeshSize = GetMeshOnEntitySize(theMeshName,aVTKMeshOnEntity->myEntity); - size_t aFieldOnMeshSize = size_t(aField->myDataSize*sizeof(vtkFloatingPointType)*aField->myValField.size()*ERR_SIZE_CALC); + size_t aFieldOnMeshSize = size_t(aField->myDataSize*sizeof(double)*aField->myValField.size()*ERR_SIZE_CALC); size_t aResult = aMeshSize + aFieldOnMeshSize; if(MYDEBUG) - MSG(MYVTKDEBUG,"GetFieldOnMeshSize - aFieldOnMeshSize = "<(aFindTimeStamp); size_t aMeshSize = GetMeshOnEntitySize(theMeshName, aVTKMeshOnEntity->myEntity); - size_t aTimeStampSize = size_t(aField->myDataSize*sizeof(vtkFloatingPointType) * ERR_SIZE_CALC); + size_t aTimeStampSize = size_t(aField->myDataSize*sizeof(double) * ERR_SIZE_CALC); size_t aResult = aMeshSize + aTimeStampSize; - MSG(MYDEBUG && MYVTKDEBUG,"GetTimeStampSize - aTimeStampSize = "< std::string getVector(TData* theData, int theId) { std::ostringstream aStr; if (vtkDataArray *aVector = theData->GetVectors()) { - vtkFloatingPointType *aVal = aVector->GetTuple3(theId); + double *aVal = aVector->GetTuple3(theId); aStr << "\nVector: " << "{" << aVal[0] << "; " << aVal[1] << "; " << aVal[2] << "}"; } return aStr.str(); @@ -991,7 +991,7 @@ VISU_Actor myIsSubElementsHighlighted = aCurrentHasIndex; bool aFlyTo = false; - vtkFloatingPointType aFlyToCoord[3] = { 0.0, 0.0, 0.0 }; + double aFlyToCoord[3] = { 0.0, 0.0, 0.0 }; vtkRenderer *aRenderer = GetRenderer(); if( theIsHighlight ) @@ -1017,9 +1017,9 @@ VISU_Actor if(vtkCell* aCell = GetElemCell(anObjId)){ vtkPoints* aPts = aCell->GetPoints(); if(int aNbPts = aCell->GetNumberOfPoints()){ - vtkFloatingPointType aCoord[3] = {0.0, 0.0, 0.0}; + double aCoord[3] = {0.0, 0.0, 0.0}; for(int i = 0; i < aNbPts; i++){ - vtkFloatingPointType *aPntCoord = aPts->GetPoint(i); + double *aPntCoord = aPts->GetPoint(i); aCoord[0] += aPntCoord[0]; aCoord[1] += aPntCoord[1]; aCoord[2] += aPntCoord[2]; @@ -1030,10 +1030,10 @@ VISU_Actor aFlyToCoord[1] = aCoord[1] / aNbPts; aFlyToCoord[2] = aCoord[2] / aNbPts; - vtkFloatingPointType aWorldCoord[4] = {aCoord[0]/aNbPts, aCoord[1]/aNbPts, aCoord[2]/aNbPts, 1.0}; + double aWorldCoord[4] = {aCoord[0]/aNbPts, aCoord[1]/aNbPts, aCoord[2]/aNbPts, 1.0}; aRenderer->SetWorldPoint(aWorldCoord); aRenderer->WorldToDisplay(); - vtkFloatingPointType aSelectionPoint[3]; + double aSelectionPoint[3]; aRenderer->GetDisplayPoint(aSelectionPoint); myTextActor->SetPosition(aSelectionPoint); myTextActor->SetModePosition(aPickingSettings->GetInfoWindowPosition()); @@ -1069,16 +1069,16 @@ VISU_Actor int anObjId = aMapIndex(1); vtkPointData* aPntData = aDataSet->GetPointData(); - if(vtkFloatingPointType* aCoord = GetNodeCoord(anObjId)){ + if(double* aCoord = GetNodeCoord(anObjId)){ aFlyTo = true; aFlyToCoord[0] = aCoord[0]; aFlyToCoord[1] = aCoord[1]; aFlyToCoord[2] = aCoord[2]; - vtkFloatingPointType aWorldCoord[4] = {aCoord[0], aCoord[1], aCoord[2], 1.0}; + double aWorldCoord[4] = {aCoord[0], aCoord[1], aCoord[2], 1.0}; aRenderer->SetWorldPoint(aWorldCoord); aRenderer->WorldToDisplay(); - vtkFloatingPointType aSelectionPoint[3]; + double aSelectionPoint[3]; aRenderer->GetDisplayPoint(aSelectionPoint); myTextActor->SetPosition(aSelectionPoint); myTextActor->SetModePosition(aPickingSettings->GetInfoWindowPosition()); @@ -1132,7 +1132,7 @@ VISU_Actor // Zoom if( GetVisibility() && aPickingSettings->GetCameraMovementEnabled() ) { - vtkFloatingPointType aZoomFactor = aPickingSettings->GetZoomFactor(); + double aZoomFactor = aPickingSettings->GetZoomFactor(); ChangeZoom(aZoomFactor, GetRenderer(), anInitialHasIndex, @@ -1143,7 +1143,7 @@ VISU_Actor if( GetVisibility() && aPickingSettings->GetCameraMovementEnabled() && aFlyTo ) { vtkRenderWindowInteractor* anInteractor = myInteractor; - vtkFloatingPointType aDollyWas = anInteractor->GetDolly(); + double aDollyWas = anInteractor->GetDolly(); int aNumberOfFlyFramesWas = anInteractor->GetNumberOfFlyFrames(); double aPosition[3]; @@ -1168,16 +1168,16 @@ VISU_Actor { VISU_PickingSettings* aPickingSettings = VISU_PickingSettings::Get(); - vtkFloatingPointType aCoord[6]; + double aCoord[6]; GetBounds(aCoord); - vtkFloatingPointType aWorldCoord[4] = { ( aCoord[0] + aCoord[1] ) / 2, + double aWorldCoord[4] = { ( aCoord[0] + aCoord[1] ) / 2, ( aCoord[2] + aCoord[3] ) / 2, ( aCoord[4] + aCoord[5] ) / 2, 1.0}; vtkRenderer* aRenderer = GetRenderer(); aRenderer->SetWorldPoint(aWorldCoord); aRenderer->WorldToDisplay(); - vtkFloatingPointType aSelectionPoint[3]; + double aSelectionPoint[3]; aRenderer->GetDisplayPoint(aSelectionPoint); myTextActor->SetPosition(aSelectionPoint); myTextActor->SetModePosition(aPickingSettings->GetInfoWindowPosition()); diff --git a/src/OBJECT/VISU_Actor.h b/src/OBJECT/VISU_Actor.h index 642e5ff2..d32a2c9e 100644 --- a/src/OBJECT/VISU_Actor.h +++ b/src/OBJECT/VISU_Actor.h @@ -163,10 +163,10 @@ class VISU_OBJECT_EXPORT VISU_Actor : public VISU_ActorBase virtual void - SetShrinkFactor(vtkFloatingPointType theFactor = 0.8); + SetShrinkFactor(double theFactor = 0.8); virtual - vtkFloatingPointType + double GetShrinkFactor(); //---------------------------------------------------------------------------- @@ -187,12 +187,12 @@ class VISU_OBJECT_EXPORT VISU_Actor : public VISU_ActorBase SetFeatureEdgesEnabled(bool theIsFeatureEdgesEnabled); virtual - vtkFloatingPointType + double GetFeatureEdgesAngle(); virtual void - SetFeatureEdgesAngle(vtkFloatingPointType theAngle = 30.0); + SetFeatureEdgesAngle(double theAngle = 30.0); virtual void @@ -219,18 +219,18 @@ class VISU_OBJECT_EXPORT VISU_Actor : public VISU_ActorBase //---------------------------------------------------------------------------- virtual void - SetOpacity(vtkFloatingPointType theValue); + SetOpacity(double theValue); virtual - vtkFloatingPointType + double GetOpacity(); virtual void - SetLineWidth(vtkFloatingPointType theLineWidth); + SetLineWidth(double theLineWidth); virtual - vtkFloatingPointType + double GetLineWidth(); //---------------------------------------------------------------------------- @@ -294,7 +294,7 @@ class VISU_OBJECT_EXPORT VISU_Actor : public VISU_ActorBase GetNodeVTKID(vtkIdType theID); virtual - vtkFloatingPointType* + double* GetNodeCoord(vtkIdType theObjID); virtual @@ -387,7 +387,7 @@ class VISU_OBJECT_EXPORT VISU_Actor : public VISU_ActorBase //---------------------------------------------------------------------------- protected: - vtkFloatingPointType myPriority; + double myPriority; bool myIsVTKMapping; VISU::Prs3d_i* myPrs3d; vtkSmartPointer myPipeLine; diff --git a/src/OBJECT/VISU_ActorBase.cxx b/src/OBJECT/VISU_ActorBase.cxx index cab16dce..0f68c79c 100644 --- a/src/OBJECT/VISU_ActorBase.cxx +++ b/src/OBJECT/VISU_ActorBase.cxx @@ -118,12 +118,12 @@ VISU_ActorBase void VISU_ActorBase -::SetLineWidth(vtkFloatingPointType theLineWidth) +::SetLineWidth(double theLineWidth) { GetProperty()->SetLineWidth(theLineWidth); } -vtkFloatingPointType +double VISU_ActorBase ::GetLineWidth() { @@ -181,13 +181,13 @@ bool VISU_ActorBase::IsShrunkable() void VISU_ActorBase -::SetShrinkFactor(vtkFloatingPointType theValue) +::SetShrinkFactor(double theValue) { myShrinkFilter->SetShrinkFactor(theValue); Modified(); } -vtkFloatingPointType +double VISU_ActorBase ::GetShrinkFactor() { diff --git a/src/OBJECT/VISU_ActorBase.h b/src/OBJECT/VISU_ActorBase.h index 554225ab..40d452f1 100644 --- a/src/OBJECT/VISU_ActorBase.h +++ b/src/OBJECT/VISU_ActorBase.h @@ -57,8 +57,8 @@ class VISU_OBJECT_EXPORT VISU_ActorBase: public SALOME_Actor, //---------------------------------------------------------------------------- virtual void SetTransform(VTKViewer_Transform* theTransform); - virtual void SetLineWidth(vtkFloatingPointType theLineWidth); - virtual vtkFloatingPointType GetLineWidth(); + virtual void SetLineWidth(double theLineWidth); + virtual double GetLineWidth(); virtual void SetShrink(); virtual void UnShrink(); @@ -66,8 +66,8 @@ class VISU_OBJECT_EXPORT VISU_ActorBase: public SALOME_Actor, virtual bool IsShrunk(); virtual void SetShrinkable(bool theIsShrinkable); - virtual void SetShrinkFactor(vtkFloatingPointType theFactor = 0.8); - virtual vtkFloatingPointType GetShrinkFactor(); + virtual void SetShrinkFactor(double theFactor = 0.8); + virtual double GetShrinkFactor(); virtual void SetRepresentation(int theMode); diff --git a/src/OBJECT/VISU_GaussPtsAct.cxx b/src/OBJECT/VISU_GaussPtsAct.cxx index b4a1cc97..ce386598 100644 --- a/src/OBJECT/VISU_GaussPtsAct.cxx +++ b/src/OBJECT/VISU_GaussPtsAct.cxx @@ -99,16 +99,16 @@ static int MYDEBUG2 = 0; namespace { bool - CheckIsSameValue(vtkFloatingPointType theTarget, - vtkFloatingPointType theSource) + CheckIsSameValue(double theTarget, + double theSource) { - static vtkFloatingPointType TOL = 10.0 / VTK_LARGE_FLOAT; + static double TOL = 10.0 / VTK_LARGE_FLOAT; return fabs(theTarget - theSource) < TOL; } bool - CheckIsSameVector(vtkFloatingPointType* theTarget, - vtkFloatingPointType* theSource, + CheckIsSameVector(double* theTarget, + double* theSource, size_t theLength) { for ( size_t anId = 0; anId < theLength; anId++ ) { @@ -272,7 +272,7 @@ VISU_GaussPtsAct return myMapper.GetPointer(); } -vtkFloatingPointType* +double* VISU_GaussPtsAct ::GetBounds() { @@ -413,9 +413,9 @@ VISU_GaussPtsAct { myEventCallbackCommand->SetAbortFlag(1); - vtkFloatingPointType aMagnification = myInsideCursorSettings->GetMagnification(); - vtkFloatingPointType anIncrement = myInsideCursorSettings->GetIncrement(); - vtkFloatingPointType coefficient = up ? anIncrement : 1 / anIncrement; + double aMagnification = myInsideCursorSettings->GetMagnification(); + double anIncrement = myInsideCursorSettings->GetIncrement(); + double coefficient = up ? anIncrement : 1 / anIncrement; myInsideCursorSettings->SetMagnification( aMagnification * coefficient ); myInsideCursorSettings->InvokeEvent(VISU::UpdateFromSettingsEvent,NULL); @@ -459,16 +459,16 @@ VISU_GaussPtsAct namespace { inline - vtkFloatingPointType + double GetRadius(vtkIdType theVTKID, vtkDataArray *theScalarArray, VISU_GaussPointsPL* theGaussPointsPL) { - vtkFloatingPointType aRadius = 0.5; + double aRadius = 0.5; if(theGaussPointsPL->GetPointSpriteMapper()->GetPointSpriteMode() == 1) // Geometry mode aRadius *= theGaussPointsPL->GetSize() * theGaussPointsPL->GetAverageCellSize(); else if(theGaussPointsPL->GetBicolor()){ - vtkFloatingPointType aVal = theScalarArray->GetTuple1(theVTKID); + double aVal = theScalarArray->GetTuple1(theVTKID); if(aVal > 0.0) aRadius *= theGaussPointsPL->GetMaxSize(); else @@ -481,7 +481,7 @@ namespace } } -vtkFloatingPointType +double VISU_GaussPtsAct ::GetRadius(vtkIdType theObjID, vtkIdType theVTKID, @@ -491,7 +491,7 @@ VISU_GaussPtsAct } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_GaussPtsAct ::GetMagnification(vtkIdType theObjID) { @@ -503,17 +503,17 @@ VISU_GaussPtsAct namespace { inline - vtkFloatingPointType + double GetClamp(VISU_GaussPointsPL* theGaussPointsPL) { - vtkFloatingPointType aClamp = theGaussPointsPL->GetClamp(); + double aClamp = theGaussPointsPL->GetClamp(); if(theGaussPointsPL->GetPrimitiveType() == VISU_OpenGLPointSpriteMapper::GeomSphere) return -aClamp; return aClamp; } } -vtkFloatingPointType +double VISU_GaussPtsAct ::GetClamp(vtkIdType theObjID) { @@ -524,7 +524,7 @@ VISU_GaussPtsAct //---------------------------------------------------------------------------- void VISU_GaussPtsAct -::SetOpacity(vtkFloatingPointType theValue) +::SetOpacity(double theValue) { GetGaussPointsPL()->SetOpacity(theValue); Superclass::SetOpacity(theValue); @@ -776,9 +776,9 @@ VISU_GaussPtsAct if(myIsPreselected){ anIsChanged = (myLastPreHighlightObjID != anObjId); if(anIsChanged){ - vtkFloatingPointType* aNodeCoord = GetNodeCoord(anObjId); + double* aNodeCoord = GetNodeCoord(anObjId); //Take into account translation - vtkFloatingPointType aLocalNodeCoord[3]; + double aLocalNodeCoord[3]; this->Transform->Push(); this->Transform->PostMultiply(); this->Transform->Identity(); @@ -796,10 +796,10 @@ VISU_GaussPtsAct vtkDataSet* aDataSet = GetInput(); vtkPointData* aPointData = aDataSet->GetPointData(); if(vtkDataArray *aScalarArray = aPointData->GetScalars()){ - vtkFloatingPointType aPyramidHeight = aPickingSettings->GetPyramidHeight(); + double aPyramidHeight = aPickingSettings->GetPyramidHeight(); aPyramidHeight = aPyramidHeight*myGaussPointsPL->GetMaxPointSize(); - //vtkFloatingPointType aColor[3] = myPreHighlightActor->GetProperty()->GetColor(); - vtkFloatingPointType aColor[3]; + //double aColor[3] = myPreHighlightActor->GetProperty()->GetColor(); + double aColor[3]; theInteractorStyle->GetCurrentRenderer()->GetBackground( aColor ); aColor[0] = 1. - aColor[0]; aColor[1] = 1. - aColor[1]; @@ -839,7 +839,7 @@ ChangeZoom(VISU_PickingSettings *thePickingSettings, if( (theInitialHasIndex + theCurrentHasIndex == 1) && thePickingSettings){ vtkCamera *aCamera = theRenderer->GetActiveCamera(); - vtkFloatingPointType aZoomFactor = thePickingSettings->GetZoomFactor(); + double aZoomFactor = thePickingSettings->GetZoomFactor(); double aScale = aCamera->GetParallelScale(); if ( !theInitialHasIndex && theCurrentHasIndex ) { aCamera->SetParallelScale( aScale/aZoomFactor ); @@ -924,11 +924,11 @@ VISU_GaussPtsAct mySelector->AddIObject(this); } /* - vtkFloatingPointType* aNodeCoord = GetNodeCoord(anObjId); + double* aNodeCoord = GetNodeCoord(anObjId); // // FlyTo vtkRenderWindowInteractor* anInteractor = theInteractorStyle->GetInteractor(); - vtkFloatingPointType aDollyWas = anInteractor->GetDolly(); + double aDollyWas = anInteractor->GetDolly(); int aNumberOfFlyFramesWas = anInteractor->GetNumberOfFlyFrames(); anInteractor->SetDolly(0.); @@ -1051,11 +1051,11 @@ VISU_GaussPtsAct vtkCamera* aCamera = aRenderer->GetActiveCamera(); int anObjId = aMapIndex(1); - vtkFloatingPointType* aNodeCoord = GetNodeCoord(anObjId); + double* aNodeCoord = GetNodeCoord(anObjId); if ( !aNodeCoord ) return; //Take into account translation - vtkFloatingPointType aLocalNodeCoord[3]; + double aLocalNodeCoord[3]; this->Transform->Push(); this->Transform->PostMultiply(); this->Transform->Identity(); @@ -1069,7 +1069,7 @@ VISU_GaussPtsAct aLocalNodeCoord[2] = aNodeCoord[2] + aPosition[2]; this->Transform->Pop(); - vtkFloatingPointType aFocalPnt[3]; + double aFocalPnt[3]; aCamera->GetFocalPoint(aFocalPnt); if ( CheckIsSameVector(aLocalNodeCoord, aFocalPnt, 3 ) ) @@ -1079,7 +1079,7 @@ VISU_GaussPtsAct if( anIsVisible && aPickingSettings->GetCameraMovementEnabled() ) { vtkRenderWindowInteractor* anInteractor = myInteractor; - vtkFloatingPointType aDollyWas = anInteractor->GetDolly(); + double aDollyWas = anInteractor->GetDolly(); int aNumberOfFlyFramesWas = anInteractor->GetNumberOfFlyFrames(); anInteractor->SetDolly(0.0); @@ -1097,19 +1097,19 @@ VISU_GaussPtsAct // vtkIdType aVtkId = GetNodeVTKID(anObjId); if(aVtkId >= 0){ - vtkFloatingPointType aWorldCoord[4] = {aLocalNodeCoord[0], aLocalNodeCoord[1], aLocalNodeCoord[2], 1.}; + double aWorldCoord[4] = {aLocalNodeCoord[0], aLocalNodeCoord[1], aLocalNodeCoord[2], 1.}; // vtkDataSet* aDataSet = GetInput(); vtkPointData* aDataSetAttributes = aDataSet->GetPointData(); // if(vtkDataArray* aScalarArray = aDataSetAttributes->GetScalars()){ - vtkFloatingPointType aVal = aScalarArray->GetTuple1(aVtkId); + double aVal = aScalarArray->GetTuple1(aVtkId); // // GetScalarBarCtrl()->SetIsMarked(true); GetScalarBarCtrl()->SetMarkValue(aVal); GetScalarBarCtrl()->Update(); // - vtkFloatingPointType aPyramidHeight = aPickingSettings->GetPyramidHeight(); + double aPyramidHeight = aPickingSettings->GetPyramidHeight(); aPyramidHeight = aPyramidHeight*myGaussPointsPL->GetMaxPointSize(); myCursorPyramidSelected->Init(aPyramidHeight, aPickingSettings->GetCursorSize(), @@ -1138,13 +1138,13 @@ VISU_GaussPtsAct if(vtkDataArray* aFieldArray = aDataSetAttributes->GetArray("VISU_FIELD")){ int aNbComp = aFieldArray->GetNumberOfComponents(); - std::vector aTuple(aNbComp); + std::vector aTuple(aNbComp); aFieldArray->GetTuple(aVtkId, &aTuple[0]); aStr<<"\nData: {"; int anId = 0; while(anId < aNbComp){ - vtkFloatingPointType aComp = aTuple[anId++]; + double aComp = aTuple[anId++]; aStr<SetNumberOfComponents(3); int aNbComp = anInputVectors->GetNumberOfComponents(); - std::vector aTuple(aNbComp); + std::vector aTuple(aNbComp); for (vtkIdType i = 0; i < aNbNeighbourCells; i++) { vtkIdType aVTKCellId = aNeighbourCells->GetId(i); @@ -1305,8 +1305,8 @@ VISU_GaussPtsAct myTextActor->SetModePosition(aPickingSettings->GetInfoWindowPosition()); myTextActor->SetTransparency(aPickingSettings->GetInfoWindowTransparency()); - vtkFloatingPointType aHeight = myGaussPointsPL->GetMaxPointSize()*aPickingSettings->GetPyramidHeight(); - vtkFloatingPointType aCursorSize = aPickingSettings->GetCursorSize(); + double aHeight = myGaussPointsPL->GetMaxPointSize()*aPickingSettings->GetPyramidHeight(); + double aCursorSize = aPickingSettings->GetCursorSize(); myCursorPyramid->SetPreferences(aHeight,aCursorSize); myCursorPyramidSelected->SetPreferences(aHeight,aCursorSize); @@ -1605,7 +1605,7 @@ VISU_GaussPtsAct1 //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_GaussPtsAct1 ::GetRadius(vtkIdType theObjID, vtkIdType theVTKID, @@ -1623,7 +1623,7 @@ VISU_GaussPtsAct1 //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_GaussPtsAct1 ::GetMagnification(vtkIdType theObjID) { @@ -1639,7 +1639,7 @@ VISU_GaussPtsAct1 //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_GaussPtsAct1 ::GetClamp(vtkIdType theObjID) { @@ -1727,7 +1727,7 @@ VISU_GaussPtsAct1 VISU_GaussPointsPL* aPipeline = myOutsideDeviceActor->GetPipeLine(); vtkImplicitFunction* anImplicitFunction = aPipeline->GetImplicitFunction(); - vtkFloatingPointType aMagnification = aPipeline->GetMagnification(); + double aMagnification = aPipeline->GetMagnification(); aPipeline->ShallowCopy(GetGaussPointsPL(), true); diff --git a/src/OBJECT/VISU_GaussPtsAct.h b/src/OBJECT/VISU_GaussPtsAct.h index bd69d5e0..2840a233 100644 --- a/src/OBJECT/VISU_GaussPtsAct.h +++ b/src/OBJECT/VISU_GaussPtsAct.h @@ -115,7 +115,7 @@ class VISU_OBJECT_EXPORT VISU_GaussPtsAct : public VISU_Actor //! Redefined method of getting an actor bounds. virtual - vtkFloatingPointType* + double* GetBounds(); //! Redefined method of getting an actor input. @@ -131,7 +131,7 @@ class VISU_OBJECT_EXPORT VISU_GaussPtsAct : public VISU_Actor //---------------------------------------------------------------------------- virtual void - SetOpacity(vtkFloatingPointType theValue); + SetOpacity(double theValue); //---------------------------------------------------------------------------- virtual @@ -296,19 +296,19 @@ class VISU_OBJECT_EXPORT VISU_GaussPtsAct : public VISU_Actor //! To get current value of the radius of the Point Sprite virtual - vtkFloatingPointType + double GetRadius(vtkIdType theObjID, vtkIdType theVTKID, vtkDataArray *theScalarArray); //! To get current value of the magnification virtual - vtkFloatingPointType + double GetMagnification(vtkIdType theObjID); //! To get current value of the clamp virtual - vtkFloatingPointType + double GetClamp(vtkIdType theObjID); //---------------------------------------------------------------------------- @@ -327,7 +327,7 @@ class VISU_OBJECT_EXPORT VISU_GaussPtsAct : public VISU_Actor void OnInteractorEvent(unsigned long theEvent); - vtkFloatingPointType myPriority; + double myPriority; bool myChangeMagnification; VISU::TGaussPtsActorFactory* myGaussPtsActorFactory; boost::signal1 myUpdatePrs3dSignal; @@ -460,19 +460,19 @@ class VISU_OBJECT_EXPORT VISU_GaussPtsAct1 : public VISU_GaussPtsAct //! To get current value of the radius of the Point Sprite virtual - vtkFloatingPointType + double GetRadius(vtkIdType theObjID, vtkIdType theVTKID, vtkDataArray *theScalarArray); //! To get current value of the magnification virtual - vtkFloatingPointType + double GetMagnification(vtkIdType theObjID); //! To get current value of the clamp virtual - vtkFloatingPointType + double GetClamp(vtkIdType theObjID); //---------------------------------------------------------------------------- diff --git a/src/OBJECT/VISU_GaussPtsDeviceActor.cxx b/src/OBJECT/VISU_GaussPtsDeviceActor.cxx index bffbfcf5..6e133494 100644 --- a/src/OBJECT/VISU_GaussPtsDeviceActor.cxx +++ b/src/OBJECT/VISU_GaussPtsDeviceActor.cxx @@ -396,28 +396,28 @@ VISU_CursorPyramid } this->SetScale(1.0); - vtkFloatingPointType aMRadius = myRadius*myMagnification; + double aMRadius = myRadius*myMagnification; Init(myHeight,aMRadius*myCursorSize); if(myClamp > 0.0f){ - vtkFloatingPointType aPoint1[3] = {0.0, 0.0, 0.0}; + double aPoint1[3] = {0.0, 0.0, 0.0}; ren->SetDisplayPoint(aPoint1); ren->DisplayToWorld(); ren->GetWorldPoint(aPoint1); - vtkFloatingPointType aPoint2[3] = {0.0, myClamp, 0.0}; + double aPoint2[3] = {0.0, myClamp, 0.0}; ren->SetDisplayPoint(aPoint2); ren->DisplayToWorld(); ren->GetWorldPoint(aPoint2); - vtkFloatingPointType aWorldClamp = + double 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); - vtkFloatingPointType aMDiameter = 2.0 * aMRadius; - vtkFloatingPointType aCoeff = aWorldClamp / aMDiameter; + double aMDiameter = 2.0 * aMRadius; + double aCoeff = aWorldClamp / aMDiameter; if(aCoeff < 1.0){ this->SetScale(aCoeff); @@ -478,8 +478,8 @@ VISU_CursorPyramid //---------------------------------------------------------------------------- void VISU_CursorPyramid -::SetPreferences(vtkFloatingPointType theHeight, - vtkFloatingPointType theCursorSize) +::SetPreferences(double theHeight, + double theCursorSize) { Init(theHeight, theCursorSize, myRadius, myMagnification, myClamp, GetPosition(), GetProperty()->GetColor()); } @@ -487,13 +487,13 @@ VISU_CursorPyramid //---------------------------------------------------------------------------- void VISU_CursorPyramid -::Init(vtkFloatingPointType theHeight, - vtkFloatingPointType theCursorSize, - vtkFloatingPointType theRadius, - vtkFloatingPointType theMagnification, - vtkFloatingPointType theClamp, - vtkFloatingPointType thePos[3], - vtkFloatingPointType theColor[3]) +::Init(double theHeight, + double theCursorSize, + double theRadius, + double theMagnification, + double theClamp, + double thePos[3], + double theColor[3]) { Init(theHeight,theRadius*theMagnification*theCursorSize); SetPosition(thePos[0],thePos[1],thePos[2]); @@ -512,8 +512,8 @@ VISU_CursorPyramid void VISU_CursorPyramid -::Init(vtkFloatingPointType theHeight, - vtkFloatingPointType theRadius) +::Init(double theHeight, + double theRadius) { for(int i = 0; i < myNbCones; ++i){ vtkConeSource* aSource = mySources[i].GetPointer(); @@ -523,7 +523,7 @@ VISU_CursorPyramid aSource->SetAngle(20.0); } - vtkFloatingPointType aDisplacement = -0.5*theHeight - theRadius; + double aDisplacement = -0.5*theHeight - theRadius; // X mySources[0]->SetDirection(1.0, 0.0, 0.0); diff --git a/src/OBJECT/VISU_GaussPtsDeviceActor.h b/src/OBJECT/VISU_GaussPtsDeviceActor.h index c9b0f992..0a43c76f 100644 --- a/src/OBJECT/VISU_GaussPtsDeviceActor.h +++ b/src/OBJECT/VISU_GaussPtsDeviceActor.h @@ -199,34 +199,34 @@ public: RemoveFromRender(vtkRenderer* theRenderer); void - Init(vtkFloatingPointType theHeight, - vtkFloatingPointType theCursorSize, - vtkFloatingPointType theRadius, - vtkFloatingPointType theMagnification, - vtkFloatingPointType theClamp, - vtkFloatingPointType thePos[3], - vtkFloatingPointType theColor[3]); + Init(double theHeight, + double theCursorSize, + double theRadius, + double theMagnification, + double theClamp, + double thePos[3], + double theColor[3]); - void SetPreferences(vtkFloatingPointType theHeight, - vtkFloatingPointType theCursorSize); + void SetPreferences(double theHeight, + double theCursorSize); protected: VISU_CursorPyramid(); void - Init(vtkFloatingPointType theHeight, - vtkFloatingPointType theRadius); + Init(double theHeight, + double theRadius); int myNbCones; vtkSmartPointer mySources[6]; vtkSmartPointer myAppendFilter; vtkSmartPointer myMapper; // - vtkFloatingPointType myHeight; - vtkFloatingPointType myCursorSize; - vtkFloatingPointType myRadius; - vtkFloatingPointType myMagnification; - vtkFloatingPointType myClamp; + double myHeight; + double myCursorSize; + double myRadius; + double myMagnification; + double myClamp; private: VISU_CursorPyramid(const VISU_CursorPyramid&); // Not implemented diff --git a/src/OBJECT/VISU_GaussPtsSettings.h b/src/OBJECT/VISU_GaussPtsSettings.h index ea3d7ea3..46cc47a7 100644 --- a/src/OBJECT/VISU_GaussPtsSettings.h +++ b/src/OBJECT/VISU_GaussPtsSettings.h @@ -68,34 +68,34 @@ class VISU_OBJECT_EXPORT VISU_GaussPtsSettings : public vtkObject vtkSetMacro( PrimitiveType, int ); vtkGetMacro( PrimitiveType, int ); - vtkSetMacro( Clamp, vtkFloatingPointType ); - vtkGetMacro( Clamp, vtkFloatingPointType ); + vtkSetMacro( Clamp, double ); + vtkGetMacro( Clamp, double ); vtkSetMacro( Texture, vtkImageData* ); vtkGetMacro( Texture, vtkImageData* ); - vtkSetMacro( AlphaThreshold, vtkFloatingPointType ); - vtkGetMacro( AlphaThreshold, vtkFloatingPointType ); + vtkSetMacro( AlphaThreshold, double ); + vtkGetMacro( AlphaThreshold, double ); vtkSetMacro( Resolution, int ); vtkGetMacro( Resolution, int ); - vtkSetMacro( Magnification, vtkFloatingPointType ); - vtkGetMacro( Magnification, vtkFloatingPointType ); + vtkSetMacro( Magnification, double ); + vtkGetMacro( Magnification, double ); - vtkSetMacro( Increment, vtkFloatingPointType ); - vtkGetMacro( Increment, vtkFloatingPointType ); + vtkSetMacro( Increment, double ); + vtkGetMacro( Increment, double ); protected: bool Initial; int PrimitiveType; - vtkFloatingPointType Clamp; + double Clamp; vtkImageData* Texture; - vtkFloatingPointType AlphaThreshold; + double AlphaThreshold; int Resolution; - vtkFloatingPointType Magnification; - vtkFloatingPointType Increment; + double Magnification; + double Increment; }; @@ -117,15 +117,15 @@ class VISU_OBJECT_EXPORT VISU_InsideCursorSettings : public VISU_GaussPtsSetting VISU_InsideCursorSettings* New(); - vtkSetMacro( MinSize, vtkFloatingPointType ); - vtkGetMacro( MinSize, vtkFloatingPointType ); + vtkSetMacro( MinSize, double ); + vtkGetMacro( MinSize, double ); - vtkSetMacro( MaxSize, vtkFloatingPointType ); - vtkGetMacro( MaxSize, vtkFloatingPointType ); + vtkSetMacro( MaxSize, double ); + vtkGetMacro( MaxSize, double ); protected: - vtkFloatingPointType MinSize; - vtkFloatingPointType MaxSize; + double MinSize; + double MaxSize; }; @@ -148,19 +148,19 @@ class VISU_OBJECT_EXPORT VISU_OutsideCursorSettings : public VISU_GaussPtsSettin VISU_OutsideCursorSettings* New(); - vtkSetMacro( Size, vtkFloatingPointType ); - vtkGetMacro( Size, vtkFloatingPointType ); + vtkSetMacro( Size, double ); + vtkGetMacro( Size, double ); vtkSetMacro( Uniform, bool ); vtkGetMacro( Uniform, bool ); - vtkSetVector3Macro( Color, vtkFloatingPointType ); - vtkGetVector3Macro( Color, vtkFloatingPointType ); + vtkSetVector3Macro( Color, double ); + vtkGetVector3Macro( Color, double ); protected: - vtkFloatingPointType Size; + double Size; bool Uniform; - vtkFloatingPointType Color[3]; + double Color[3]; }; #endif diff --git a/src/OBJECT/VISU_MeshAct.cxx b/src/OBJECT/VISU_MeshAct.cxx index a39c49dd..e5c23953 100644 --- a/src/OBJECT/VISU_MeshAct.cxx +++ b/src/OBJECT/VISU_MeshAct.cxx @@ -145,7 +145,7 @@ VISU_MeshAct void VISU_MeshAct -::SetShrinkFactor(vtkFloatingPointType theValue) +::SetShrinkFactor(double theValue) { Superclass::SetShrinkFactor(theValue); @@ -179,12 +179,12 @@ VISU_MeshAct //---------------------------------------------------------------------------- void VISU_MeshAct -::SetOpacity(vtkFloatingPointType theValue) +::SetOpacity(double theValue) { GetSurfaceProperty()->SetOpacity(theValue); } -vtkFloatingPointType +double VISU_MeshAct ::GetOpacity() { @@ -194,12 +194,12 @@ VISU_MeshAct //---------------------------------------------------------------------------- void VISU_MeshAct -::SetLineWidth(vtkFloatingPointType theLineWidth) +::SetLineWidth(double theLineWidth) { GetEdgeProperty()->SetLineWidth(theLineWidth); } -vtkFloatingPointType +double VISU_MeshAct::GetLineWidth() { return GetEdgeProperty()->GetLineWidth(); @@ -241,7 +241,7 @@ VISU_MeshAct void VISU_MeshAct -::SetFeatureEdgesAngle(vtkFloatingPointType theValue) +::SetFeatureEdgesAngle(double theValue) { Superclass::SetFeatureEdgesAngle(theValue); diff --git a/src/OBJECT/VISU_MeshAct.h b/src/OBJECT/VISU_MeshAct.h index af8b2698..fd61bb26 100644 --- a/src/OBJECT/VISU_MeshAct.h +++ b/src/OBJECT/VISU_MeshAct.h @@ -66,18 +66,18 @@ class VISU_OBJECT_EXPORT VISU_MeshAct : public VISU_DataSetActor virtual void - SetOpacity(vtkFloatingPointType theValue); + SetOpacity(double theValue); virtual - vtkFloatingPointType + double GetOpacity(); virtual void - SetLineWidth(vtkFloatingPointType theLineWidth); + SetLineWidth(double theLineWidth); virtual - vtkFloatingPointType + double GetLineWidth(); virtual @@ -90,7 +90,7 @@ class VISU_OBJECT_EXPORT VISU_MeshAct : public VISU_DataSetActor virtual void - SetShrinkFactor(vtkFloatingPointType theFactor = 0.8); + SetShrinkFactor(double theFactor = 0.8); virtual void @@ -110,7 +110,7 @@ class VISU_OBJECT_EXPORT VISU_MeshAct : public VISU_DataSetActor virtual void - SetFeatureEdgesAngle(vtkFloatingPointType theAngle = 30.0); + SetFeatureEdgesAngle(double theAngle = 30.0); virtual void diff --git a/src/OBJECT/VISU_PickingSettings.cxx b/src/OBJECT/VISU_PickingSettings.cxx index 201d5452..baff0710 100644 --- a/src/OBJECT/VISU_PickingSettings.cxx +++ b/src/OBJECT/VISU_PickingSettings.cxx @@ -51,7 +51,7 @@ VISU_PickingSettings* VISU_PickingSettings::Get() aPickingSettings->SetDisplayParentMesh( aResourceMgr->booleanValue( "VISU", "picking_display_parent_mesh", true ) ); QColor aSelectionColor = aResourceMgr->colorValue( "VISU", "picking_selection_color", Qt::yellow ); - vtkFloatingPointType aColor[3]; + double aColor[3]; aColor[0] = aSelectionColor.red() / 255.0; aColor[1] = aSelectionColor.green() / 255.0; aColor[2] = aSelectionColor.blue() / 255.0; diff --git a/src/OBJECT/VISU_PickingSettings.h b/src/OBJECT/VISU_PickingSettings.h index 9d6e48bb..b1ccc41c 100644 --- a/src/OBJECT/VISU_PickingSettings.h +++ b/src/OBJECT/VISU_PickingSettings.h @@ -65,23 +65,23 @@ class VISU_OBJECT_EXPORT VISU_PickingSettings : public vtkObject vtkSetMacro( IsInitial, bool ); vtkGetMacro( IsInitial, bool ); - vtkSetMacro( PyramidHeight, vtkFloatingPointType ); - vtkGetMacro( PyramidHeight, vtkFloatingPointType ); + vtkSetMacro( PyramidHeight, double ); + vtkGetMacro( PyramidHeight, double ); - vtkSetMacro( CursorSize, vtkFloatingPointType ); - vtkGetMacro( CursorSize, vtkFloatingPointType ); + vtkSetMacro( CursorSize, double ); + vtkGetMacro( CursorSize, double ); - vtkSetVector3Macro( Color, vtkFloatingPointType ); - vtkGetVector3Macro( Color, vtkFloatingPointType ); + vtkSetVector3Macro( Color, double ); + vtkGetVector3Macro( Color, double ); - vtkSetMacro( PointTolerance, vtkFloatingPointType ); - vtkGetMacro( PointTolerance, vtkFloatingPointType ); + vtkSetMacro( PointTolerance, double ); + vtkGetMacro( PointTolerance, double ); vtkSetMacro( InfoWindowEnabled, bool ); vtkGetMacro( InfoWindowEnabled, bool ); - vtkSetMacro( InfoWindowTransparency, vtkFloatingPointType ); - vtkGetMacro( InfoWindowTransparency, vtkFloatingPointType ); + vtkSetMacro( InfoWindowTransparency, double ); + vtkGetMacro( InfoWindowTransparency, double ); vtkSetMacro( InfoWindowPosition, int ); vtkGetMacro( InfoWindowPosition, int ); @@ -89,8 +89,8 @@ class VISU_OBJECT_EXPORT VISU_PickingSettings : public vtkObject vtkSetMacro( CameraMovementEnabled, bool ); vtkGetMacro( CameraMovementEnabled, bool ); - vtkSetMacro( ZoomFactor, vtkFloatingPointType ); - vtkGetMacro( ZoomFactor, vtkFloatingPointType ); + vtkSetMacro( ZoomFactor, double ); + vtkGetMacro( ZoomFactor, double ); vtkSetMacro( StepNumber, int ); vtkGetMacro( StepNumber, int ); @@ -105,19 +105,19 @@ private: private: bool IsInitial; - vtkFloatingPointType PyramidHeight; - vtkFloatingPointType CursorSize; + double PyramidHeight; + double CursorSize; - vtkFloatingPointType PointTolerance; + double PointTolerance; - vtkFloatingPointType Color[3]; + double Color[3]; bool InfoWindowEnabled; - vtkFloatingPointType InfoWindowTransparency; + double InfoWindowTransparency; int InfoWindowPosition; bool CameraMovementEnabled; - vtkFloatingPointType ZoomFactor; + double ZoomFactor; int StepNumber; bool DisplayParentMesh; diff --git a/src/OBJECT/VISU_ScalarMapAct.cxx b/src/OBJECT/VISU_ScalarMapAct.cxx index d8cd51d6..754b0bb7 100644 --- a/src/OBJECT/VISU_ScalarMapAct.cxx +++ b/src/OBJECT/VISU_ScalarMapAct.cxx @@ -103,7 +103,7 @@ class VISU_PointsDeviceActor: public VISU_GaussDeviceActorBase Superclass::DoMapperShallowCopy( theMapper, theIsCopyInput ); vtkDataSet* aDataSet = theMapper->GetInput(); - vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet ); + double aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet ); GetPointSpriteMapper()->SetAverageCellSize( aScaleFactor ); } @@ -183,9 +183,9 @@ class VISU_PointsDeviceActor: public VISU_GaussDeviceActorBase if ( !GetVisibility() ) return; - static vtkFloatingPointType anIncrement = 2; - vtkFloatingPointType aMagnification = GetPointSpriteMapper()->GetPointSpriteMagnification(); - vtkFloatingPointType coefficient = myInteractor->GetShiftKey() ? anIncrement : 1 / anIncrement; + static double anIncrement = 2; + double aMagnification = GetPointSpriteMapper()->GetPointSpriteMagnification(); + double coefficient = myInteractor->GetShiftKey() ? anIncrement : 1 / anIncrement; GetPointSpriteMapper()->SetPointSpriteMagnification( aMagnification * coefficient ); @@ -217,7 +217,7 @@ vtkStandardNewMacro(VISU_PointsDeviceActor); //---------------------------------------------------------------------------- vtkStandardNewMacro(VISU_ScalarMapAct); -static vtkFloatingPointType EPS = 1.0 / VTK_LARGE_FLOAT; +static double EPS = 1.0 / VTK_LARGE_FLOAT; //---------------------------------------------------------------------------- VISU_ScalarMapAct @@ -359,7 +359,7 @@ VISU_ScalarMapAct void VISU_ScalarMapAct -::SetShrinkFactor(vtkFloatingPointType theValue) +::SetShrinkFactor(double theValue) { Superclass::SetShrinkFactor(theValue); @@ -403,7 +403,7 @@ VISU_ScalarMapAct void VISU_ScalarMapAct -::SetFeatureEdgesAngle(vtkFloatingPointType theValue) +::SetFeatureEdgesAngle(double theValue) { Superclass::SetFeatureEdgesAngle(theValue); @@ -453,15 +453,15 @@ VISU_ScalarMapAct //---------------------------------------------------------------------------- void VISU_ScalarMapAct -::SetOpacity(vtkFloatingPointType theValue) +::SetOpacity(double theValue) { mySurfaceActor->GetProperty()->SetOpacity(theValue); - vtkFloatingPointType aPointSpriteOpacity = theValue > 0.0 ? 1.0 : 0.0; + double aPointSpriteOpacity = theValue > 0.0 ? 1.0 : 0.0; myPointSpriteActor->GetPointSpriteMapper()->SetPointSpriteOpacity(aPointSpriteOpacity); } -vtkFloatingPointType +double VISU_ScalarMapAct ::GetOpacity() { @@ -471,12 +471,12 @@ VISU_ScalarMapAct //---------------------------------------------------------------------------- void VISU_ScalarMapAct -::SetLineWidth(vtkFloatingPointType theLineWidth) +::SetLineWidth(double theLineWidth) { mySurfaceActor->GetProperty()->SetLineWidth(theLineWidth); } -vtkFloatingPointType +double VISU_ScalarMapAct::GetLineWidth() { return mySurfaceActor->GetProperty()->GetLineWidth(); @@ -803,14 +803,14 @@ void VISU_ScalarMapAct::SetMarkerTexture( int theMarkerId, VTK::MarkerTexture th /** * Set size of the 0D elements. */ -void VISU_ScalarMapAct::Set0DElemSize(vtkFloatingPointType theValue) { +void VISU_ScalarMapAct::Set0DElemSize(double theValue) { mySurfaceActor->GetProperty()->SetPointSize(theValue); } /** * Get size of the 0D elements. */ -vtkFloatingPointType VISU_ScalarMapAct::Get0DElemSize() { +double VISU_ScalarMapAct::Get0DElemSize() { return mySurfaceActor->GetProperty()->GetPointSize(); } diff --git a/src/OBJECT/VISU_ScalarMapAct.h b/src/OBJECT/VISU_ScalarMapAct.h index 7f28fc99..6ab2c7f4 100644 --- a/src/OBJECT/VISU_ScalarMapAct.h +++ b/src/OBJECT/VISU_ScalarMapAct.h @@ -77,7 +77,7 @@ class VISU_OBJECT_EXPORT VISU_ScalarMapAct : public VISU_DataSetActor virtual void - SetShrinkFactor(vtkFloatingPointType theFactor = 0.8); + SetShrinkFactor(double theFactor = 0.8); virtual void @@ -104,7 +104,7 @@ class VISU_OBJECT_EXPORT VISU_ScalarMapAct : public VISU_DataSetActor virtual void - SetFeatureEdgesAngle(vtkFloatingPointType theAngle = 30.0); + SetFeatureEdgesAngle(double theAngle = 30.0); virtual void @@ -119,18 +119,18 @@ class VISU_OBJECT_EXPORT VISU_ScalarMapAct : public VISU_DataSetActor virtual void - SetOpacity(vtkFloatingPointType theValue); + SetOpacity(double theValue); virtual - vtkFloatingPointType + double GetOpacity(); virtual void - SetLineWidth(vtkFloatingPointType theLineWidth); + SetLineWidth(double theLineWidth); virtual - vtkFloatingPointType + double GetLineWidth(); virtual @@ -166,7 +166,7 @@ class VISU_OBJECT_EXPORT VISU_ScalarMapAct : public VISU_DataSetActor GetBarVisibility(); virtual - vtkFloatingPointType + double Get0DElemSize(); virtual @@ -204,7 +204,7 @@ class VISU_OBJECT_EXPORT VISU_ScalarMapAct : public VISU_DataSetActor virtual void - Set0DElemSize(vtkFloatingPointType theValue); + Set0DElemSize(double theValue); protected: diff --git a/src/PIPELINE/SALOME_ExtractGeometry.cxx b/src/PIPELINE/SALOME_ExtractGeometry.cxx index 4af71c54..07bf759e 100755 --- a/src/PIPELINE/SALOME_ExtractGeometry.cxx +++ b/src/PIPELINE/SALOME_ExtractGeometry.cxx @@ -214,8 +214,8 @@ SALOME_ExtractGeometry vtkIdList *cellPts; vtkCell *cell; int numCellPts; - vtkFloatingPointType *x; - vtkFloatingPointType multiplier; + double *x; + double multiplier; vtkPoints *newPts; vtkIdList *newCellPts; vtkPointData *pd = input->GetPointData(); @@ -285,7 +285,7 @@ SALOME_ExtractGeometry // To extract boundary cells, we have to create supplemental information if ( this->ExtractBoundaryCells ) { - vtkFloatingPointType val; + double val; newScalars = vtkFloatArray::New(); newScalars->SetNumberOfValues(numPts); diff --git a/src/PIPELINE/SALOME_ExtractPolyDataGeometry.cxx b/src/PIPELINE/SALOME_ExtractPolyDataGeometry.cxx index 8c25715a..df82d716 100644 --- a/src/PIPELINE/SALOME_ExtractPolyDataGeometry.cxx +++ b/src/PIPELINE/SALOME_ExtractPolyDataGeometry.cxx @@ -198,8 +198,8 @@ SALOME_ExtractPolyDataGeometry vtkIdList *cellPts; vtkCell *cell; int numCellPts; - vtkFloatingPointType *x; - vtkFloatingPointType multiplier; + double *x; + double multiplier; vtkPoints *newPts; vtkIdList *newCellPts; vtkPointData *pd = input->GetPointData(); @@ -269,7 +269,7 @@ SALOME_ExtractPolyDataGeometry // To extract boundary cells, we have to create supplemental information if ( this->ExtractBoundaryCells ) { - vtkFloatingPointType val; + double val; newScalars = vtkFloatArray::New(); newScalars->SetNumberOfValues(numPts); diff --git a/src/PIPELINE/VISUPipeLine.cxx b/src/PIPELINE/VISUPipeLine.cxx index 944407bc..9a3f9854 100644 --- a/src/PIPELINE/VISUPipeLine.cxx +++ b/src/PIPELINE/VISUPipeLine.cxx @@ -230,7 +230,7 @@ CreateColoredPL(VISU_Convertor* theConvertor, vtkIdType anObjID = aPresent->GetNodeObjID(anCellId); vtkIdType aVtkID = aPresent->GetNodeVTKID(anObjID); cout<GetNodeCoord(anObjID); + double* aCoord = aPresent->GetNodeCoord(anObjID); cout<SetUnstructuredGridIDMapper(anUnstructuredGridIDMapper); - vtkFloatingPointType aRange[] = { 4, 5 }; + double aRange[] = { 4, 5 }; cout << "before filter limits set" << endl; vtkObject::GlobalWarningDisplayOn(); aPresent->DebugOn(); @@ -488,7 +488,7 @@ main(int argc, char** argv) } else { dataArr = aPresent->GetInput()->GetPointData()->GetScalars(); } - vtkFloatingPointType aRange[2]; + double aRange[2]; dataArr->GetRange(aRange); MSG(true, "Range[0]: "< #include -vtkCxxRevisionMacro(VISU_CellDataToPointData, "$Revision$"); vtkStandardNewMacro(VISU_CellDataToPointData); //---------------------------------------------------------------------------- diff --git a/src/PIPELINE/VISU_CellDataToPointData.hxx b/src/PIPELINE/VISU_CellDataToPointData.hxx index f6600a55..44f57090 100644 --- a/src/PIPELINE/VISU_CellDataToPointData.hxx +++ b/src/PIPELINE/VISU_CellDataToPointData.hxx @@ -45,7 +45,7 @@ class VISU_PIPELINE_EXPORT VISU_CellDataToPointData : public vtkDataSetAlgorithm { public: static VISU_CellDataToPointData *New(); - vtkTypeRevisionMacro(VISU_CellDataToPointData,vtkDataSetAlgorithm); + vtkTypeMacro(VISU_CellDataToPointData,vtkDataSetAlgorithm); void PrintSelf(ostream& os, vtkIndent indent); // Description: diff --git a/src/PIPELINE/VISU_ColoredPL.cxx b/src/PIPELINE/VISU_ColoredPL.cxx index f5a8ff39..fdced45e 100644 --- a/src/PIPELINE/VISU_ColoredPL.cxx +++ b/src/PIPELINE/VISU_ColoredPL.cxx @@ -169,7 +169,7 @@ VISU_ColoredPL //---------------------------------------------------------------------------- void VISU_ColoredPL -::SetScalarRange( vtkFloatingPointType theRange[2] ) +::SetScalarRange( double theRange[2] ) { if (isnan(theRange[0]) || isnan(theRange[1])) throw std::runtime_error("NAN values in the presentation"); @@ -188,9 +188,9 @@ VISU_ColoredPL //---------------------------------------------------------------------------- void VISU_ColoredPL -::SetScalarFilterRange( vtkFloatingPointType theRange[2] ) +::SetScalarFilterRange( double theRange[2] ) { - vtkFloatingPointType aRange[ 2 ]; + double aRange[ 2 ]; this->GetScalarFilterRange( aRange ); if ( VISU::CheckIsSameRange( aRange, theRange) ) @@ -203,7 +203,7 @@ VISU_ColoredPL //---------------------------------------------------------------------------- void VISU_ColoredPL -::GetScalarFilterRange( vtkFloatingPointType theRange[2] ) +::GetScalarFilterRange( double theRange[2] ) { theRange[ 0 ] = myThreshold->GetLowerThreshold(); theRange[ 1 ] = myThreshold->GetUpperThreshold(); @@ -211,11 +211,11 @@ VISU_ColoredPL //---------------------------------------------------------------------------- -vtkFloatingPointType* +double* VISU_ColoredPL ::GetScalarFilterRange() { - static vtkFloatingPointType aRange[ 2 ]; + static double aRange[ 2 ]; this->GetScalarFilterRange( aRange ); @@ -262,7 +262,7 @@ VISU_ColoredPL this->myDistribution->FillComponent(0, 0); // Create a lookup table to compute a color of a cell VISU_LookupTable* lut = GetMapperTable(); - vtkFloatingPointType aMapScale = lut->GetMapScale(); + double aMapScale = lut->GetMapScale(); // Get scalar values from the input data to calculate their distribution within cells vtkDataArray* dataArr; // Dtermine where we have to take scalars from: cells data or points data. @@ -277,7 +277,7 @@ VISU_ColoredPL } // Get range of scalars values -// vtkFloatingPointType aRange[2]; +// double aRange[2]; // dataArr->GetRange(aRange); // Build the lookup table with the found range @@ -311,7 +311,7 @@ VISU_ColoredPL // RKV : End //---------------------------------------------------------------------------- -vtkFloatingPointType* +double* VISU_ColoredPL ::GetScalarRange() { @@ -366,7 +366,7 @@ VISU_ColoredPL { SetScalarMode(0); - vtkFloatingPointType aRange[2]; + double aRange[2]; GetSourceRange( aRange ); SetScalarRange( aRange ); @@ -410,8 +410,8 @@ void VISU_ColoredPL ::Update() { - vtkFloatingPointType *aRange = GetScalarRange(); - vtkFloatingPointType aScalarRange[2] = {aRange[0], aRange[1]}; + double *aRange = GetScalarRange(); + double aScalarRange[2] = {aRange[0], aRange[1]}; if(myBarTable->GetScale() == VTK_SCALE_LOG10) VISU_LookupTable::ComputeLogRange(aRange, aScalarRange); @@ -481,7 +481,7 @@ VISU_ColoredPL //---------------------------------------------------------------------------- void VISU_ColoredPL -::SetMapScale(vtkFloatingPointType theMapScale) +::SetMapScale(double theMapScale) { if(!VISU::CheckIsSameValue(myMapperTable->GetMapScale(), theMapScale)){ myMapperTable->SetMapScale(theMapScale); @@ -489,7 +489,7 @@ VISU_ColoredPL } } -vtkFloatingPointType +double VISU_ColoredPL ::GetMapScale() { @@ -500,7 +500,7 @@ VISU_ColoredPL //---------------------------------------------------------------------------- void VISU_ColoredPL -::GetSourceRange(vtkFloatingPointType theRange[2]) +::GetSourceRange(double theRange[2]) { myExtractor->Update(); myExtractor->GetOutput()->GetScalarRange( theRange ); @@ -513,7 +513,7 @@ void VISU_ColoredPL ::SetSourceRange() { - vtkFloatingPointType aRange[2]; + double aRange[2]; GetSourceRange( aRange ); SetScalarRange( aRange ); } diff --git a/src/PIPELINE/VISU_ColoredPL.hxx b/src/PIPELINE/VISU_ColoredPL.hxx index 607797b6..16dbc84a 100644 --- a/src/PIPELINE/VISU_ColoredPL.hxx +++ b/src/PIPELINE/VISU_ColoredPL.hxx @@ -61,20 +61,20 @@ public: SetScalarMode(int theScalarMode = 0); virtual - vtkFloatingPointType* + double* GetScalarRange(); virtual void - SetScalarRange( vtkFloatingPointType theRange[2] ); + SetScalarRange( double theRange[2] ); void - SetScalarFilterRange( vtkFloatingPointType theRange[2] ); + SetScalarFilterRange( double theRange[2] ); void - GetScalarFilterRange( vtkFloatingPointType theRange[2] ); + GetScalarFilterRange( double theRange[2] ); - vtkFloatingPointType* + double* GetScalarFilterRange(); bool @@ -127,15 +127,15 @@ public: virtual void - SetMapScale(vtkFloatingPointType theMapScale = 1.0); + SetMapScale(double theMapScale = 1.0); virtual - vtkFloatingPointType + double GetMapScale(); virtual void - GetSourceRange(vtkFloatingPointType theRange[2]); + GetSourceRange(double theRange[2]); virtual void diff --git a/src/PIPELINE/VISU_CutLinesBasePL.hxx b/src/PIPELINE/VISU_CutLinesBasePL.hxx index 29d78766..6ca63be9 100644 --- a/src/PIPELINE/VISU_CutLinesBasePL.hxx +++ b/src/PIPELINE/VISU_CutLinesBasePL.hxx @@ -39,7 +39,7 @@ public: public: //! Returns direction that is defined by position & orientation of the basic and tool planes - const vtkFloatingPointType* + const double* GetRealDirLn() { return myRealDirLn; @@ -49,7 +49,7 @@ public: Returns direction that corresponds to the myRealDirLn, but has the same direction as main axis. */ - const vtkFloatingPointType* + const double* GetDirLn() { return myDirLn; @@ -60,7 +60,7 @@ public: where is the first intersection of the given mesh. with the defined direction. */ - const vtkFloatingPointType* + const double* GetBasePnt() { return myBasePnt; @@ -73,7 +73,7 @@ public: 3. Distance between the last point and initial points of intersection. with the defined direction. */ - const vtkFloatingPointType* + const double* GetBoundPrjLn() { return myBoundPrjLn; @@ -82,10 +82,10 @@ public: protected: VISU_CutLinesBasePL(); - vtkFloatingPointType myDirLn[3]; - vtkFloatingPointType myRealDirLn[3]; - vtkFloatingPointType myBoundPrjLn[3]; - vtkFloatingPointType myBasePnt[3]; + double myDirLn[3]; + double myRealDirLn[3]; + double myBoundPrjLn[3]; + double myBasePnt[3]; private: VISU_CutLinesBasePL(const VISU_CutLinesBasePL&); // Not implemented. diff --git a/src/PIPELINE/VISU_CutLinesPL.cxx b/src/PIPELINE/VISU_CutLinesPL.cxx index 8428b2b3..0b9c2bfe 100644 --- a/src/PIPELINE/VISU_CutLinesPL.cxx +++ b/src/PIPELINE/VISU_CutLinesPL.cxx @@ -86,7 +86,7 @@ VISU_CutLinesPL //---------------------------------------------------------------------------- void VISU_CutLinesPL -::SetPosition(vtkFloatingPointType thePosition) +::SetPosition(double thePosition) { bool anIsSameValue = VISU::CheckIsSameValue(myPosition, thePosition); anIsSameValue &= (myCondition == 0); @@ -106,21 +106,21 @@ VISU_CutLinesPL } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_CutLinesPL ::GetPosition() { - vtkFloatingPointType aPosition = myPosition; + double aPosition = myPosition; if(myCondition){ - vtkFloatingPointType aBounds[6]; + double aBounds[6]; GetMergedInput()->GetBounds(aBounds); - vtkFloatingPointType aDir[3]; + double aDir[3]; GetDir(aDir, myAng[0], myBasePlane[0]); - vtkFloatingPointType aBoundPrj[3]; + double aBoundPrj[3]; GetBoundProject(aBoundPrj, aBounds, aDir); @@ -169,10 +169,10 @@ VISU_CutLinesPL vtkAppendPolyData *anAppendPolyData = vtkAppendPolyData::New(); //Build base plane - vtkFloatingPointType aBaseBounds[6]; + double aBaseBounds[6]; GetMergedInput()->GetBounds(aBaseBounds); - vtkFloatingPointType aDir[2][3]; + double aDir[2][3]; GetDir(aDir[0], myAng[0], myBasePlane[0]); @@ -192,7 +192,7 @@ VISU_CutLinesPL if(aDataSet->GetNumberOfCells() == 0) aDataSet = GetMergedInput(); - vtkFloatingPointType aBounds[6]; + double aBounds[6]; aDataSet->GetBounds(aBounds); GetDir(aDir[1], @@ -242,13 +242,13 @@ VISU_CutLinesPL ::CutWithPlanes(vtkAppendPolyData* theAppendPolyData, vtkDataSet* theDataSet, int theNbPlanes, - vtkFloatingPointType theDir[3], - vtkFloatingPointType theBounds[6], - vtkFloatingPointType thePartPosition, + double theDir[3], + double theBounds[6], + double thePartPosition, int thePartCondition, - vtkFloatingPointType theDisplacement) + double theDisplacement) { - std::vector aPartPosition(1,thePartPosition); + std::vector aPartPosition(1,thePartPosition); std::vector aPartCondition(1,thePartCondition); VISU_CutPlanesPL::CutWithPlanes(theAppendPolyData, theDataSet, diff --git a/src/PIPELINE/VISU_CutLinesPL.hxx b/src/PIPELINE/VISU_CutLinesPL.hxx index 0c238aa9..f82032dc 100644 --- a/src/PIPELINE/VISU_CutLinesPL.hxx +++ b/src/PIPELINE/VISU_CutLinesPL.hxx @@ -46,10 +46,10 @@ public: virtual void - SetPosition(vtkFloatingPointType thePosition); + SetPosition(double thePosition); virtual - vtkFloatingPointType + double GetPosition(); virtual @@ -77,11 +77,11 @@ public: CutWithPlanes(vtkAppendPolyData* theAppendPolyData, vtkDataSet* theDataSet, int theNbPlanes, - vtkFloatingPointType theDir[3], - vtkFloatingPointType theBounds[6], - vtkFloatingPointType thePlanePosition, + double theDir[3], + double theBounds[6], + double thePlanePosition, int thePlaneCondition, - vtkFloatingPointType theDisplacement); + double theDisplacement); protected: VISU_CutLinesPL(); @@ -91,7 +91,7 @@ protected: DoShallowCopy(VISU_PipeLine *thePipeLine, bool theIsCopyInput); - vtkFloatingPointType myPosition; + double myPosition; int myCondition; private: diff --git a/src/PIPELINE/VISU_CutPlanesPL.cxx b/src/PIPELINE/VISU_CutPlanesPL.cxx index 38eb8752..3398fa9c 100644 --- a/src/PIPELINE/VISU_CutPlanesPL.cxx +++ b/src/PIPELINE/VISU_CutPlanesPL.cxx @@ -38,7 +38,7 @@ //#include -static vtkFloatingPointType EPS = 1.0E-3; +static double EPS = 1.0E-3; #ifdef _DEBUG_ static int MYDEBUG = 0; @@ -179,12 +179,12 @@ VISU_CutPlanesPL SetPartPosition(); - vtkFloatingPointType aDir[3]; + double aDir[3]; GetDir(aDir, myAng[0], myBasePlane[0]); - vtkFloatingPointType aBounds[6]; + double aBounds[6]; vtkDataSet* aFilterOutput = GetMergeFilterOutput(); @@ -243,10 +243,10 @@ VISU_CutPlanesPL //---------------------------------------------------------------------------- -vtkFloatingPointType* +double* VISU_CutPlanesPL:: -GetRx(vtkFloatingPointType theRx[3][3], - vtkFloatingPointType thaAng) +GetRx(double theRx[3][3], + double 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); @@ -257,10 +257,10 @@ GetRx(vtkFloatingPointType theRx[3][3], //---------------------------------------------------------------------------- -vtkFloatingPointType* +double* VISU_CutPlanesPL -::GetRy(vtkFloatingPointType theRy[3][3], - vtkFloatingPointType thaAng) +::GetRy(double theRy[3][3], + double 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; @@ -270,10 +270,10 @@ VISU_CutPlanesPL //---------------------------------------------------------------------------- -vtkFloatingPointType* +double* VISU_CutPlanesPL -::GetRz(vtkFloatingPointType theRz[3][3], - vtkFloatingPointType thaAng) +::GetRz(double theRz[3][3], + double 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; @@ -285,8 +285,8 @@ VISU_CutPlanesPL //---------------------------------------------------------------------------- void VISU_CutPlanesPL -::CorrectPnt(vtkFloatingPointType thePnt[3], - const vtkFloatingPointType BoundPrj[6]) +::CorrectPnt(double thePnt[3], + const double BoundPrj[6]) { for(int i = 0, j = 0; i < 3; ++i, j=2*i){ if(thePnt[i] < BoundPrj[j]) thePnt[i] = BoundPrj[j]; @@ -298,11 +298,11 @@ VISU_CutPlanesPL //---------------------------------------------------------------------------- void VISU_CutPlanesPL -::GetBoundProject(vtkFloatingPointType BoundPrj[3], - const vtkFloatingPointType BoundBox[6], - const vtkFloatingPointType Dir[3]) +::GetBoundProject(double BoundPrj[3], + const double BoundBox[6], + const double Dir[3]) { - vtkFloatingPointType BoundPoints[8][3] = { {BoundBox[0],BoundBox[2],BoundBox[4]}, + double 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]}, @@ -312,7 +312,7 @@ VISU_CutPlanesPL {BoundBox[1],BoundBox[3],BoundBox[5]}}; BoundPrj[0] = vtkMath::Dot(Dir,BoundPoints[0]), BoundPrj[1] = BoundPrj[0]; for(int i = 1; i < 8; i++){ - vtkFloatingPointType tmp = vtkMath::Dot(Dir,BoundPoints[i]); + double tmp = vtkMath::Dot(Dir,BoundPoints[i]); if(BoundPrj[1] < tmp) BoundPrj[1] = tmp; if(BoundPrj[0] > tmp) BoundPrj[0] = tmp; } @@ -327,8 +327,8 @@ VISU_CutPlanesPL void VISU_CutPlanesPL ::SetOrientation(const VISU_CutPlanesPL::PlaneOrientation& theOrient, - vtkFloatingPointType theXAng, - vtkFloatingPointType theYAng, + double theXAng, + double theYAng, int theNum) { myBasePlane[theNum] = theOrient; @@ -353,7 +353,7 @@ VISU_CutPlanesPL return myBasePlane[theNum]; } -vtkFloatingPointType +double VISU_CutPlanesPL ::GetRotateX(int theNum) { @@ -367,7 +367,7 @@ VISU_CutPlanesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_CutPlanesPL ::GetRotateY(int theNum) { @@ -381,7 +381,7 @@ VISU_CutPlanesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_CutPlanesPL ::GetDisplacement(int theNum) { @@ -392,7 +392,7 @@ VISU_CutPlanesPL //---------------------------------------------------------------------------- void VISU_CutPlanesPL -::SetDisplacement(vtkFloatingPointType theDisp, +::SetDisplacement(double theDisp, int theNum) { if(VISU::CheckIsSameValue(myDisplacement[theNum], theDisp)) @@ -430,7 +430,7 @@ VISU_CutPlanesPL void VISU_CutPlanesPL ::SetPartPosition(int thePartNumber, - vtkFloatingPointType thePartPosition) + double thePartPosition) { if(thePartNumber >= myNbParts) return; @@ -447,7 +447,7 @@ VISU_CutPlanesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_CutPlanesPL ::GetPartPosition(int thePartNumber, int theNum) @@ -455,9 +455,9 @@ VISU_CutPlanesPL if(thePartNumber >= myNbParts) return 0; - vtkFloatingPointType aPosition = myPartPosition[thePartNumber]; + double aPosition = myPartPosition[thePartNumber]; if(myPartCondition[thePartNumber]){ - vtkFloatingPointType aDir[3], aBounds[6], aBoundPrj[3]; + double aDir[3], aBounds[6], aBoundPrj[3]; if(!IsDeformed()) GetMergedInput()->GetBounds(aBounds); else @@ -473,9 +473,9 @@ VISU_CutPlanesPL aDir); if(myNbParts > 1){ - vtkFloatingPointType aDBoundPrj = aBoundPrj[2]/(myNbParts - 1); - vtkFloatingPointType aDisplacement = aDBoundPrj * myDisplacement[theNum]; - vtkFloatingPointType aStartPosition = aBoundPrj[0] - 0.5*aDBoundPrj + aDisplacement; + double aDBoundPrj = aBoundPrj[2]/(myNbParts - 1); + double aDisplacement = aDBoundPrj * myDisplacement[theNum]; + double aStartPosition = aBoundPrj[0] - 0.5*aDBoundPrj + aDisplacement; aPosition = aStartPosition + thePartNumber*aDBoundPrj; }else aPosition = aBoundPrj[0] + aBoundPrj[2]*myDisplacement[theNum]; @@ -519,12 +519,12 @@ VISU_CutPlanesPL //---------------------------------------------------------------------------- void VISU_CutPlanesPL -::GetDir(vtkFloatingPointType theDir[3], - const vtkFloatingPointType theAng[3], +::GetDir(double theDir[3], + const double theAng[3], const PlaneOrientation& theBasePlane) { int iPlane = 0; - vtkFloatingPointType aRx[3][3], aRy[3][3], aRz[3][3], aRotation[3][3]; + double 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); @@ -556,8 +556,8 @@ void VISU_CutPlanesPL ::CutWithPlane(vtkAppendPolyData* theAppendPolyData, vtkDataSet* theDataSet, - vtkFloatingPointType theDir[3], - vtkFloatingPointType theOrig[3]) + double theDir[3], + double theOrig[3]) { vtkEDFCutter *aCutPlane = vtkEDFCutter::New(); aCutPlane->SetInput(theDataSet); @@ -578,18 +578,18 @@ VISU_CutPlanesPL ::CutWithPlanes(vtkAppendPolyData* theAppendPolyData, vtkDataSet* theDataSet, int theNbPlanes, - vtkFloatingPointType theDir[3], - vtkFloatingPointType theBounds[6], - const std::vector& thePlanePosition, + double theDir[3], + double theBounds[6], + const std::vector& thePlanePosition, const std::vector& thePlaneCondition, - vtkFloatingPointType theDisplacement) + double theDisplacement) { - vtkFloatingPointType aBoundPrj[3], aOrig[3], aPosition; + double aBoundPrj[3], aOrig[3], aPosition; GetBoundProject(aBoundPrj, theBounds, theDir); if(theNbPlanes > 1){ - vtkFloatingPointType aDBoundPrj = aBoundPrj[2]/(theNbPlanes - 1); - vtkFloatingPointType aDisplacement = aDBoundPrj*theDisplacement; - vtkFloatingPointType aStartPosition = aBoundPrj[0] - 0.5*aDBoundPrj + aDisplacement; + double aDBoundPrj = aBoundPrj[2]/(theNbPlanes - 1); + double aDisplacement = aDBoundPrj*theDisplacement; + double aStartPosition = aBoundPrj[0] - 0.5*aDBoundPrj + aDisplacement; for (int i = 0; i < theNbPlanes; i++){ aPosition = aStartPosition + i*aDBoundPrj; if(thePlaneCondition[i]){ @@ -639,7 +639,7 @@ getVectorialField() } //---------------------------------------------------------------------------- -void VISU_CutPlanesPL::SetMapScale(vtkFloatingPointType theMapScale){ +void VISU_CutPlanesPL::SetMapScale(double theMapScale){ Superclass::SetMapScale(theMapScale); if(IsDeformed()) VISU_OptionalDeformationPL::SetMapScale(theMapScale); diff --git a/src/PIPELINE/VISU_CutPlanesPL.hxx b/src/PIPELINE/VISU_CutPlanesPL.hxx index d4dbae22..238794d5 100644 --- a/src/PIPELINE/VISU_CutPlanesPL.hxx +++ b/src/PIPELINE/VISU_CutPlanesPL.hxx @@ -59,8 +59,8 @@ public: virtual void SetOrientation(const VISU_CutPlanesPL::PlaneOrientation& theOrient, - vtkFloatingPointType theXAng, - vtkFloatingPointType theYAng, + double theXAng, + double theYAng, int theNum = 0); virtual @@ -68,29 +68,29 @@ public: GetPlaneOrientation(int theNum = 0); virtual - vtkFloatingPointType + double GetRotateX(int theNum = 0); virtual - vtkFloatingPointType + double GetRotateY(int theNum = 0); virtual - vtkFloatingPointType + double GetDisplacement(int theNum = 0); virtual void - SetDisplacement(vtkFloatingPointType theDisp, + SetDisplacement(double theDisp, int theNum = 0); virtual void SetPartPosition(int thePartNumber, - vtkFloatingPointType thePartPosition); + double thePartPosition); virtual - vtkFloatingPointType + double GetPartPosition(int thePartNumber, int theNum = 0); @@ -133,35 +133,35 @@ public: public: static - vtkFloatingPointType* - GetRx(vtkFloatingPointType theRx[3][3], - vtkFloatingPointType thaAng); + double* + GetRx(double theRx[3][3], + double thaAng); static - vtkFloatingPointType* - GetRy(vtkFloatingPointType theRy[3][3], - vtkFloatingPointType thaAng); + double* + GetRy(double theRy[3][3], + double thaAng); static - vtkFloatingPointType* - GetRz(vtkFloatingPointType theRz[3][3], - vtkFloatingPointType thaAng); + double* + GetRz(double theRz[3][3], + double thaAng); static void - CorrectPnt(vtkFloatingPointType thePnt[3], - const vtkFloatingPointType BoundPrj[6]); + CorrectPnt(double thePnt[3], + const double BoundPrj[6]); static void - GetBoundProject(vtkFloatingPointType BoundPrj[3], - const vtkFloatingPointType BoundBox[6], - const vtkFloatingPointType Dir[3]); + GetBoundProject(double BoundPrj[3], + const double BoundBox[6], + const double Dir[3]); static void - GetDir(vtkFloatingPointType theDir[3], - const vtkFloatingPointType theAng[3], + GetDir(double theDir[3], + const double theAng[3], const PlaneOrientation& theBasePlane); static @@ -172,26 +172,26 @@ public: void CutWithPlane(vtkAppendPolyData* theAppendPolyData, vtkDataSet* theDataSet, - vtkFloatingPointType theDir[3], - vtkFloatingPointType theOrig[3]); + double theDir[3], + double theOrig[3]); static void CutWithPlanes(vtkAppendPolyData* theAppendPolyData, vtkDataSet* theDataSet, int theNbPlanes, - vtkFloatingPointType theDir[3], - vtkFloatingPointType theBounds[6], - const std::vector& thePlanePosition, + double theDir[3], + double theBounds[6], + const std::vector& thePlanePosition, const std::vector& thePlaneCondition, - vtkFloatingPointType theDisplacement); + double theDisplacement); virtual void SetVectorialField(VISU::PUnstructuredGridIDMapper); VISU::PUnstructuredGridIDMapper getVectorialField(); virtual void - SetMapScale(vtkFloatingPointType theMapScale = 1.0); + SetMapScale(double theMapScale = 1.0); protected: @@ -214,9 +214,9 @@ protected: int myNbParts; PlaneOrientation myBasePlane[2]; - vtkFloatingPointType myAng[2][3], myDisplacement[2]; + double myAng[2][3], myDisplacement[2]; vtkAppendPolyData *myAppendPolyData; - std::vector myPartPosition; + std::vector myPartPosition; std::vector myPartCondition; private: diff --git a/src/PIPELINE/VISU_CutSegmentPL.cxx b/src/PIPELINE/VISU_CutSegmentPL.cxx index 5ef5d6f1..96c18248 100644 --- a/src/PIPELINE/VISU_CutSegmentPL.cxx +++ b/src/PIPELINE/VISU_CutSegmentPL.cxx @@ -45,7 +45,7 @@ VISU_CutSegmentPL Superclass::DoShallowCopy(thePipeLine, theIsCopyInput); if(VISU_CutSegmentPL *aPipeLine = dynamic_cast(thePipeLine)){ - vtkFloatingPointType x, y, z; + double x, y, z; aPipeLine->GetPoint1(x, y, z); SetPoint1(x, y, z); aPipeLine->GetPoint2(x, y, z); @@ -60,12 +60,12 @@ VISU_CutSegmentPL { Superclass::Init(); - vtkFloatingPointType aBounds[6]; + double aBounds[6]; GetMergedInput()->GetBounds(aBounds); for( int i = 0; i < 3; i++ ) { - vtkFloatingPointType min = aBounds[ 2*i ]; - vtkFloatingPointType max = aBounds[ 2*i+1 ]; + double min = aBounds[ 2*i ]; + double max = aBounds[ 2*i+1 ]; myPoint1[ i ] = i == 1 ? min : ( min + max ) / 2; myPoint2[ i ] = i == 1 ? max : ( min + max ) / 2; } @@ -74,9 +74,9 @@ VISU_CutSegmentPL //---------------------------------------------------------------------------- void VISU_CutSegmentPL -::SetPoint1(vtkFloatingPointType theX, - vtkFloatingPointType theY, - vtkFloatingPointType theZ ) +::SetPoint1(double theX, + double theY, + double theZ ) { myPoint1[0] = theX; myPoint1[1] = theY; @@ -86,9 +86,9 @@ VISU_CutSegmentPL //---------------------------------------------------------------------------- void VISU_CutSegmentPL -::GetPoint1(vtkFloatingPointType& theX, - vtkFloatingPointType& theY, - vtkFloatingPointType& theZ ) +::GetPoint1(double& theX, + double& theY, + double& theZ ) { theX = myPoint1[0]; theY = myPoint1[1]; @@ -98,9 +98,9 @@ VISU_CutSegmentPL //---------------------------------------------------------------------------- void VISU_CutSegmentPL -::SetPoint2(vtkFloatingPointType theX, - vtkFloatingPointType theY, - vtkFloatingPointType theZ ) +::SetPoint2(double theX, + double theY, + double theZ ) { myPoint2[0] = theX; myPoint2[1] = theY; @@ -110,9 +110,9 @@ VISU_CutSegmentPL //---------------------------------------------------------------------------- void VISU_CutSegmentPL -::GetPoint2(vtkFloatingPointType& theX, - vtkFloatingPointType& theY, - vtkFloatingPointType& theZ ) +::GetPoint2(double& theX, + double& theY, + double& theZ ) { theX = myPoint2[0]; theY = myPoint2[1]; @@ -136,7 +136,7 @@ VISU_CutSegmentPL if(VISU::IsQuadraticData(aMergedInput)) // Bug 0020123, note 0005343 throw std::runtime_error("Impossible to build presentation"); - vtkFloatingPointType aVector12[3], aVector21[3]; + double aVector12[3], aVector21[3]; VISU::Sub( myPoint2, myPoint1, aVector12 ); VISU::Sub( myPoint1, myPoint2, aVector21 ); @@ -148,20 +148,20 @@ VISU_CutSegmentPL // compute two vectors which are orthogonal to the line between the input points // these vectors could be used as normals of two planes, intersected exactly at this line // origin of these planes should be places at one of the input points - vtkFloatingPointType aVector1[3], aVector2[3]; + double aVector1[3], aVector2[3]; vtkMath::Perpendiculars( aVector12, aVector1, aVector2, 0 ); ClearAppendPolyData(myAppendPolyData); SetPartPosition(1); - vtkFloatingPointType aBounds[6]; + double aBounds[6]; GetMergedInput()->GetBounds(aBounds); // check if the input is planar - in this case one cut plane will be enough // (besides, the second cut corrupts the resulting output, splitting it to points) bool isPlanar = true; - vtkFloatingPointType aNormal[3] = { 0.0, 0.0, 0.0 }; + double aNormal[3] = { 0.0, 0.0, 0.0 }; if( fabs( aBounds[0] - aBounds[1] ) < aPrecision ) aNormal[0] = 1.0; else if( fabs( aBounds[2] - aBounds[3] ) < aPrecision ) @@ -173,7 +173,7 @@ VISU_CutSegmentPL if( isPlanar ) { // choose a vector which is not collinear with normal of the plane - vtkFloatingPointType aCross[3]; + double aCross[3]; vtkMath::Cross( aVector1, aNormal, aCross ); bool isFirst = vtkMath::Norm( aCross ) > aPrecision; VISU_CutPlanesPL::CutWithPlane(myAppendPolyData, GetMergedInput(), isFirst ? aVector1 : aVector2, myPoint1); diff --git a/src/PIPELINE/VISU_CutSegmentPL.hxx b/src/PIPELINE/VISU_CutSegmentPL.hxx index 50b721d2..273f2dad 100644 --- a/src/PIPELINE/VISU_CutSegmentPL.hxx +++ b/src/PIPELINE/VISU_CutSegmentPL.hxx @@ -40,27 +40,27 @@ public: virtual void - SetPoint1(vtkFloatingPointType theX, - vtkFloatingPointType theY, - vtkFloatingPointType theZ); + SetPoint1(double theX, + double theY, + double theZ); virtual void - GetPoint1(vtkFloatingPointType& theX, - vtkFloatingPointType& theY, - vtkFloatingPointType& theZ); + GetPoint1(double& theX, + double& theY, + double& theZ); virtual void - SetPoint2(vtkFloatingPointType theX, - vtkFloatingPointType theY, - vtkFloatingPointType theZ); + SetPoint2(double theX, + double theY, + double theZ); virtual void - GetPoint2(vtkFloatingPointType& theX, - vtkFloatingPointType& theY, - vtkFloatingPointType& theZ); + GetPoint2(double& theX, + double& theY, + double& theZ); public: virtual @@ -82,8 +82,8 @@ protected: DoShallowCopy(VISU_PipeLine *thePipeLine, bool theIsCopyInput); - vtkFloatingPointType myPoint1[3]; - vtkFloatingPointType myPoint2[3]; + double myPoint1[3]; + double myPoint2[3]; private: VISU_CutSegmentPL(const VISU_CutSegmentPL&); // Not implemented. diff --git a/src/PIPELINE/VISU_DataSetMapperHolder.cxx b/src/PIPELINE/VISU_DataSetMapperHolder.cxx index 916c391f..155e7309 100644 --- a/src/PIPELINE/VISU_DataSetMapperHolder.cxx +++ b/src/PIPELINE/VISU_DataSetMapperHolder.cxx @@ -107,7 +107,7 @@ void VISU_DataSetMapperHolder ::SetElnoDisassembleState( bool theIsShrunk ) { - vtkFloatingPointType aShrinkFactor = std::abs( myElnoDisassembleFilter->GetShrinkFactor() ); + double aShrinkFactor = std::abs( myElnoDisassembleFilter->GetShrinkFactor() ); if ( theIsShrunk ) myElnoDisassembleFilter->SetShrinkFactor( aShrinkFactor ); else @@ -233,7 +233,7 @@ VISU_DataSetMapperHolder } //---------------------------------------------------------------------------- -vtkFloatingPointType* +double* VISU_DataSetMapperHolder ::GetNodeCoord(vtkIdType theObjID) { diff --git a/src/PIPELINE/VISU_DataSetMapperHolder.hxx b/src/PIPELINE/VISU_DataSetMapperHolder.hxx index bf825f2c..f2faa6fc 100644 --- a/src/PIPELINE/VISU_DataSetMapperHolder.hxx +++ b/src/PIPELINE/VISU_DataSetMapperHolder.hxx @@ -85,7 +85,7 @@ public: GetNodeVTKID(vtkIdType theID); virtual - vtkFloatingPointType* + double* GetNodeCoord(vtkIdType theObjID); virtual diff --git a/src/PIPELINE/VISU_DeformationPL.cxx b/src/PIPELINE/VISU_DeformationPL.cxx index 65048f1d..e913626d 100755 --- a/src/PIPELINE/VISU_DeformationPL.cxx +++ b/src/PIPELINE/VISU_DeformationPL.cxx @@ -89,7 +89,7 @@ VISU_DeformationPL::GetMTime(){ } //---------------------------------------------------------------------------- -void VISU_DeformationPL::SetScale(vtkFloatingPointType theScaleFactor) +void VISU_DeformationPL::SetScale(double theScaleFactor) { if(myScaleFactor == theScaleFactor) return; @@ -97,7 +97,7 @@ void VISU_DeformationPL::SetScale(vtkFloatingPointType theScaleFactor) myWarpVector->SetScaleFactor(myScaleFactor*myMapScaleFactor); } -void VISU_DeformationPL::SetMapScale(vtkFloatingPointType theMapScaleFactor) +void VISU_DeformationPL::SetMapScale(double theMapScaleFactor) { if(myMapScaleFactor == theMapScaleFactor) return; @@ -107,7 +107,7 @@ void VISU_DeformationPL::SetMapScale(vtkFloatingPointType theMapScaleFactor) } -vtkFloatingPointType VISU_DeformationPL::GetScale() +double VISU_DeformationPL::GetScale() { return myScaleFactor; } @@ -142,18 +142,18 @@ vtkDataSet* VISU_DeformationPL::GetMergeFilterOutput(){ } //---------------------------------------------------------------------------- -vtkFloatingPointType VISU_DeformationPL::GetDefaultScaleFactor(VISU_DeformationPL *thePipeLine) +double VISU_DeformationPL::GetDefaultScaleFactor(VISU_DeformationPL *thePipeLine) { if(!thePipeLine || !thePipeLine->GetMergeFilterOutput()) return 0.0; - vtkFloatingPointType aSourceRange[2]; + double aSourceRange[2]; thePipeLine->GetMergeFilterOutput()->GetScalarRange(aSourceRange); - static vtkFloatingPointType EPS = 1.0 / VTK_LARGE_FLOAT; + static double EPS = 1.0 / VTK_LARGE_FLOAT; if(fabs(aSourceRange[1]) > EPS){ vtkDataSet* aDataSet = thePipeLine->GetMergeFilterOutput(); - vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor(aDataSet); + double aScaleFactor = VISU_DeformedShapePL::GetScaleFactor(aDataSet); return aScaleFactor / aSourceRange[1]; } return 0.0; diff --git a/src/PIPELINE/VISU_DeformationPL.hxx b/src/PIPELINE/VISU_DeformationPL.hxx index 487d1645..8f7bff2c 100755 --- a/src/PIPELINE/VISU_DeformationPL.hxx +++ b/src/PIPELINE/VISU_DeformationPL.hxx @@ -41,9 +41,9 @@ public: virtual ~VISU_DeformationPL(); //----------------------------------------------------------- - virtual void SetScale(vtkFloatingPointType theScaleFactor); - virtual void SetMapScale(vtkFloatingPointType theMapScaleFactor); - virtual vtkFloatingPointType GetScale(); + virtual void SetScale(double theScaleFactor); + virtual void SetMapScale(double theMapScaleFactor); + virtual double GetScale(); //----------------------------------------------------------- virtual void SetVectorialField(VISU::PUnstructuredGridIDMapper theIdMapper) = 0; @@ -56,7 +56,7 @@ public: long int GetMTime(); - static vtkFloatingPointType GetDefaultScaleFactor(VISU_DeformationPL *thePipeLine); + static double GetDefaultScaleFactor(VISU_DeformationPL *thePipeLine); void SetWarpVectorInput(vtkDataSet *theInput); vtkDataSet* GetWarpVectorOutput(); @@ -77,8 +77,8 @@ protected: VISU_CellDataToPointData *myCellDataToPointData; private: - vtkFloatingPointType myScaleFactor; - vtkFloatingPointType myMapScaleFactor; + double myScaleFactor; + double myMapScaleFactor; }; diff --git a/src/PIPELINE/VISU_DeformedGridPL.cxx b/src/PIPELINE/VISU_DeformedGridPL.cxx index d521efe9..97702146 100644 --- a/src/PIPELINE/VISU_DeformedGridPL.cxx +++ b/src/PIPELINE/VISU_DeformedGridPL.cxx @@ -142,7 +142,7 @@ VISU_DeformedGridPL { myContourFilter->SetInput( aPointSet ); - vtkFloatingPointType aScalarRange[2]; + double aScalarRange[2]; GetSourceRange( aScalarRange ); myContourFilter->GenerateValues( GetNumberOfContours(), aScalarRange ); @@ -174,7 +174,7 @@ VISU_DeformedGridPL //---------------------------------------------------------------------------- void VISU_DeformedGridPL -::SetScaleFactor(vtkFloatingPointType theScaleFactor) +::SetScaleFactor(double theScaleFactor) { if ( VISU::CheckIsSameValue( myWarpScalar->GetScaleFactor(), theScaleFactor ) ) return; @@ -185,7 +185,7 @@ VISU_DeformedGridPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_DeformedGridPL ::GetScaleFactor() { @@ -218,16 +218,16 @@ VISU_DeformedGridPL //---------------------------------------------------------------------------- void VISU_DeformedGridPL -::SetMapScale(vtkFloatingPointType theMapScale) +::SetMapScale(double theMapScale) { Superclass::SetMapScale(theMapScale); myMapScaleFactor = theMapScale; if ( myIsContour ) { - vtkFloatingPointType aSourceRange[2]; + double aSourceRange[2]; GetSourceRange( aSourceRange ); - vtkFloatingPointType aDeltaRange = aSourceRange[1] - aSourceRange[0]; - vtkFloatingPointType aNewRange[2] = { aSourceRange[1] - theMapScale*aDeltaRange, aSourceRange[1] }; + double aDeltaRange = aSourceRange[1] - aSourceRange[0]; + double aNewRange[2] = { aSourceRange[1] - theMapScale*aDeltaRange, aSourceRange[1] }; myContourFilter->GenerateValues( GetNumberOfContours(), aNewRange ); } diff --git a/src/PIPELINE/VISU_DeformedGridPL.hxx b/src/PIPELINE/VISU_DeformedGridPL.hxx index e399689b..382e4c11 100644 --- a/src/PIPELINE/VISU_DeformedGridPL.hxx +++ b/src/PIPELINE/VISU_DeformedGridPL.hxx @@ -54,9 +54,9 @@ public: //---------------------------------------------------------------------------- void - SetScaleFactor( vtkFloatingPointType theScaleFactor ); + SetScaleFactor( double theScaleFactor ); - vtkFloatingPointType + double GetScaleFactor(); void @@ -73,7 +73,7 @@ public: virtual void - SetMapScale(vtkFloatingPointType theMapScale = 1.0); + SetMapScale(double theMapScale = 1.0); //---------------------------------------------------------------------------- virtual @@ -104,8 +104,8 @@ private: VISU_DeformedGridPL(const VISU_DeformedGridPL&); // Not implemented. void operator=(const VISU_DeformedGridPL&); // Not implemented. - vtkFloatingPointType myScaleFactor; - vtkFloatingPointType myMapScaleFactor; + double myScaleFactor; + double myMapScaleFactor; vtkContourFilter* myContourFilter; vtkWarpScalar *myWarpScalar; bool myIsContour; diff --git a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx index ddff1cb3..ccac365f 100644 --- a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx +++ b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx @@ -354,7 +354,7 @@ VISU_DeformedShapeAndScalarMapPL */ void VISU_DeformedShapeAndScalarMapPL -::SetScale(vtkFloatingPointType theScale) +::SetScale(double theScale) { if(VISU::CheckIsSameValue(myScaleFactor, theScale)) return; @@ -367,7 +367,7 @@ VISU_DeformedShapeAndScalarMapPL /*! * Gets scale of deformed shape. */ -vtkFloatingPointType +double VISU_DeformedShapeAndScalarMapPL ::GetScale() { @@ -380,7 +380,7 @@ VISU_DeformedShapeAndScalarMapPL */ void VISU_DeformedShapeAndScalarMapPL -::SetMapScale(vtkFloatingPointType theMapScale) +::SetMapScale(double theMapScale) { myMapScaleFactor = theMapScale; Superclass::SetMapScale(theMapScale); @@ -429,7 +429,7 @@ VISU_DeformedShapeAndScalarMapPL //---------------------------------------------------------------------------- void VISU_DeformedShapeAndScalarMapPL -::SetScalarRange(vtkFloatingPointType theRange[2]) +::SetScalarRange(double theRange[2]) { if (isnan(theRange[0]) || isnan(theRange[1])) throw std::runtime_error("NAN values in the presentation"); @@ -443,7 +443,7 @@ VISU_DeformedShapeAndScalarMapPL //---------------------------------------------------------------------------- -vtkFloatingPointType* +double* VISU_DeformedShapeAndScalarMapPL ::GetScalarRange() { @@ -460,7 +460,7 @@ VISU_DeformedShapeAndScalarMapPL */ void VISU_DeformedShapeAndScalarMapPL -::GetSourceRange(vtkFloatingPointType theRange[2]) +::GetSourceRange(double theRange[2]) { myScalarsExtractor->Update(); myScalarsExtractor->GetUnstructuredGridOutput()->GetScalarRange(theRange); diff --git a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx index 43b37991..f9911df9 100644 --- a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx +++ b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx @@ -50,10 +50,10 @@ public: virtual void - SetScale(vtkFloatingPointType theScale); + SetScale(double theScale); virtual - vtkFloatingPointType + double GetScale(); virtual @@ -70,15 +70,15 @@ public: virtual void - SetScalarRange(vtkFloatingPointType theRange[2]); + SetScalarRange(double theRange[2]); virtual - vtkFloatingPointType* + double* GetScalarRange(); virtual void - GetSourceRange(vtkFloatingPointType theRange[2]); + GetSourceRange(double theRange[2]); virtual void @@ -143,7 +143,7 @@ public: virtual void - SetMapScale(vtkFloatingPointType theMapScale = 1.0); + SetMapScale(double theMapScale = 1.0); protected: VISU_DeformedShapeAndScalarMapPL(); @@ -163,8 +163,8 @@ protected: private: VISU_DeformedShapeAndScalarMapPL(const VISU_DeformedShapeAndScalarMapPL&); - vtkFloatingPointType myScaleFactor; - vtkFloatingPointType myMapScaleFactor; + double myScaleFactor; + double myMapScaleFactor; vtkWarpVector *myWarpVector; VISU_MergeFilter *myScalarsMergeFilter; vtkSmartPointer myScalars; diff --git a/src/PIPELINE/VISU_DeformedShapePL.cxx b/src/PIPELINE/VISU_DeformedShapePL.cxx index c5f1cba9..5185778b 100644 --- a/src/PIPELINE/VISU_DeformedShapePL.cxx +++ b/src/PIPELINE/VISU_DeformedShapePL.cxx @@ -89,7 +89,7 @@ VISU_DeformedShapePL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_DeformedShapePL ::GetScaleFactor(vtkDataSet* theDataSet) { @@ -102,8 +102,8 @@ VISU_DeformedShapePL int aNbPoints = theDataSet->GetNumberOfPoints(); int aNbElem = aNbCells? aNbCells: aNbPoints; - vtkFloatingPointType* aBounds = theDataSet->GetBounds(); - vtkFloatingPointType aVolume = 1, aVol, idim = 0; + double* aBounds = theDataSet->GetBounds(); + double aVolume = 1, aVol, idim = 0; for(int i = 0; i < 6; i += 2){ aVol = fabs(aBounds[i+1] - aBounds[i]); if(aVol > 0) { @@ -114,22 +114,22 @@ VISU_DeformedShapePL if( aNbElem == 0 || fabs(idim) < 1.0 / VTK_LARGE_FLOAT ) return 0.0; // to avoid division by zero aVolume /= aNbElem; - return pow(aVolume, vtkFloatingPointType(1.0/idim)); + return pow(aVolume, double(1.0/idim)); } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_DeformedShapePL ::GetDefaultScale(VISU_ScalarMapPL* theScalarMapPL) { - vtkFloatingPointType aSourceRange[2]; + double aSourceRange[2]; theScalarMapPL->GetSourceRange(aSourceRange); - static vtkFloatingPointType EPS = 1.0 / VTK_LARGE_FLOAT; + static double EPS = 1.0 / VTK_LARGE_FLOAT; if(fabs(aSourceRange[1]) > EPS){ vtkDataSet* aDataSet = theScalarMapPL->GetMergedInput(); - vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor(aDataSet); + double aScaleFactor = VISU_DeformedShapePL::GetScaleFactor(aDataSet); return aScaleFactor / aSourceRange[1]; } return 0.0; @@ -139,7 +139,7 @@ VISU_DeformedShapePL //---------------------------------------------------------------------------- void VISU_DeformedShapePL -::SetScale(vtkFloatingPointType theScale) +::SetScale(double theScale) { if(VISU::CheckIsSameValue(myWarpVector->GetScaleFactor(), theScale)) return; @@ -150,7 +150,7 @@ VISU_DeformedShapePL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_DeformedShapePL ::GetScale() { @@ -217,12 +217,12 @@ VISU_DeformedShapePL //---------------------------------------------------------------------------- void VISU_DeformedShapePL -::SetMapScale(vtkFloatingPointType theMapScale) +::SetMapScale(double theMapScale) { myMapScaleFactor = theMapScale; Superclass::SetMapScale(theMapScale); - vtkFloatingPointType aMapScale = myScaleFactor * theMapScale; + double aMapScale = myScaleFactor * theMapScale; if(VISU::CheckIsSameValue(myWarpVector->GetScaleFactor(), aMapScale)) return; diff --git a/src/PIPELINE/VISU_DeformedShapePL.hxx b/src/PIPELINE/VISU_DeformedShapePL.hxx index 3ce2622c..504ee3be 100644 --- a/src/PIPELINE/VISU_DeformedShapePL.hxx +++ b/src/PIPELINE/VISU_DeformedShapePL.hxx @@ -52,10 +52,10 @@ public: //---------------------------------------------------------------------------- virtual void - SetScale(vtkFloatingPointType theScale); + SetScale(double theScale); virtual - vtkFloatingPointType + double GetScale(); public: @@ -74,14 +74,14 @@ public: virtual void - SetMapScale(vtkFloatingPointType theMapScale = 1.0); + SetMapScale(double theMapScale = 1.0); static - vtkFloatingPointType + double GetScaleFactor(vtkDataSet* theDataSet); static - vtkFloatingPointType + double GetDefaultScale(VISU_ScalarMapPL* theScalarMapPL); protected: @@ -99,8 +99,8 @@ protected: DoShallowCopy(VISU_PipeLine *thePipeLine, bool theIsCopyInput); - vtkFloatingPointType myScaleFactor; - vtkFloatingPointType myMapScaleFactor; + double myScaleFactor; + double myMapScaleFactor; vtkWarpVector *myWarpVector; VISU_CellDataToPointData* myCellDataToPointData; diff --git a/src/PIPELINE/VISU_ElnoDisassembleFilter.cxx b/src/PIPELINE/VISU_ElnoDisassembleFilter.cxx index 8504e986..f8bb0529 100644 --- a/src/PIPELINE/VISU_ElnoDisassembleFilter.cxx +++ b/src/PIPELINE/VISU_ElnoDisassembleFilter.cxx @@ -60,7 +60,7 @@ VISU_ElnoDisassembleFilter::~VISU_ElnoDisassembleFilter() //---------------------------------------------------------------------------- -void VISU_ElnoDisassembleFilter::SetShrinkFactor( vtkFloatingPointType theValue ) +void VISU_ElnoDisassembleFilter::SetShrinkFactor( double theValue ) { if ( VISU::CheckIsSameValue( theValue, myShrinkFactor ) ) return; @@ -71,7 +71,7 @@ void VISU_ElnoDisassembleFilter::SetShrinkFactor( vtkFloatingPointType theValue //---------------------------------------------------------------------------- -vtkFloatingPointType VISU_ElnoDisassembleFilter::GetShrinkFactor() +double VISU_ElnoDisassembleFilter::GetShrinkFactor() { return myShrinkFactor; } @@ -88,7 +88,7 @@ namespace vtkUnstructuredGrid *myOutput; vtkDataArray *myElnoDataArray; vtkDataArray *myElnoDataMapper; - vtkFloatingPointType myShrinkFactor; + double myShrinkFactor; typedef typename VISU::TL::TEnum2VTKArrayType< points_type >::TResult TPointsDataArray; typedef typename VISU::TL::TEnum2VTKBasicType< points_type >::TResult TPointsDataType; @@ -113,7 +113,7 @@ namespace vtkUnstructuredGrid *theOutput, vtkDataArray *theElnoDataArray, vtkDataArray *theElnoDataMapper, - vtkFloatingPointType theShrinkFactor ) + double theShrinkFactor ) : myGetElnoNodeData( theElnoDataArray, theElnoDataMapper ) , myInput( theInput ) , myOutput( theOutput ) @@ -311,7 +311,7 @@ namespace vtkUnstructuredGrid *theOutput, vtkDataArray *theElnoDataArray, vtkDataArray *theElnoDataMapper, - vtkFloatingPointType theShrinkFactor ) + double theShrinkFactor ) { TExecute2< points_type, elno_type >( theInput, theOutput, @@ -329,7 +329,7 @@ namespace vtkUnstructuredGrid *theOutput, vtkDataArray *theElnoDataArray, vtkDataArray *theElnoDataMapper, - vtkFloatingPointType theShrinkFactor ) + double theShrinkFactor ) { switch( theElnoDataArray->GetDataType() ){ case VTK_DOUBLE: diff --git a/src/PIPELINE/VISU_ElnoDisassembleFilter.hxx b/src/PIPELINE/VISU_ElnoDisassembleFilter.hxx index fc193aeb..4853a759 100644 --- a/src/PIPELINE/VISU_ElnoDisassembleFilter.hxx +++ b/src/PIPELINE/VISU_ElnoDisassembleFilter.hxx @@ -31,8 +31,8 @@ public: static VISU_ElnoDisassembleFilter *New(); - void SetShrinkFactor( vtkFloatingPointType theValue ); - vtkFloatingPointType GetShrinkFactor(); + void SetShrinkFactor( double theValue ); + double GetShrinkFactor(); protected: VISU_ElnoDisassembleFilter(); @@ -40,7 +40,7 @@ protected: int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); - vtkFloatingPointType myShrinkFactor; + double myShrinkFactor; private: VISU_ElnoDisassembleFilter(const VISU_ElnoDisassembleFilter&); // Not implemented. diff --git a/src/PIPELINE/VISU_Extractor.cxx b/src/PIPELINE/VISU_Extractor.cxx index 210607b0..455e284a 100644 --- a/src/PIPELINE/VISU_Extractor.cxx +++ b/src/PIPELINE/VISU_Extractor.cxx @@ -107,9 +107,9 @@ VISU_Extractor } //---------------------------------------------------------------------------- -vtkFloatingPointType CutValue (vtkFloatingPointType theValue, int theDecimals) +double CutValue (double theValue, int theDecimals) { - vtkFloatingPointType v = theValue; + double v = theValue; #if defined(USE_SPRINTF) char aFormat[16]; @@ -145,14 +145,14 @@ vtkFloatingPointType CutValue (vtkFloatingPointType theValue, int theDecimals) // VSR 19/10/2009: old algorithm uses long long type - // causes incompatibility with some platforms (Windows?) // - vtkFloatingPointType aDegree = 0.0; + double aDegree = 0.0; if (abs((long long)v) > 1) aDegree = (long long)log10((double)abs((long long)v)) + 1; aDegree = theDecimals - aDegree; //printf("$$$ 1 v = %.20g , aDegree = %lld \n", v, (long long)aDegree); aDegree = pow(10, aDegree); - v = ((vtkFloatingPointType)((long long)(v * aDegree))) / aDegree; + v = ((double)((long long)(v * aDegree))) / aDegree; //printf("$$$ 2 v = %.20g , aDegree = %lld \n", v, (long long)aDegree); #endif @@ -167,11 +167,11 @@ Module2Scalars(vtkDataArray *theInputDataArray, vtkIdType theNbOfTuples) { vtkIdType aNbComp = theInputDataArray->GetNumberOfComponents(); - std::vector anArray(aNbComp < 3? 3: aNbComp); + std::vector anArray(aNbComp < 3? 3: aNbComp); for(vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++){ theInputDataArray->GetTuple(aTupleId, &anArray[0]); - vtkFloatingPointType aVector[3] = {anArray[0], anArray[1], anArray[2]}; - vtkFloatingPointType aScalar = sqrt(aVector[0]*aVector[0] + + double aVector[3] = {anArray[0], anArray[1], anArray[2]}; + double aScalar = sqrt(aVector[0]*aVector[0] + aVector[1]*aVector[1] + aVector[2]*aVector[2]); *theOutputPtr = TValueType(aScalar); @@ -189,7 +189,7 @@ Module2ScalarsMOD(vtkDataArray *theInputDataArray, vtkIdType aNbComp = theInputDataArray->GetNumberOfComponents(); if (aNbComp != 3) // Min, Max, Avg return; - std::vector anArray (3); + std::vector anArray (3); for (vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++) { theInputDataArray->GetTuple(aTupleId, &anArray[0]); switch (theGaussMetric) { diff --git a/src/PIPELINE/VISU_FieldTransform.cxx b/src/PIPELINE/VISU_FieldTransform.cxx index ba2bc909..e881a36f 100644 --- a/src/PIPELINE/VISU_FieldTransform.cxx +++ b/src/PIPELINE/VISU_FieldTransform.cxx @@ -35,7 +35,7 @@ #include #include -static vtkFloatingPointType Tolerance = 1.0 / VTK_LARGE_FLOAT; +static double Tolerance = 1.0 / VTK_LARGE_FLOAT; //---------------------------------------------------------------------------- vtkStandardNewMacro(VISU_FieldTransform); @@ -129,7 +129,7 @@ VISU_FieldTransform //---------------------------------------------------------------------------- void VISU_FieldTransform -::SetScalarRange(vtkFloatingPointType theScalarRange[2]) +::SetScalarRange(double theScalarRange[2]) { if(VISU::CheckIsSameRange(theScalarRange, myScalarRange)) return; @@ -143,18 +143,18 @@ VISU_FieldTransform //---------------------------------------------------------------------------- void VISU_FieldTransform -::SetScalarMin(vtkFloatingPointType theValue) +::SetScalarMin(double theValue) { - vtkFloatingPointType aScalarRange[2] = {theValue, GetScalarRange()[1]}; + double aScalarRange[2] = {theValue, GetScalarRange()[1]}; SetScalarRange(aScalarRange); } //---------------------------------------------------------------------------- void VISU_FieldTransform -::SetScalarMax(vtkFloatingPointType theValue) +::SetScalarMax(double theValue) { - vtkFloatingPointType aScalarRange[2] = {GetScalarRange()[0], theValue}; + double aScalarRange[2] = {GetScalarRange()[0], theValue}; SetScalarRange(aScalarRange); } @@ -164,7 +164,7 @@ void LinearTransformVectors(TValueType* theInputPtr, TValueType* theOutputPtr, vtkIdType theNbOfTuples, - vtkFloatingPointType theScale[3]) + double theScale[3]) { for(vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++){ for(vtkIdType aComponentId = 0; aComponentId < 3; aComponentId++){ @@ -183,16 +183,16 @@ NonLinearTransformVectors(vtkDataArray *theInputVectors, TValueType* theInputPtr, TValueType* theOutputPtr, vtkIdType theNbOfTuples, - vtkFloatingPointType theScale[3], + double theScale[3], VISU_FieldTransform::TTransformFun theFunction, - vtkFloatingPointType theModifiedScalarMin, - vtkFloatingPointType theModifiedScalarDelta, - vtkFloatingPointType theSourceScalarMax) + double theModifiedScalarMin, + double theModifiedScalarDelta, + double theSourceScalarMax) { for(vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++){ - vtkFloatingPointType anInputVector[3]; + double anInputVector[3]; theInputVectors->GetTuple(aTupleId, anInputVector); - vtkFloatingPointType aMagnification = vtkMath::Norm(anInputVector); + double aMagnification = vtkMath::Norm(anInputVector); if(aMagnification > Tolerance) aMagnification = ((*theFunction)(aMagnification) - theModifiedScalarMin) / @@ -214,7 +214,7 @@ template void ExecuteVectors(VISU_FieldTransform::TTransformFun theFunction, VTKViewer_Transform* theTransform, - vtkFloatingPointType theScalarRange[2], + double theScalarRange[2], vtkIdType theNbOfTuples, TDataSetAttributesType* theInputData, TDataSetAttributesType* theOutputData) @@ -223,12 +223,12 @@ ExecuteVectors(VISU_FieldTransform::TTransformFun theFunction, if(!anInputVectors || theNbOfTuples < 1) return; - vtkFloatingPointType aScalarRange[2]; + double aScalarRange[2]; aScalarRange[0] = (*theFunction)(theScalarRange[0]); aScalarRange[1] = (*theFunction)(theScalarRange[1]); - vtkFloatingPointType aScalarDelta = aScalarRange[1] - aScalarRange[0]; - vtkFloatingPointType aScale[3] = {1.0, 1.0, 1.0}; + double aScalarDelta = aScalarRange[1] - aScalarRange[0]; + double aScale[3] = {1.0, 1.0, 1.0}; if(theTransform){ aScale[0] = theTransform->GetScale()[0]; @@ -284,10 +284,10 @@ NonLinearTransformScalars(vtkDataArray *theInputScalars, TValueType* theOutputPtr, vtkIdType theNbOfTuples, VISU_FieldTransform::TTransformFun theFunction, - vtkFloatingPointType theModifiedScalarMin) + double theModifiedScalarMin) { for(vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++){ - vtkFloatingPointType aScalar = (*theFunction)(vtkFloatingPointType(*theInputPtr)); + double aScalar = (*theFunction)(double(*theInputPtr)); if(aScalar < theModifiedScalarMin) aScalar = theModifiedScalarMin; *theOutputPtr = TValueType(aScalar); @@ -301,7 +301,7 @@ NonLinearTransformScalars(vtkDataArray *theInputScalars, template void ExecuteScalars(VISU_FieldTransform::TTransformFun theFunction, - vtkFloatingPointType theScalarRange[2], + double theScalarRange[2], vtkIdType theNbOfTuples, TDataSetAttributesType* theInputData, TDataSetAttributesType* theOutputData) @@ -310,7 +310,7 @@ ExecuteScalars(VISU_FieldTransform::TTransformFun theFunction, if(!anInputScalars || theNbOfTuples < 1) return; - vtkFloatingPointType aScalarRange[2]; + double aScalarRange[2]; aScalarRange[0] = (*theFunction)(theScalarRange[0]); aScalarRange[1] = (*theFunction)(theScalarRange[1]); diff --git a/src/PIPELINE/VISU_FieldTransform.hxx b/src/PIPELINE/VISU_FieldTransform.hxx index e33719f6..b05b3363 100644 --- a/src/PIPELINE/VISU_FieldTransform.hxx +++ b/src/PIPELINE/VISU_FieldTransform.hxx @@ -75,20 +75,20 @@ public: return myTransform; } - vtkFloatingPointType* + double* GetScalarRange() { return myScalarRange; } void - SetScalarRange(vtkFloatingPointType theScalarRange[2]); + SetScalarRange(double theScalarRange[2]); void - SetScalarMin(vtkFloatingPointType theValue); + SetScalarMin(double theValue); void - SetScalarMax(vtkFloatingPointType theValue); + SetScalarMax(double theValue); protected: VISU_FieldTransform(); @@ -102,7 +102,7 @@ protected: VTKViewer_Transform *myTransform; TTransformFun myFunction; - vtkFloatingPointType myScalarRange[2]; + double myScalarRange[2]; private: VISU_FieldTransform(const VISU_FieldTransform&); diff --git a/src/PIPELINE/VISU_GaussPointsPL.cxx b/src/PIPELINE/VISU_GaussPointsPL.cxx index 8d34e719..0cd861dd 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.cxx +++ b/src/PIPELINE/VISU_GaussPointsPL.cxx @@ -174,8 +174,8 @@ VISU_GaussPointsPL void CopyGlyph( vtkGlyph3D* theSource, vtkGlyph3D* theDestination ) { - vtkFloatingPointType* aSourceRange = theSource->GetRange(); - vtkFloatingPointType* aDestinationRange = theDestination->GetRange(); + double* aSourceRange = theSource->GetRange(); + double* aDestinationRange = theDestination->GetRange(); if(!VISU::CheckIsSameRange(aDestinationRange, aSourceRange)) theDestination->SetRange( aSourceRange ); @@ -211,7 +211,7 @@ VISU_GaussPointsPL SetIsDeformed( aPipeLine->GetIsDeformed() ); SetScale( aPipeLine->GetScale() ); - vtkFloatingPointType aRadius = aPipeLine->mySphereSource->GetRadius(); + double aRadius = aPipeLine->mySphereSource->GetRadius(); if(!VISU::CheckIsSameValue(mySphereSource->GetRadius(), aRadius)) mySphereSource->SetRadius( aRadius ); @@ -248,9 +248,9 @@ VISU_GaussPointsPL //SetExtractInside(false); vtkDataSet* aDataSet = GetParentMesh(); - vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet ); + double aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet ); - vtkFloatingPointType* aScalarRange = GetScalarRange(); + double* aScalarRange = GetScalarRange(); static double EPS = 1.0 / VTK_LARGE_FLOAT; if(fabs(aScalarRange[1]) > EPS) SetScale( aScaleFactor / aScalarRange[1] ); @@ -345,7 +345,7 @@ void VISU_GaussPointsPL ::UpdateGlyph() { - vtkFloatingPointType* aScalarRange = GetScalarRange(); + double* aScalarRange = GetScalarRange(); if( GetPointSpriteMapper()->GetPointSpriteMode() == 0 ) // Results { @@ -353,15 +353,15 @@ VISU_GaussPointsPL myGlyph->SetScaleModeToScaleByScalar(); myGlyph->SetColorModeToColorByScalar(); - vtkFloatingPointType aScaleFactor = 0.0; - vtkFloatingPointType aMinSize = GetMinSize(); - vtkFloatingPointType aMaxSize = GetMaxSize(); + double aScaleFactor = 0.0; + double aMinSize = GetMinSize(); + double aMaxSize = GetMaxSize(); if(!VISU::CheckIsSameValue(aMaxSize, aMinSize)) aScaleFactor = ( aScalarRange[1] - aScalarRange[0] ) / ( aMaxSize - aMinSize ); - vtkFloatingPointType aMinRange = aScalarRange[0] - aMinSize * aScaleFactor; - vtkFloatingPointType aMaxRange = aMinRange + aScaleFactor; - vtkFloatingPointType aRange[2] = {aMinRange, aMaxRange}; + double aMinRange = aScalarRange[0] - aMinSize * aScaleFactor; + double aMaxRange = aMinRange + aScaleFactor; + double aRange[2] = {aMinRange, aMaxRange}; if(!VISU::CheckIsSameRange(myGlyph->GetRange(), aRange)) myGlyph->SetRange( aRange ); @@ -375,7 +375,7 @@ VISU_GaussPointsPL myGlyph->SetScaleModeToDataScalingOff(); myGlyph->SetColorModeToColorByScale(); - vtkFloatingPointType aScaleFactor = GetSize(); + double aScaleFactor = GetSize(); if(!VISU::CheckIsSameValue(myGlyph->GetScaleFactor(), aScaleFactor)) myGlyph->SetScaleFactor( aScaleFactor ); } @@ -385,12 +385,12 @@ VISU_GaussPointsPL myGlyph->SetScaleModeToDataScalingOff(); myGlyph->SetColorModeToColorByScalar(); - vtkFloatingPointType aScaleFactor = GetSize(); + double aScaleFactor = GetSize(); if(!VISU::CheckIsSameValue(myGlyph->GetScaleFactor(), aScaleFactor)) myGlyph->SetScaleFactor( aScaleFactor ); } - vtkFloatingPointType aRadius = GetMagnification() * GetAverageCellSize() / 2.0; + double aRadius = GetMagnification() * GetAverageCellSize() / 2.0; if(!VISU::CheckIsSameValue(mySphereSource->GetRadius(), aRadius)) mySphereSource->SetRadius( aRadius ); } @@ -490,7 +490,7 @@ VISU_GaussPointsPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_GaussPointsPL ::GetMaximumSupportedSize() { @@ -501,14 +501,14 @@ VISU_GaussPointsPL //---------------------------------------------------------------------------- void VISU_GaussPointsPL -::SetClamp(vtkFloatingPointType theClamp) +::SetClamp(double theClamp) { GetPointSpriteMapper()->SetPointSpriteClamp( theClamp ); } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_GaussPointsPL ::GetClamp() { @@ -518,14 +518,14 @@ VISU_GaussPointsPL //---------------------------------------------------------------------------- void VISU_GaussPointsPL -::SetSize(vtkFloatingPointType theSize) +::SetSize(double theSize) { GetPointSpriteMapper()->SetPointSpriteSize( theSize ); } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_GaussPointsPL ::GetSize() { @@ -536,14 +536,14 @@ VISU_GaussPointsPL //---------------------------------------------------------------------------- void VISU_GaussPointsPL -::SetMinSize(vtkFloatingPointType theMinSize) +::SetMinSize(double theMinSize) { GetPointSpriteMapper()->SetPointSpriteMinSize( theMinSize ); } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_GaussPointsPL ::GetMinSize() { @@ -554,14 +554,14 @@ VISU_GaussPointsPL //---------------------------------------------------------------------------- void VISU_GaussPointsPL -::SetMaxSize(vtkFloatingPointType theMaxSize) +::SetMaxSize(double theMaxSize) { GetPointSpriteMapper()->SetPointSpriteMaxSize( theMaxSize ); } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_GaussPointsPL ::GetMaxSize() { @@ -572,14 +572,14 @@ VISU_GaussPointsPL //---------------------------------------------------------------------------- void VISU_GaussPointsPL -::SetMagnification(vtkFloatingPointType theMagnification) +::SetMagnification(double theMagnification) { GetPointSpriteMapper()->SetPointSpriteMagnification( theMagnification ); } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_GaussPointsPL ::GetMagnification() { @@ -590,7 +590,7 @@ VISU_GaussPointsPL //---------------------------------------------------------------------------- void VISU_GaussPointsPL -::SetMagnificationIncrement(vtkFloatingPointType theIncrement) +::SetMagnificationIncrement(double theIncrement) { if(VISU::CheckIsSameValue(myMagnificationIncrement, theIncrement)) return; @@ -603,14 +603,14 @@ VISU_GaussPointsPL //---------------------------------------------------------------------------- void VISU_GaussPointsPL -::SetAlphaThreshold(vtkFloatingPointType theAlphaThreshold) +::SetAlphaThreshold(double theAlphaThreshold) { GetPointSpriteMapper()->SetPointSpriteAlphaThreshold( theAlphaThreshold ); } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_GaussPointsPL ::GetAlphaThreshold() { @@ -621,14 +621,14 @@ VISU_GaussPointsPL //---------------------------------------------------------------------------- void VISU_GaussPointsPL -::SetOpacity(vtkFloatingPointType theOpacity) +::SetOpacity(double theOpacity) { GetPointSpriteMapper()->SetPointSpriteOpacity( theOpacity ); } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_GaussPointsPL ::GetOpacity() { @@ -660,23 +660,23 @@ void VISU_GaussPointsPL ::ChangeMagnification( bool up ) { - vtkFloatingPointType anIncrement = up ? myMagnificationIncrement : 1.0 / myMagnificationIncrement; + double anIncrement = up ? myMagnificationIncrement : 1.0 / myMagnificationIncrement; SetMagnification( GetMagnification() * anIncrement ); } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_GaussPointsPL ::GetPointSize(vtkIdType theID, vtkDataArray* theScalarArray) { - vtkFloatingPointType aMaxSize = GetAverageCellSize() * GetMaxSize(); - vtkFloatingPointType aMinSize = GetAverageCellSize() * GetMinSize(); - vtkFloatingPointType aDelta = aMaxSize - aMinSize; - vtkFloatingPointType aVal = theScalarArray->GetTuple1(theID); + double aMaxSize = GetAverageCellSize() * GetMaxSize(); + double aMinSize = GetAverageCellSize() * GetMinSize(); + double aDelta = aMaxSize - aMinSize; + double aVal = theScalarArray->GetTuple1(theID); - vtkFloatingPointType* aScalarRange = GetScalarRange(); - vtkFloatingPointType aDeltaScalarRange = aScalarRange[1] - aScalarRange[0]; + double* aScalarRange = GetScalarRange(); + double aDeltaScalarRange = aScalarRange[1] - aScalarRange[0]; // to avoid FPE if the minimum is equal to maximum if( aDeltaScalarRange < 1.0 / VTK_LARGE_FLOAT ) @@ -687,7 +687,7 @@ VISU_GaussPointsPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_GaussPointsPL ::GetMaxPointSize() { @@ -696,7 +696,7 @@ VISU_GaussPointsPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_GaussPointsPL ::GetPointSize(vtkIdType theID) { @@ -711,14 +711,14 @@ VISU_GaussPointsPL //---------------------------------------------------------------------------- void VISU_GaussPointsPL -::SetAverageCellSize(vtkFloatingPointType theAverageCellSize) +::SetAverageCellSize(double theAverageCellSize) { GetPointSpriteMapper()->SetAverageCellSize( theAverageCellSize ); } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_GaussPointsPL ::GetAverageCellSize() { @@ -800,7 +800,7 @@ VISU_GaussPointsPL void VISU_GaussPointsPL -::SetScale( vtkFloatingPointType theScale ) +::SetScale( double theScale ) { if(VISU::CheckIsSameValue(myWarpVector->GetScaleFactor(), theScale)) return; @@ -810,7 +810,7 @@ VISU_GaussPointsPL } -vtkFloatingPointType +double VISU_GaussPointsPL ::GetScale() { @@ -820,11 +820,11 @@ VISU_GaussPointsPL void VISU_GaussPointsPL -::SetMapScale( vtkFloatingPointType theMapScale ) +::SetMapScale( double theMapScale ) { Superclass::SetMapScale( theMapScale ); - vtkFloatingPointType aMapScale = myScaleFactor * theMapScale; + double aMapScale = myScaleFactor * theMapScale; if(VISU::CheckIsSameValue(myWarpVector->GetScaleFactor(), aMapScale)) return; @@ -892,7 +892,7 @@ VISU_GaussPointsPL void VISU_GaussPointsPL -::GetSourceRange(vtkFloatingPointType theRange[2]) +::GetSourceRange(double theRange[2]) { if(!IsExternalGeometryUsed()) Superclass::GetSourceRange(theRange); diff --git a/src/PIPELINE/VISU_GaussPointsPL.hxx b/src/PIPELINE/VISU_GaussPointsPL.hxx index b29100d9..66717891 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.hxx +++ b/src/PIPELINE/VISU_GaussPointsPL.hxx @@ -153,71 +153,71 @@ public: GetPrimitiveType(); //! Get the maximum Point Sprite size, which is supported by hardware. - vtkFloatingPointType + double GetMaximumSupportedSize(); //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteClamp. void - SetClamp(vtkFloatingPointType theClamp); + SetClamp(double theClamp); - //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteClamp, vtkFloatingPointType). - vtkFloatingPointType + //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteClamp, double). + double GetClamp(); //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteSize. void - SetSize(vtkFloatingPointType theSize); + SetSize(double theSize); - //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteSize, vtkFloatingPointType). - vtkFloatingPointType + //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteSize, double). + double GetSize(); //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteMinSize. void - SetMinSize(vtkFloatingPointType theMinSize); + SetMinSize(double theMinSize); - //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMinSize, vtkFloatingPointType). - vtkFloatingPointType + //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMinSize, double). + double GetMinSize(); //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteMinSize. void - SetMaxSize(vtkFloatingPointType theMaxSize); + SetMaxSize(double theMaxSize); - //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMaxSize, vtkFloatingPointType). - vtkFloatingPointType + //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMaxSize, double). + double GetMaxSize(); //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteMagnification. void - SetMagnification(vtkFloatingPointType theMagnification); + SetMagnification(double theMagnification); - //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMagnification, vtkFloatingPointType). - vtkFloatingPointType + //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMagnification, double). + double GetMagnification(); //! Set the increment of changing Magnification parameter. void - SetMagnificationIncrement(vtkFloatingPointType theIncrement); + SetMagnificationIncrement(double theIncrement); //! Get the increment of changing Magnification parameter. - vtkFloatingPointType + double GetMagnificationIncrement() { return myMagnificationIncrement; } //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteAlphaThreshold. void - SetAlphaThreshold(vtkFloatingPointType theAlphaThreshold); + SetAlphaThreshold(double theAlphaThreshold); - //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteAlphaThreshold, vtkFloatingPointType). - vtkFloatingPointType + //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteAlphaThreshold, double). + double GetAlphaThreshold(); //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteOpacity. void - SetOpacity(vtkFloatingPointType theOpacity); + SetOpacity(double theOpacity); - //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteOpacity, vtkFloatingPointType). - vtkFloatingPointType + //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteOpacity, double). + double GetOpacity(); //! Set resolution of the Geometrical Sphere. @@ -233,23 +233,23 @@ public: ChangeMagnification( bool up ); //! Get the maximum size of Point Sprites in the presentation. - vtkFloatingPointType + double GetMaxPointSize(); //! Get point size by element's Id. - vtkFloatingPointType + double GetPointSize(vtkIdType theID); //! Get point size by element's Id using the specified scalar array. - vtkFloatingPointType + double GetPointSize(vtkIdType theID, vtkDataArray* theScalarArray); - //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkSetMacro(AverageCellSize, vtkFloatingPointType). + //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkSetMacro(AverageCellSize, double). void - SetAverageCellSize(vtkFloatingPointType AverageCellSize); + SetAverageCellSize(double AverageCellSize); - //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(AverageCellSize, vtkFloatingPointType). - vtkFloatingPointType + //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(AverageCellSize, double). + double GetAverageCellSize(); //! Set image data for the Point Sprite texture. @@ -278,15 +278,15 @@ public: virtual void - SetScale( vtkFloatingPointType theScale ); + SetScale( double theScale ); virtual - vtkFloatingPointType + double GetScale(); virtual void - SetMapScale( vtkFloatingPointType theMapScale = 1.0 ); + SetMapScale( double theMapScale = 1.0 ); public: @@ -316,7 +316,7 @@ public: virtual void - GetSourceRange(vtkFloatingPointType theRange[2]); + GetSourceRange(double theRange[2]); virtual vtkPointSet* @@ -348,7 +348,7 @@ protected: private: //---------------------------------------------------------------------------- - vtkFloatingPointType myScaleFactor; + double myScaleFactor; vtkWarpVector *myWarpVector; std::vector myPassFilter; vtkSmartPointer myPointSpriteMapperHolder; @@ -356,7 +356,7 @@ private: vtkGlyph3D* myGlyph; vtkSphereSource* mySphereSource; - vtkFloatingPointType myMagnificationIncrement; + double myMagnificationIncrement; int myPrimitiveType; diff --git a/src/PIPELINE/VISU_ImplicitFunctionWidget.cxx b/src/PIPELINE/VISU_ImplicitFunctionWidget.cxx index bce12b15..f4f19596 100644 --- a/src/PIPELINE/VISU_ImplicitFunctionWidget.cxx +++ b/src/PIPELINE/VISU_ImplicitFunctionWidget.cxx @@ -54,7 +54,7 @@ VISU_UnScaledActor::VISU_UnScaledActor() // function: SetCenter // purpose: //==================================================================== -void VISU_UnScaledActor::SetCenter(vtkFloatingPointType *pC) +void VISU_UnScaledActor::SetCenter(double *pC) { for (int i=0; i<3; ++i){ myCenter[i]=pC[i]; @@ -64,7 +64,7 @@ void VISU_UnScaledActor::SetCenter(vtkFloatingPointType *pC) // function:GetBounds // purpose: //==================================================================== -vtkFloatingPointType* VISU_UnScaledActor::GetBounds() +double* VISU_UnScaledActor::GetBounds() { Superclass::GetBounds(); // @@ -81,20 +81,20 @@ vtkFloatingPointType* VISU_UnScaledActor::GetBounds() void VISU_UnScaledActor::Render(vtkRenderer *theRenderer) { if(theRenderer){ - vtkFloatingPointType P[2][3] = {{-1.0, -1.0, 0.0},{+1.0, +1.0, 0.0}}; + double P[2][3] = {{-1.0, -1.0, 0.0},{+1.0, +1.0, 0.0}}; theRenderer->ViewToWorld(P[0][0],P[0][1],P[0][2]); theRenderer->ViewToWorld(P[1][0],P[1][1],P[1][2]); - vtkFloatingPointType aWorldDiag = sqrt((P[1][0]-P[0][0])*(P[1][0]-P[0][0])+ + double aWorldDiag = sqrt((P[1][0]-P[0][0])*(P[1][0]-P[0][0])+ (P[1][1]-P[0][1])*(P[1][1]-P[0][1])+ (P[1][2]-P[0][2])*(P[1][2]-P[0][2])); int* aSize = theRenderer->GetRenderWindow()->GetSize(); - vtkFloatingPointType aWinDiag = sqrt(vtkFloatingPointType(aSize[0]*aSize[0]+aSize[1]*aSize[1])); + double aWinDiag = sqrt(double(aSize[0]*aSize[0]+aSize[1]*aSize[1])); vtkDataSet* aDataSet = GetMapper()->GetInput(); - 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])); + double aLength = aDataSet->GetLength(); + double aPrecision = 1.e-3; + double anOldScale = GetScale()[0]; + double aScale = + mySize*aWorldDiag/aWinDiag/aLength*sqrt(double(aSize[0])/double(aSize[1])); SetOrigin(myCenter); // @@ -117,7 +117,6 @@ void VISU_UnScaledActor::SetSize(int theSize) //================================================================== // class: VISU_ImplicitFunctionWidget // -vtkCxxRevisionMacro(VISU_ImplicitFunctionWidget, "$Revision$"); //================================================================== // function: VISU_ImplicitFunctionWidget // purpose : diff --git a/src/PIPELINE/VISU_ImplicitFunctionWidget.hxx b/src/PIPELINE/VISU_ImplicitFunctionWidget.hxx index f498cb59..ece48fe1 100644 --- a/src/PIPELINE/VISU_ImplicitFunctionWidget.hxx +++ b/src/PIPELINE/VISU_ImplicitFunctionWidget.hxx @@ -43,16 +43,16 @@ public: vtkTypeMacro(VISU_UnScaledActor,vtkFollower); static VISU_UnScaledActor *New(); - void SetCenter(vtkFloatingPointType *); + void SetCenter(double *); virtual void SetSize(int theSize); virtual void Render(vtkRenderer *theRenderer); - virtual vtkFloatingPointType *GetBounds(); + virtual double *GetBounds(); protected: VISU_UnScaledActor(); ~VISU_UnScaledActor(){} - vtkFloatingPointType myCenter[3]; + double myCenter[3]; int mySize; }; @@ -63,7 +63,7 @@ class vtkImplicitFunction; class VISU_PIPELINE_EXPORT VISU_ImplicitFunctionWidget : public vtk3DWidget { public: - vtkTypeRevisionMacro(VISU_ImplicitFunctionWidget,vtk3DWidget); + vtkTypeMacro(VISU_ImplicitFunctionWidget,vtk3DWidget); virtual vtkImplicitFunction* ImplicitFunction()=0; diff --git a/src/PIPELINE/VISU_IsoSurfacesPL.cxx b/src/PIPELINE/VISU_IsoSurfacesPL.cxx index 853e2526..0364aacd 100644 --- a/src/PIPELINE/VISU_IsoSurfacesPL.cxx +++ b/src/PIPELINE/VISU_IsoSurfacesPL.cxx @@ -91,7 +91,7 @@ VISU_IsoSurfacesPL if(VISU_IsoSurfacesPL *aPipeLine = dynamic_cast(thePipeLine)){ SetNbParts(aPipeLine->GetNbParts()); - vtkFloatingPointType aRange[2] = {aPipeLine->GetMin(), aPipeLine->GetMax()}; + double aRange[2] = {aPipeLine->GetMin(), aPipeLine->GetMax()}; SetRange(aRange); SetRangeFixed(aPipeLine->IsRangeFixed()); } @@ -107,7 +107,7 @@ VISU_IsoSurfacesPL } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_IsoSurfacesPL ::GetValue(int i) { @@ -127,7 +127,7 @@ VISU_IsoSurfacesPL //---------------------------------------------------------------------------- void VISU_IsoSurfacesPL -::SetScalarRange( vtkFloatingPointType theRange[2] ) +::SetScalarRange( double theRange[2] ) { Superclass::SetScalarRange( theRange ); SetRange(myRange); @@ -137,7 +137,7 @@ VISU_IsoSurfacesPL //---------------------------------------------------------------------------- void VISU_IsoSurfacesPL -::SetRange(vtkFloatingPointType theRange[2], bool theIsForced) +::SetRange(double theRange[2], bool theIsForced) { if(VISU::CheckIsSameRange(myRange, theRange) && !theIsForced) return; @@ -145,7 +145,7 @@ VISU_IsoSurfacesPL if(theRange[0] <= theRange[1]){ myRange[0] = theRange[0]; myRange[1] = theRange[1]; - vtkFloatingPointType aRange[2] = {theRange[0], theRange[1]}; + double aRange[2] = {theRange[0], theRange[1]}; if( IsRangeFixed() ) { double aDelta = fabs( aRange[1] - aRange[0] ) * GAP_COEFFICIENT; aRange[0] += aDelta; @@ -159,7 +159,7 @@ VISU_IsoSurfacesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_IsoSurfacesPL ::GetMin() { @@ -168,7 +168,7 @@ VISU_IsoSurfacesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_IsoSurfacesPL ::GetMax() { @@ -204,7 +204,7 @@ VISU_IsoSurfacesPL SetNbParts(10); - vtkFloatingPointType aScalarRange[2]; + double aScalarRange[2]; GetSourceRange(aScalarRange); SetRange(aScalarRange); @@ -256,12 +256,12 @@ VISU_IsoSurfacesPL //---------------------------------------------------------------------------- void VISU_IsoSurfacesPL -::SetMapScale(vtkFloatingPointType theMapScale) +::SetMapScale(double theMapScale) { Superclass::SetMapScale(theMapScale); - vtkFloatingPointType aRange[2] = {GetMax() - theMapScale*(GetMax()-GetMin()), GetMax()}; - vtkFloatingPointType aNewRange[2] = {aRange[0], aRange[1]}; + double aRange[2] = {GetMax() - theMapScale*(GetMax()-GetMin()), GetMax()}; + double aNewRange[2] = {aRange[0], aRange[1]}; if( IsRangeFixed() ) { double aDelta = fabs( aNewRange[1] - aNewRange[0] ) * GAP_COEFFICIENT; aNewRange[0] += aDelta; diff --git a/src/PIPELINE/VISU_IsoSurfacesPL.hxx b/src/PIPELINE/VISU_IsoSurfacesPL.hxx index 7956f6ed..c8936a53 100644 --- a/src/PIPELINE/VISU_IsoSurfacesPL.hxx +++ b/src/PIPELINE/VISU_IsoSurfacesPL.hxx @@ -54,7 +54,7 @@ public: int GetNbParts(); - virtual vtkFloatingPointType GetValue(int i); + virtual double GetValue(int i); virtual void @@ -62,18 +62,18 @@ public: virtual void - SetScalarRange( vtkFloatingPointType theRange[2] ); + SetScalarRange( double theRange[2] ); virtual void - SetRange(vtkFloatingPointType theRange[2], bool theIsForced = false); + SetRange(double theRange[2], bool theIsForced = false); virtual - vtkFloatingPointType + double GetMin(); virtual - vtkFloatingPointType + double GetMax(); virtual @@ -104,7 +104,7 @@ public: virtual void - SetMapScale(vtkFloatingPointType theMapScale = 1.0); + SetMapScale(double theMapScale = 1.0); protected: VISU_IsoSurfacesPL(); @@ -118,7 +118,7 @@ protected: bool theIsCopyInput); int myNbParts; - vtkFloatingPointType myRange[2]; + double myRange[2]; bool myIsRangeFixed; VISU_CellDataToPointData* myCellDataToPointData; vtkContourFilter *myContourFilter; diff --git a/src/PIPELINE/VISU_LookupTable.cxx b/src/PIPELINE/VISU_LookupTable.cxx index 93028ecd..d5a53574 100644 --- a/src/PIPELINE/VISU_LookupTable.cxx +++ b/src/PIPELINE/VISU_LookupTable.cxx @@ -64,7 +64,7 @@ namespace //---------------------------------------------------------------------------- void VISU_LookupTable -::MarkValueByColor( vtkFloatingPointType theValue, +::MarkValueByColor( double theValue, unsigned char* theColor ) { vtkIdType anIndex = this->GetIndex( theValue ); @@ -95,12 +95,12 @@ VISU_LookupTable unsigned char aRedPtr[3] = {255, 0, 0}; unsigned char aBluePtr[3] = {0, 0, 255}; - vtkFloatingPointType aRange[2]; + double aRange[2]; this->GetTableRange(aRange); vtkIdType aNbColors = this->GetNumberOfColors(); - vtkFloatingPointType aDelta = (aRange[1]-aRange[0])/aNbColors; - vtkFloatingPointType aValue = aRange[0]+0.5*aDelta; + double aDelta = (aRange[1]-aRange[0])/aNbColors; + double aValue = aRange[0]+0.5*aDelta; for(int i = 0; i < aNbColors; i++){ vtkIdType anIndex = this->GetIndex(aValue); unsigned char* aTablePtr = this->GetPointer(anIndex); @@ -117,7 +117,7 @@ VISU_LookupTable //---------------------------------------------------------------------------- void VISU_LookupTable -::SetMapScale(vtkFloatingPointType theScale) +::SetMapScale(double theScale) { if( myScale != theScale ) { @@ -138,8 +138,8 @@ void VISU_LookupTable::SetBicolor( bool theBicolor ) int VISU_LookupTable -::ComputeLogRange(vtkFloatingPointType inRange[2], - vtkFloatingPointType outRange[2]) +::ComputeLogRange(double inRange[2], + double outRange[2]) { if(inRange[0] >= inRange[1]) return -1; @@ -160,11 +160,11 @@ VISU_LookupTable unsigned char* VISU_LookupTable -::MapValue(vtkFloatingPointType v) +::MapValue(double v) { if(GetScale() == VTK_SCALE_LOG10) { - vtkFloatingPointType aLowBound = log10(this->TableRange[0]); - v = pow(vtkFloatingPointType(10.0), aLowBound + (v - aLowBound)*myScale); + double aLowBound = log10(this->TableRange[0]); + v = pow(double(10.0), aLowBound + (v - aLowBound)*myScale); return vtkLookupTable::MapValue(v); } else if (!myBicolor) { v = this->TableRange[0] + (v - this->TableRange[0])*myScale; @@ -186,10 +186,10 @@ VISU_LookupTable // Apply log to value, with appropriate constraints. inline -vtkFloatingPointType -VISU_ApplyLogScale(vtkFloatingPointType v, - vtkFloatingPointType range[2], - vtkFloatingPointType logRange[2]) +double +VISU_ApplyLogScale(double v, + double range[2], + double logRange[2]) { // is the range set for negative numbers? if (range[0] < 0) { @@ -220,16 +220,16 @@ VISU_ApplyLogScale(vtkFloatingPointType v, // Apply shift/scale to the scalar value v and do table lookup. inline unsigned char * -VISU_LinearLookup(vtkFloatingPointType v, +VISU_LinearLookup(double v, unsigned char *table, - vtkFloatingPointType maxIndex, - vtkFloatingPointType shift, - vtkFloatingPointType scale, + double maxIndex, + double shift, + double scale, bool bicolor) { if( !bicolor ) { - vtkFloatingPointType findx = (v + shift)*scale; + double findx = (v + shift)*scale; if (findx < 0) findx = 0; if (findx > maxIndex) @@ -256,23 +256,23 @@ VISU_LookupTableMapData(vtkLookupTable *self, int length, int inIncr, int outFormat, - vtkFloatingPointType theMapScale, + double theMapScale, bool bicolor) { int i = length; - vtkFloatingPointType *range = self->GetTableRange(); - vtkFloatingPointType maxIndex = self->GetNumberOfColors() - 1; - vtkFloatingPointType shift, scale; + double *range = self->GetTableRange(); + double maxIndex = self->GetNumberOfColors() - 1; + double shift, scale; unsigned char *table = self->GetPointer(0); unsigned char *cptr; - vtkFloatingPointType alpha; + double alpha; if ( (alpha=self->GetAlpha()) >= 1.0 ) //no blending required { if (self->GetScale() == VTK_SCALE_LOG10) { - vtkFloatingPointType val; - vtkFloatingPointType logRange[2]; + double val; + double logRange[2]; VISU_LookupTable::ComputeLogRange(range, logRange); shift = -logRange[0]; if (logRange[1] <= logRange[0]) @@ -402,8 +402,8 @@ VISU_LookupTableMapData(vtkLookupTable *self, { if (self->GetScale() == VTK_SCALE_LOG10) { - vtkFloatingPointType val; - vtkFloatingPointType logRange[2]; + double val; + double logRange[2]; VISU_LookupTable::ComputeLogRange(range, logRange); shift = -logRange[0]; if (logRange[1] <= logRange[0]) @@ -541,7 +541,7 @@ VISU_LookupTableMapMag(vtkLookupTable *self, int length, int inIncr, int outFormat, - vtkFloatingPointType theMapScale, + double theMapScale, bool bicolor) { double tmp, sum; diff --git a/src/PIPELINE/VISU_LookupTable.hxx b/src/PIPELINE/VISU_LookupTable.hxx index 839e7bea..c084e4eb 100644 --- a/src/PIPELINE/VISU_LookupTable.hxx +++ b/src/PIPELINE/VISU_LookupTable.hxx @@ -45,18 +45,18 @@ class VISU_PIPELINE_EXPORT VISU_LookupTable: public vtkLookupTable int inputDataType, int numberOfValues, int inputIncrement, int outputIncrement); - vtkFloatingPointType GetMapScale() { return myScale; } - void SetMapScale(vtkFloatingPointType theScale = 1.0); + double GetMapScale() { return myScale; } + void SetMapScale(double theScale = 1.0); bool GetBicolor() { return myBicolor; } void SetBicolor( bool theBicolor ); - static int ComputeLogRange( vtkFloatingPointType inRange[2], - vtkFloatingPointType outRange[2] ); + static int ComputeLogRange( double inRange[2], + double outRange[2] ); - unsigned char *MapValue(vtkFloatingPointType v); + unsigned char *MapValue(double v); - void MarkValueByColor( vtkFloatingPointType theValue, + void MarkValueByColor( double theValue, unsigned char* theColor ); bool HasMarkedValues() const { return myHasMarkedValues; } @@ -69,7 +69,7 @@ class VISU_PIPELINE_EXPORT VISU_LookupTable: public vtkLookupTable VISU_LookupTable(int sze=256, int ext=256); ~VISU_LookupTable() {}; - vtkFloatingPointType myScale; + double myScale; bool myBicolor; bool myHasMarkedValues; diff --git a/src/PIPELINE/VISU_MapperHolder.cxx b/src/PIPELINE/VISU_MapperHolder.cxx index e15dff5b..39392b38 100644 --- a/src/PIPELINE/VISU_MapperHolder.cxx +++ b/src/PIPELINE/VISU_MapperHolder.cxx @@ -220,7 +220,7 @@ VISU_MapperHolder } //---------------------------------------------------------------------------- -vtkFloatingPointType* +double* VISU_MapperHolder ::GetNodeCoord(vtkIdType theObjID) { diff --git a/src/PIPELINE/VISU_MapperHolder.hxx b/src/PIPELINE/VISU_MapperHolder.hxx index 42410479..32296da8 100644 --- a/src/PIPELINE/VISU_MapperHolder.hxx +++ b/src/PIPELINE/VISU_MapperHolder.hxx @@ -98,7 +98,7 @@ public: GetNodeVTKID(vtkIdType theID); virtual - vtkFloatingPointType* + double* GetNodeCoord(vtkIdType theObjID); virtual diff --git a/src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx b/src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx index c25fc6b5..27e3cbfa 100755 --- a/src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx +++ b/src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx @@ -62,7 +62,6 @@ #endif #ifndef VTK_IMPLEMENT_MESA_CXX -vtkCxxRevisionMacro(VISU_OpenGLPointSpriteMapper, "Revision$"); vtkStandardNewMacro(VISU_OpenGLPointSpriteMapper); #endif @@ -216,7 +215,7 @@ bool InitializeARB() }; static bool IsARBInitialized = InitializeARB(); -static vtkFloatingPointType Tolerance = 1.0 / VTK_LARGE_FLOAT; +static double Tolerance = 1.0 / VTK_LARGE_FLOAT; //----------------------------------------------------------------------------- // Construct empty object. @@ -468,7 +467,7 @@ bool VISU_OpenGLPointSpriteMapper::InitExtensions() //----------------------------------------------------------------------------- float ViewToDisplay( vtkRenderer* theRenderer ) { - vtkFloatingPointType p1[3], p2[3]; + double p1[3], p2[3]; theRenderer->SetViewPoint( 0.0, 0.0, 0.0 ); theRenderer->ViewToDisplay(); @@ -478,7 +477,7 @@ float ViewToDisplay( vtkRenderer* theRenderer ) theRenderer->ViewToDisplay(); theRenderer->GetDisplayPoint( p2 ); - vtkFloatingPointType coefficient = sqrt( pow( p2[0] - p1[0], 2 ) + pow( p2[1] - p1[1], 2 ) ) / sqrt( 2. ); + double 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; @@ -817,8 +816,8 @@ struct TColorFunctorBase //----------------------------------------------------------------------------- struct TPropertyColor : TColorFunctorBase { - vtkFloatingPointType myColor[3]; - vtkFloatingPointType myHue; + double myColor[3]; + double myHue; TPropertyColor( vtkProperty *theProperty ) { @@ -1019,7 +1018,7 @@ int VISU_OpenGLPointSpriteMapper::Draw(vtkRenderer *theRenderer, vtkActor *theAc if ( aTotalConnectivitySize > 0 ) { TVertex* aVertexArr = new TVertex[ aTotalConnectivitySize ]; - vtkFloatingPointType aPropertyColor[3]; + double aPropertyColor[3]; theActor->GetProperty()->GetColor( aPropertyColor ); glPointSize( this->DefaultPointSize ); diff --git a/src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx b/src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx index b08ce4be..ce5c269e 100755 --- a/src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx +++ b/src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx @@ -89,7 +89,7 @@ public: enum PrimitiveTypes { PointSprite = 0, OpenGLPoint, GeomSphere }; static VISU_OpenGLPointSpriteMapper *New(); - vtkTypeRevisionMacro(VISU_OpenGLPointSpriteMapper,MAPPER_SUPERCLASS); + vtkTypeMacro(VISU_OpenGLPointSpriteMapper,MAPPER_SUPERCLASS); //! Set the initial point size to be used. /*! diff --git a/src/PIPELINE/VISU_PipeLine.cxx b/src/PIPELINE/VISU_PipeLine.cxx index 9f328f2e..84aa9aa9 100644 --- a/src/PIPELINE/VISU_PipeLine.cxx +++ b/src/PIPELINE/VISU_PipeLine.cxx @@ -183,7 +183,7 @@ bool VISU_PipeLine ::IsPlanarInput() { - vtkFloatingPointType aBounds[6]; + double 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 || @@ -237,7 +237,7 @@ VISU_PipeLine } //---------------------------------------------------------------------------- -vtkFloatingPointType* +double* VISU_PipeLine ::GetNodeCoord(vtkIdType theObjID) { @@ -393,13 +393,13 @@ VISU_PipeLine //---------------------------------------------------------------------------- void VISU_PipeLine -::SetPlaneParam(vtkFloatingPointType theDir[3], - vtkFloatingPointType theDist, +::SetPlaneParam(double theDir[3], + double theDist, vtkPlane* thePlane) { thePlane->SetNormal(theDir); - vtkFloatingPointType anOrigin[3]; + double anOrigin[3]; //Make sure that bounds are calculated ComputeVisibleBounds(); @@ -415,13 +415,13 @@ VISU_PipeLine //---------------------------------------------------------------------------- void VISU_PipeLine -::GetPlaneParam(vtkFloatingPointType theDir[3], - vtkFloatingPointType& theDist, +::GetPlaneParam(double theDir[3], + double& theDist, vtkPlane* thePlane) { thePlane->GetNormal(theDir); - vtkFloatingPointType anOrigin[3]; + double anOrigin[3]; thePlane->GetOrigin(anOrigin); //Make sure that bounds are calculated @@ -486,7 +486,7 @@ void VISU_PipeLine::ComputeVisibleBounds() { } //---------------------------------------------------------------------------- -void VISU_PipeLine::GetVisibleBounds(vtkFloatingPointType theBounds[6]) { +void VISU_PipeLine::GetVisibleBounds(double theBounds[6]) { // Compute or get cached bounds ComputeVisibleBounds(); for (int i=0; i<6; i++) { diff --git a/src/PIPELINE/VISU_PipeLine.hxx b/src/PIPELINE/VISU_PipeLine.hxx index 90e402f6..36e5be73 100644 --- a/src/PIPELINE/VISU_PipeLine.hxx +++ b/src/PIPELINE/VISU_PipeLine.hxx @@ -112,7 +112,7 @@ public: GetNodeVTKID(vtkIdType theID); virtual - vtkFloatingPointType* + double* GetNodeCoord(vtkIdType theObjID); virtual @@ -170,18 +170,18 @@ public: virtual void - SetPlaneParam(vtkFloatingPointType theDir[3], - vtkFloatingPointType theDist, + SetPlaneParam(double theDir[3], + double theDist, vtkPlane* thePlane); virtual void - GetPlaneParam(vtkFloatingPointType theDir[3], - vtkFloatingPointType& theDist, + GetPlaneParam(double theDir[3], + double& theDist, vtkPlane* thePlane); void - GetVisibleBounds(vtkFloatingPointType theBounds[6]); + GetVisibleBounds(double theBounds[6]); //---------------------------------------------------------------------------- static @@ -229,7 +229,7 @@ protected: SetIsFeatureEdgesAllowed(bool theIsFeatureEdgesAllowed); //Visible bounds xmin, xmax, ymin, ymax, zmin, zmax - vtkFloatingPointType myVisibleBounds[6]; + double myVisibleBounds[6]; vtkTimeStamp myVisibleComputeTime; // Time at which visible bounds computed private: diff --git a/src/PIPELINE/VISU_PipeLineUtils.cxx b/src/PIPELINE/VISU_PipeLineUtils.cxx index 83c726a2..111b7716 100644 --- a/src/PIPELINE/VISU_PipeLineUtils.cxx +++ b/src/PIPELINE/VISU_PipeLineUtils.cxx @@ -37,9 +37,9 @@ namespace VISU { //---------------------------------------------------------------------------- void - Mul(const vtkFloatingPointType A[3], - vtkFloatingPointType b, - vtkFloatingPointType C[3]) + Mul(const double A[3], + double b, + double C[3]) { // A*b; for(int i = 0; i < 3; i++) C[i] = A[i]*b; @@ -48,9 +48,9 @@ namespace VISU //---------------------------------------------------------------------------- void - Sub(const vtkFloatingPointType A[3], - const vtkFloatingPointType B[3], - vtkFloatingPointType C[3]) + Sub(const double A[3], + const double B[3], + double C[3]) { //A-B for(int i = 0; i < 3; i++) C[i] = A[i] - B[i]; @@ -59,10 +59,10 @@ namespace VISU //---------------------------------------------------------------------------- bool - CheckIsSameValue(vtkFloatingPointType theTarget, - vtkFloatingPointType theSource) + CheckIsSameValue(double theTarget, + double theSource) { - static vtkFloatingPointType TOL = 10.0 / VTK_LARGE_FLOAT; + static double TOL = 10.0 / VTK_LARGE_FLOAT; if(fabs(theTarget - theSource) < TOL) return true; return false; @@ -71,8 +71,8 @@ namespace VISU //---------------------------------------------------------------------------- bool - CheckIsSameRange(vtkFloatingPointType* theTarget, - vtkFloatingPointType* theSource) + CheckIsSameRange(double* theTarget, + double* theSource) { return CheckIsSameValue(theTarget[0], theSource[0]) && CheckIsSameValue(theTarget[1], theSource[1]); @@ -89,7 +89,7 @@ namespace VISU theTarget->SetLookupTable(theSource->GetLookupTable()); theTarget->SetScalarVisibility(theSource->GetScalarVisibility()); if(theIsCopyInput){ - vtkFloatingPointType* aScalarRange = theSource->GetScalarRange(); + double* aScalarRange = theSource->GetScalarRange(); if(!CheckIsSameRange(theTarget->GetScalarRange(), aScalarRange)) theTarget->SetScalarRange(aScalarRange); } @@ -162,25 +162,25 @@ namespace VISU //---------------------------------------------------------------------------- void - ComputeBoundsParam(vtkFloatingPointType theBounds[6], - vtkFloatingPointType theDirection[3], - vtkFloatingPointType theMinPnt[3], - vtkFloatingPointType& theMaxBoundPrj, - vtkFloatingPointType& theMinBoundPrj) + ComputeBoundsParam(double theBounds[6], + double theDirection[3], + double theMinPnt[3], + double& theMaxBoundPrj, + double& theMinBoundPrj) { - vtkFloatingPointType aBounds[6]; + double aBounds[6]; for(int i = 0; i < 6; i++) aBounds[i] = theBounds[i]; //Enlarge bounds in order to avoid conflicts of precision for(int i = 0; i < 6; i += 2){ static double EPS = 1.0E-3; - vtkFloatingPointType aDelta = (aBounds[i+1] - aBounds[i])*EPS; + double aDelta = (aBounds[i+1] - aBounds[i])*EPS; aBounds[i] -= aDelta; aBounds[i+1] += aDelta; } - vtkFloatingPointType aBoundPoints[8][3] = { {aBounds[0],aBounds[2],aBounds[4]}, + double 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]}, @@ -193,7 +193,7 @@ namespace VISU theMaxBoundPrj = vtkMath::Dot(theDirection,aBoundPoints[aMaxId]); theMinBoundPrj = theMaxBoundPrj; for(int i = 1; i < 8; i++){ - vtkFloatingPointType aTmp = vtkMath::Dot(theDirection,aBoundPoints[i]); + double aTmp = vtkMath::Dot(theDirection,aBoundPoints[i]); if(theMaxBoundPrj < aTmp){ theMaxBoundPrj = aTmp; aMaxId = i; @@ -203,7 +203,7 @@ namespace VISU aMinId = i; } } - vtkFloatingPointType *aMinPnt = aBoundPoints[aMaxId]; + double *aMinPnt = aBoundPoints[aMaxId]; theMinPnt[0] = aMinPnt[0]; theMinPnt[1] = aMinPnt[1]; theMinPnt[2] = aMinPnt[2]; @@ -212,18 +212,18 @@ namespace VISU //---------------------------------------------------------------------------- void - DistanceToPosition(vtkFloatingPointType theBounds[6], - vtkFloatingPointType theDirection[3], - vtkFloatingPointType theDist, - vtkFloatingPointType thePos[3]) + DistanceToPosition(double theBounds[6], + double theDirection[3], + double theDist, + double thePos[3]) { - vtkFloatingPointType aMaxBoundPrj, aMinBoundPrj, aMinPnt[3]; + double aMaxBoundPrj, aMinBoundPrj, aMinPnt[3]; ComputeBoundsParam(theBounds, theDirection, aMinPnt, aMaxBoundPrj, aMinBoundPrj); - vtkFloatingPointType aLength = (aMaxBoundPrj-aMinBoundPrj)*theDist; + double 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; @@ -232,18 +232,18 @@ namespace VISU //---------------------------------------------------------------------------- void - PositionToDistance(vtkFloatingPointType theBounds[6], - vtkFloatingPointType theDirection[3], - vtkFloatingPointType thePos[3], - vtkFloatingPointType& theDist) + PositionToDistance(double theBounds[6], + double theDirection[3], + double thePos[3], + double& theDist) { - vtkFloatingPointType aMaxBoundPrj, aMinBoundPrj, aMinPnt[3]; + double aMaxBoundPrj, aMinBoundPrj, aMinPnt[3]; ComputeBoundsParam(theBounds, theDirection, aMinPnt, aMaxBoundPrj, aMinBoundPrj); - vtkFloatingPointType aPrj = vtkMath::Dot(theDirection,thePos); + double aPrj = vtkMath::Dot(theDirection,thePos); theDist = (aPrj-aMinBoundPrj)/(aMaxBoundPrj-aMinBoundPrj); } @@ -261,9 +261,9 @@ namespace VISU //---------------------------------------------------------------------------- //Compute bounds of the visible part of the dataset void - ComputeVisibleBounds(vtkDataSet* theDataSet, vtkFloatingPointType theBounds[6]) { + ComputeVisibleBounds(vtkDataSet* theDataSet, double theBounds[6]) { int nbCells, i, j, minIdx, maxIdx; - vtkFloatingPointType cellBounds[6]; + double cellBounds[6]; if( theDataSet && (nbCells = theDataSet->GetNumberOfCells()) ) { theDataSet->GetCellBounds(0,theBounds); @@ -288,7 +288,7 @@ namespace VISU //---------------------------------------------------------------------------- //Compute center of the box, box defined as xmin, xmax, ymin, ymax, zmin, zmax void - ComputeBoxCenter(vtkFloatingPointType theBounds[6], vtkFloatingPointType theCenter[3]) { + ComputeBoxCenter(double theBounds[6], double theCenter[3]) { for (int i=0; i<3; i++) { theCenter[i] = (theBounds[2*i+1] + theBounds[2*i]) / 2.0; } @@ -297,7 +297,7 @@ namespace VISU //---------------------------------------------------------------------------- //Compute length of the box diagonal, box defined as xmin, xmax, ymin, ymax, zmin, zmax double - ComputeBoxDiagonal(vtkFloatingPointType theBounds[6]) { + ComputeBoxDiagonal(double theBounds[6]) { double diff, len=0.0; int i; for (i=0; i<3; i++) { diff --git a/src/PIPELINE/VISU_PipeLineUtils.hxx b/src/PIPELINE/VISU_PipeLineUtils.hxx index f65aea6b..c71c0e4e 100644 --- a/src/PIPELINE/VISU_PipeLineUtils.hxx +++ b/src/PIPELINE/VISU_PipeLineUtils.hxx @@ -60,16 +60,16 @@ namespace VISU { //---------------------------------------------------------------------------- void - Mul(const vtkFloatingPointType A[3], - vtkFloatingPointType b, - vtkFloatingPointType C[3]); // C = A * b + Mul(const double A[3], + double b, + double C[3]); // C = A * b //---------------------------------------------------------------------------- void - Sub(const vtkFloatingPointType A[3], - const vtkFloatingPointType B[3], - vtkFloatingPointType C[3]); // C = A - B + Sub(const double A[3], + const double B[3], + double C[3]); // C = A - B //---------------------------------------------------------------------------- @@ -91,13 +91,13 @@ namespace VISU //---------------------------------------------------------------------------- //! Checks whether the float values are the same or not bool VISU_PIPELINE_EXPORT - CheckIsSameValue(vtkFloatingPointType theTarget, - vtkFloatingPointType theSource); + CheckIsSameValue(double theTarget, + double theSource); //! Checks whether the scalar range is the same or not bool VISU_PIPELINE_EXPORT - CheckIsSameRange(vtkFloatingPointType* theTarget, - vtkFloatingPointType* theSource); + CheckIsSameRange(double* theTarget, + double* theSource); //! Customizes vtkMapper::ShallowCopy void VISU_PIPELINE_EXPORT @@ -126,27 +126,27 @@ namespace VISU //---------------------------------------------------------------------------- void VISU_PIPELINE_EXPORT - ComputeBoundsParam(vtkFloatingPointType theBounds[6], - vtkFloatingPointType theDirection[3], - vtkFloatingPointType theMinPnt[3], - vtkFloatingPointType& theMaxBoundPrj, - vtkFloatingPointType& theMinBoundPrj); + ComputeBoundsParam(double theBounds[6], + double theDirection[3], + double theMinPnt[3], + double& theMaxBoundPrj, + double& theMinBoundPrj); //---------------------------------------------------------------------------- void VISU_PIPELINE_EXPORT - DistanceToPosition(vtkFloatingPointType theBounds[6], - vtkFloatingPointType theDirection[3], - vtkFloatingPointType theDist, - vtkFloatingPointType thePos[3]); + DistanceToPosition(double theBounds[6], + double theDirection[3], + double theDist, + double thePos[3]); //---------------------------------------------------------------------------- void VISU_PIPELINE_EXPORT - PositionToDistance(vtkFloatingPointType theBounds[6], - vtkFloatingPointType theDirection[3], - vtkFloatingPointType thePos[3], - vtkFloatingPointType& theDist); + PositionToDistance(double theBounds[6], + double theDirection[3], + double thePos[3], + double& theDist); //---------------------------------------------------------------------------- @@ -156,15 +156,15 @@ namespace VISU //---------------------------------------------------------------------------- void VISU_PIPELINE_EXPORT ComputeVisibleBounds(vtkDataSet* theDataSet, - vtkFloatingPointType theBounds[6]); + double theBounds[6]); //---------------------------------------------------------------------------- void VISU_PIPELINE_EXPORT - ComputeBoxCenter(vtkFloatingPointType theBounds[6], vtkFloatingPointType theCenter[3]); + ComputeBoxCenter(double theBounds[6], double theCenter[3]); //---------------------------------------------------------------------------- double VISU_PIPELINE_EXPORT - ComputeBoxDiagonal(vtkFloatingPointType theBounds[6]); + ComputeBoxDiagonal(double theBounds[6]); } diff --git a/src/PIPELINE/VISU_PlanesWidget.cxx b/src/PIPELINE/VISU_PlanesWidget.cxx index dac91937..b44a4dc7 100644 --- a/src/PIPELINE/VISU_PlanesWidget.cxx +++ b/src/PIPELINE/VISU_PlanesWidget.cxx @@ -64,18 +64,17 @@ static bool IsValidPlane2Position(vtkPlane *pPx, vtkDataSet *pDataSet, - vtkFloatingPointType aTol=0.003); + double aTol=0.003); static void GetBndPoints(vtkDataSet *pDataSet, - vtkFloatingPointType aPnts[24]); + double aPnts[24]); static -vtkFloatingPointType -DistanceToPlane(const vtkFloatingPointType x[3], - const vtkFloatingPointType n[3], - const vtkFloatingPointType p0[3]); +double +DistanceToPlane(const double x[3], + const double n[3], + const double p0[3]); -vtkCxxRevisionMacro(VISU_PlanesWidget, "$Revision$"); vtkStandardNewMacro(VISU_PlanesWidget); //================================================================== @@ -210,7 +209,7 @@ VISU_PlanesWidget::VISU_PlanesWidget() this->Transform = vtkTransform::New(); // Define the point coordinates - vtkFloatingPointType bounds[6]; + double bounds[6]; bounds[0] = -0.5; bounds[1] = 0.5; bounds[2] = -0.5; @@ -316,14 +315,14 @@ vtkImplicitFunction* VISU_PlanesWidget::ImplicitFunction() //================================================================== void VISU_PlanesWidget -::SetDistance(const vtkFloatingPointType theDistance) +::SetDistance(const double theDistance) { if( theDistance <= 0.0 || theDistance == myDistance ) return; myDistance=theDistance; // - vtkFloatingPointType *origin, *normal, oNew[3], aN2[3]; + double *origin, *normal, oNew[3], aN2[3]; origin = myPlane1->GetOrigin(); normal = myPlane1->GetNormal(); vtkMath::Normalize(normal); @@ -340,7 +339,7 @@ VISU_PlanesWidget // function: Distance // purpose : //================================================================== -vtkFloatingPointType +double VISU_PlanesWidget ::Distance() const { @@ -860,13 +859,13 @@ void VISU_PlanesWidget::Push(double *p1, double *p2) { //Get the motion vector int i; - vtkFloatingPointType v[3]; + double v[3]; // for (i=0; i<3; ++i){ v[i] = p2[i] - p1[i]; } // - vtkFloatingPointType aOr1[3], aNr1[3], aNr2[3], aD, z1; + double aOr1[3], aNr1[3], aNr2[3], aD, z1; // myPlane1->GetOrigin(aOr1); myPlane1->GetNormal(aNr1); @@ -900,9 +899,9 @@ void VISU_PlanesWidget::TranslateOrigin(double *p1, double *p2) } // //Add to the current point, project back down onto plane - vtkFloatingPointType *o = myPlane1->GetOrigin(); - vtkFloatingPointType *n = myPlane1->GetNormal(); - vtkFloatingPointType newOrigin[3]; + double *o = myPlane1->GetOrigin(); + double *n = myPlane1->GetNormal(); + double newOrigin[3]; // for (i=0; i<3; ++i){ newOrigin[i]=o[i] + v[i]; @@ -915,9 +914,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(vtkFloatingPointType x[3]) +void VISU_PlanesWidget::SetOriginInternal(double x[3]) { - vtkFloatingPointType *bounds = this->myOutline->GetOutput()->GetBounds(); + double *bounds = this->myOutline->GetOutput()->GetBounds(); int i, j; for (i=0; i<3; ++i) { j=2*i; @@ -930,7 +929,7 @@ void VISU_PlanesWidget::SetOriginInternal(vtkFloatingPointType x[3]) } // bool bFlag; - vtkFloatingPointType aOr2[3], aNr2[3], aNr1[3]; + double aOr2[3], aNr2[3], aNr1[3]; vtkPlane *pPx; // myPlane1->GetNormal(aNr1); @@ -966,8 +965,8 @@ void VISU_PlanesWidget::Rotate(int X, int Y, v[i] = p2[i] - p1[i]; } // - vtkFloatingPointType *origin = myPlane1->GetOrigin(); - vtkFloatingPointType *normal = myPlane1->GetNormal(); + double *origin = myPlane1->GetOrigin(); + double *normal = myPlane1->GetNormal(); // Create axis of rotation and angle of rotation vtkMath::Cross(vpn,v,axis); @@ -989,7 +988,7 @@ void VISU_PlanesWidget::Rotate(int X, int Y, this->Transform->Translate(-origin[0],-origin[1],-origin[2]); //Set the new normal - vtkFloatingPointType nNew[3], aN2[3], oNew[3]; + double nNew[3], aN2[3], oNew[3]; this->Transform->TransformNormal(normal,nNew); // for (i=0; i<3; ++i){ @@ -1020,7 +1019,7 @@ void VISU_PlanesWidget::Rotate(int X, int Y, void VISU_PlanesWidget::PushDistance(double *p1, double *p2) { int i; - vtkFloatingPointType v[3], *anOrigin1, *aN1, *anOrigin2, *aN2, aD; + double v[3], *anOrigin1, *aN1, *anOrigin2, *aN2, aD; //Get the motion vector for (i=0; i<3; ++i){ v[i] = p2[i] - p1[i]; @@ -1033,17 +1032,17 @@ void VISU_PlanesWidget::PushDistance(double *p1, double *p2) vtkMath::Normalize(aN1); - vtkFloatingPointType origin[3]; + double origin[3]; double distance = vtkMath::Dot( v, aN2 ); for(i=0; i<3; ++i) { origin[i] = anOrigin2[i] + distance * aN2[i]; } - vtkFloatingPointType d = DistanceToPlane(origin, aN1, anOrigin1); + double d = DistanceToPlane(origin, aN1, anOrigin1); if( d <= 0.0 ) return; // bool bFlag; - vtkFloatingPointType aOr2[3], aNr2[3]; + double aOr2[3], aNr2[3]; vtkPlane *pPx; // myPlane2->GetOrigin(aOr2); @@ -1080,8 +1079,8 @@ void VISU_PlanesWidget::TranslatePlane(double *p1, double *p2) v[2] = p2[2] - p1[2]; //Translate the plane - vtkFloatingPointType oNew[3]; - vtkFloatingPointType *origin = myPlane1->GetOrigin(); + double oNew[3]; + double *origin = myPlane1->GetOrigin(); oNew[0] = origin[0] + v[0]; oNew[1] = origin[1] + v[1]; oNew[2] = origin[2] + v[2]; @@ -1108,8 +1107,8 @@ void VISU_PlanesWidget::TranslateOutline(double *p1, double *p2) v[2] = p2[2] - p1[2]; //Translate the bounding box - vtkFloatingPointType *origin = myBox->GetOrigin(); - vtkFloatingPointType oNew[3]; + double *origin = myBox->GetOrigin(); + double oNew[3]; oNew[0] = origin[0] + v[0]; oNew[1] = origin[1] + v[1]; oNew[2] = origin[2] + v[2]; @@ -1145,10 +1144,10 @@ void VISU_PlanesWidget::Scale(double *p1, double *p2, v[2] = p2[2] - p1[2]; //int res = this->PlaneSource->GetXResolution(); - vtkFloatingPointType *o = myPlane1->GetOrigin(); + double *o = myPlane1->GetOrigin(); // Compute the scale factor - vtkFloatingPointType sf = vtkMath::Norm(v) / this->myOutline->GetOutput()->GetLength(); + double sf = vtkMath::Norm(v) / this->myOutline->GetOutput()->GetLength(); if ( Y > this->Interactor->GetLastEventPosition()[1] ) { sf = 1.0 + sf; } @@ -1161,9 +1160,9 @@ void VISU_PlanesWidget::Scale(double *p1, double *p2, this->Transform->Scale(sf,sf,sf); this->Transform->Translate(-o[0],-o[1],-o[2]); - vtkFloatingPointType *origin = myBox->GetOrigin(); - vtkFloatingPointType *spacing = myBox->GetSpacing(); - vtkFloatingPointType oNew[3], p[3], pNew[3]; + double *origin = myBox->GetOrigin(); + double *spacing = myBox->GetSpacing(); + double oNew[3], p[3], pNew[3]; p[0] = origin[0] + spacing[0]; p[1] = origin[1] + spacing[1]; p[2] = origin[2] + spacing[2]; @@ -1222,9 +1221,9 @@ void VISU_PlanesWidget::CreateDefaultProperties() // function: InitialPlaceWidget // purpose : //================================================================== -void VISU_PlanesWidget::InitialPlaceWidget(vtkFloatingPointType bds[6]) +void VISU_PlanesWidget::InitialPlaceWidget(double bds[6]) { - vtkFloatingPointType bounds[6], origin[3]; + double bounds[6], origin[3]; PlaceWidget(bds); // @@ -1233,7 +1232,7 @@ void VISU_PlanesWidget::InitialPlaceWidget(vtkFloatingPointType bds[6]) (bounds[3]+bounds[2])/2.0, (bounds[5]+bounds[4])/2.0); - static vtkFloatingPointType DIST_COEFF = 0.1; + static double DIST_COEFF = 0.1; SetDistance(this->InitialLength*DIST_COEFF); // this->UpdateRepresentation(); @@ -1242,10 +1241,10 @@ void VISU_PlanesWidget::InitialPlaceWidget(vtkFloatingPointType bds[6]) // function: PlaceWidget // purpose : //================================================================== -void VISU_PlanesWidget::PlaceWidget(vtkFloatingPointType bds[6]) +void VISU_PlanesWidget::PlaceWidget(double bds[6]) { int i; - vtkFloatingPointType bounds[6], origin[3]; + double bounds[6], origin[3]; this->AdjustBounds(bds, bounds, origin); @@ -1288,9 +1287,9 @@ void VISU_PlanesWidget::PlaceWidget(vtkFloatingPointType bds[6]) // function: SetOrigin // purpose :Set the origin of the plane.(for external calls) //================================================================== -void VISU_PlanesWidget::SetOrigin(vtkFloatingPointType x, vtkFloatingPointType y, vtkFloatingPointType z) +void VISU_PlanesWidget::SetOrigin(double x, double y, double z) { - vtkFloatingPointType origin[3]; + double origin[3]; origin[0] = x; origin[1] = y; origin[2] = z; @@ -1300,9 +1299,9 @@ void VISU_PlanesWidget::SetOrigin(vtkFloatingPointType x, vtkFloatingPointType y // function: SetOrigin // purpose : Set the origin of the plane.(for external calls) //================================================================== -void VISU_PlanesWidget::SetOrigin(vtkFloatingPointType x[3]) +void VISU_PlanesWidget::SetOrigin(double x[3]) { - vtkFloatingPointType *bounds = this->myOutline->GetOutput()->GetBounds(); + double *bounds = this->myOutline->GetOutput()->GetBounds(); for (int i=0; i<3; i++) { if ( x[i] < bounds[2*i] ) { x[i] = bounds[2*i]; @@ -1312,7 +1311,7 @@ void VISU_PlanesWidget::SetOrigin(vtkFloatingPointType x[3]) } } myPlane1->SetOrigin(x); - vtkFloatingPointType *origin, *normal, oNew[3]; + double *origin, *normal, oNew[3]; origin = myPlane1->GetOrigin(); normal = myPlane1->GetNormal(); vtkMath::Normalize(normal); @@ -1326,12 +1325,12 @@ void VISU_PlanesWidget::SetOrigin(vtkFloatingPointType x[3]) // function: GetOrigin // purpose :Get the origin of the plane. //================================================================== -vtkFloatingPointType* VISU_PlanesWidget::GetOrigin() +double* VISU_PlanesWidget::GetOrigin() { return myPlane1->GetOrigin(); } -void VISU_PlanesWidget::GetOrigin(vtkFloatingPointType xyz[3]) +void VISU_PlanesWidget::GetOrigin(double xyz[3]) { myPlane1->GetOrigin(xyz); } @@ -1339,9 +1338,9 @@ void VISU_PlanesWidget::GetOrigin(vtkFloatingPointType xyz[3]) // function: SetNormal // purpose :Set the normal to the plane. //================================================================== -void VISU_PlanesWidget::SetNormal(vtkFloatingPointType x, vtkFloatingPointType y, vtkFloatingPointType z) +void VISU_PlanesWidget::SetNormal(double x, double y, double z) { - vtkFloatingPointType n[3]; + double n[3]; n[0] = x; n[1] = y; n[2] = z; @@ -1359,7 +1358,7 @@ void VISU_PlanesWidget::SetNormal(vtkFloatingPointType x, vtkFloatingPointType y // function: SetNormal // purpose :Set the normal to the plane. //================================================================== -void VISU_PlanesWidget::SetNormal(vtkFloatingPointType n[3]) +void VISU_PlanesWidget::SetNormal(double n[3]) { this->SetNormal(n[0], n[1], n[2]); } @@ -1367,7 +1366,7 @@ void VISU_PlanesWidget::SetNormal(vtkFloatingPointType n[3]) // function: GetNormal // purpose :Get the normal to the plane. //================================================================== -vtkFloatingPointType* VISU_PlanesWidget::GetNormal() +double* VISU_PlanesWidget::GetNormal() { return myPlane1->GetNormal(); } @@ -1375,7 +1374,7 @@ vtkFloatingPointType* VISU_PlanesWidget::GetNormal() // function: GetNormal // purpose :Get the normal to the plane. //================================================================== -void VISU_PlanesWidget::GetNormal(vtkFloatingPointType xyz[3]) +void VISU_PlanesWidget::GetNormal(double xyz[3]) { myPlane1->GetNormal(xyz); } @@ -1499,12 +1498,12 @@ void VISU_PlanesWidget::UpdateRepresentation() return; } - vtkFloatingPointType *origin = myPlane1->GetOrigin(); - vtkFloatingPointType *normal = myPlane1->GetNormal(); - vtkFloatingPointType p2[3]; + double *origin = myPlane1->GetOrigin(); + double *normal = myPlane1->GetNormal(); + double p2[3]; // Setup the plane normal - vtkFloatingPointType d = this->myOutline->GetOutput()->GetLength(); + double d = this->myOutline->GetOutput()->GetLength(); p2[0] = origin[0] + 0.30 * d * normal[0]; p2[1] = origin[1] + 0.30 * d * normal[1]; @@ -1547,12 +1546,12 @@ void VISU_PlanesWidget::PrintSelf(ostream& os, vtkIndent indent) //================================================================== bool IsValidPlane2Position(vtkPlane *pPx, vtkDataSet *pDataSet, - vtkFloatingPointType aTol) + double aTol) { bool bRet; int i, iFound; - vtkFloatingPointType aD, aDmax, aPnts[24], aDiagonal; - vtkFloatingPointType aTol1, aOr[3], aN[3]; + double aD, aDmax, aPnts[24], aDiagonal; + double aTol1, aOr[3], aN[3]; // bRet=false; aDiagonal=pDataSet->GetLength(); @@ -1584,14 +1583,14 @@ bool IsValidPlane2Position(vtkPlane *pPx, //================================================================== void GetBndPoints(vtkDataSet *pDataSet, - vtkFloatingPointType aPnts[24]) + double aPnts[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; - vtkFloatingPointType *pBounds=pDataSet->GetBounds(); + double *pBounds=pDataSet->GetBounds(); // for (i=0; i<24; ++i){ aPnts[i]=pBounds[aIndx[i]]; @@ -1601,10 +1600,10 @@ GetBndPoints(vtkDataSet *pDataSet, // function: DistanceToPlane // purpose : //================================================================== -vtkFloatingPointType -DistanceToPlane(const vtkFloatingPointType x[3], - const vtkFloatingPointType n[3], - const vtkFloatingPointType p0[3]) +double +DistanceToPlane(const double x[3], + const double n[3], + const double p0[3]) { return ((n[0]*(x[0]-p0[0]) + n[1]*(x[1]-p0[1]) + @@ -1617,7 +1616,7 @@ DistanceToPlane(const vtkFloatingPointType x[3], //================================================================== void VISU_PlanesWidget::SizeHandles() { - // vtkFloatingPointType radius = + // double radius = this->vtk3DWidget::SizeHandles(1.35); } */ diff --git a/src/PIPELINE/VISU_PlanesWidget.hxx b/src/PIPELINE/VISU_PlanesWidget.hxx index 27291827..14f7c101 100644 --- a/src/PIPELINE/VISU_PlanesWidget.hxx +++ b/src/PIPELINE/VISU_PlanesWidget.hxx @@ -57,16 +57,16 @@ public: // Instantiate the object. static VISU_PlanesWidget *New(); - vtkTypeRevisionMacro(VISU_PlanesWidget,VISU_ImplicitFunctionWidget); + vtkTypeMacro(VISU_PlanesWidget,VISU_ImplicitFunctionWidget); void PrintSelf(ostream& os, vtkIndent indent); void - SetDistance(const vtkFloatingPointType theDistance); + SetDistance(const double theDistance); - vtkFloatingPointType + double Distance() const; - vtkGetMacro(InitialLength,vtkFloatingPointType); + vtkGetMacro(InitialLength,double); virtual vtkImplicitFunction* @@ -80,39 +80,39 @@ public: virtual void - PlaceWidget(vtkFloatingPointType bounds[6]); + PlaceWidget(double bounds[6]); // Description: // Get the origin of the plane. void - SetOrigin(vtkFloatingPointType x, - vtkFloatingPointType y, - vtkFloatingPointType z); + SetOrigin(double x, + double y, + double z); void - SetOrigin(vtkFloatingPointType x[3]); + SetOrigin(double x[3]); - vtkFloatingPointType* + double* GetOrigin(); void - GetOrigin(vtkFloatingPointType xyz[3]); + GetOrigin(double xyz[3]); // Description: // Get the normal to the plane. void - SetNormal(vtkFloatingPointType x, - vtkFloatingPointType y, - vtkFloatingPointType z); + SetNormal(double x, + double y, + double z); void - SetNormal(vtkFloatingPointType x[3]); + SetNormal(double x[3]); - vtkFloatingPointType* + double* GetNormal(); void - GetNormal(vtkFloatingPointType xyz[3]); + GetNormal(double xyz[3]); // Description: // Force the plane widget to be aligned with one of the x-y-z axes. @@ -212,7 +212,7 @@ public: vtkGetObjectMacro(EdgesProperty,vtkProperty); void - InitialPlaceWidget(vtkFloatingPointType bds[6]); + InitialPlaceWidget(double bds[6]); protected: VISU_PlanesWidget(); @@ -250,7 +250,7 @@ protected: void OnMouseMove(); // // Methods to manipulate the plane - void ConstrainOrigin(vtkFloatingPointType x[3]); + void ConstrainOrigin(double 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); @@ -267,7 +267,7 @@ protected: void HighlightNormal(int highlight); void HighlightOutline(int highlight); void UpdateRepresentation(); - void SetOriginInternal(vtkFloatingPointType x[3]); + void SetOriginInternal(double x[3]); // Controlling ivars int NormalToXAxis; @@ -284,7 +284,7 @@ protected: vtkPlane *myPlane1; vtkPlane *myPlane2; - vtkFloatingPointType myDistance; + double myDistance; vtkImplicitBoolean *myImplicitFunction; // The bounding box is represented by a single voxel image data diff --git a/src/PIPELINE/VISU_Plot3DPL.cxx b/src/PIPELINE/VISU_Plot3DPL.cxx index d4fc2bd3..9fb59429 100644 --- a/src/PIPELINE/VISU_Plot3DPL.cxx +++ b/src/PIPELINE/VISU_Plot3DPL.cxx @@ -123,9 +123,9 @@ VISU_Plot3DPL { theDataSet->Update(); - vtkFloatingPointType aBounds[6]; + double aBounds[6]; theDataSet->GetBounds(aBounds); - vtkFloatingPointType aDelta[3] = {aBounds[1] - aBounds[0], aBounds[3] - aBounds[2], aBounds[5] - aBounds[4]}; + double 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]) @@ -150,19 +150,19 @@ VISU_Plot3DPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_Plot3DPL ::GetScaleFactor( VISU_ColoredPL* theColoredPL, vtkDataSet* theDataSet ) { theDataSet->Update(); - vtkFloatingPointType aLength = theDataSet->GetLength(); // diagonal length + double aLength = theDataSet->GetLength(); // diagonal length - vtkFloatingPointType aScalarRange[2]; + double aScalarRange[2]; theColoredPL->GetSourceRange(aScalarRange); - static vtkFloatingPointType EPS = 0.3; - vtkFloatingPointType aRange = aScalarRange[1]; + static double EPS = 0.3; + double aRange = aScalarRange[1]; if(aRange > 0.0) return aLength / aRange * EPS; @@ -200,8 +200,8 @@ VISU_Plot3DPL if(VISU::IsQuadraticData(aMergedInput)) // Bug 0020123, note 0005343 throw std::runtime_error("Impossible to build presentation"); - vtkFloatingPointType aPlaneNormal[3]; - vtkFloatingPointType anOrigin[3]; + double aPlaneNormal[3]; + double anOrigin[3]; GetBasePlane( anOrigin, aPlaneNormal ); vtkPolyData* aPolyData = 0; @@ -246,7 +246,7 @@ VISU_Plot3DPL }else myContourFilter->SetInput(aPolyData); - vtkFloatingPointType aScalarRange[2]; + double aScalarRange[2]; GetSourceRange(aScalarRange); myContourFilter->GenerateValues(GetNumberOfContours(),aScalarRange); @@ -316,7 +316,7 @@ VISU_Plot3DPL //---------------------------------------------------------------------------- void VISU_Plot3DPL -::SetScaleFactor(vtkFloatingPointType theScaleFactor) +::SetScaleFactor(double theScaleFactor) { myScaleFactor = theScaleFactor; myWarpScalar->SetScaleFactor(theScaleFactor*myMapScaleFactor); @@ -324,7 +324,7 @@ VISU_Plot3DPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_Plot3DPL ::GetScaleFactor() { @@ -357,7 +357,7 @@ VISU_Plot3DPL //---------------------------------------------------------------------------- void VISU_Plot3DPL -::SetPlanePosition(vtkFloatingPointType thePosition, +::SetPlanePosition(double thePosition, bool theIsRelative) { bool anIsSameValue = VISU::CheckIsSameValue(myIsRelative, theIsRelative); @@ -390,7 +390,7 @@ VISU_Plot3DPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_Plot3DPL:: GetRotateX() { @@ -404,7 +404,7 @@ GetRotateX() //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_Plot3DPL:: GetRotateY(){ switch(myOrientation){ @@ -420,8 +420,8 @@ GetRotateY(){ void VISU_Plot3DPL:: SetOrientation(VISU_CutPlanesPL::PlaneOrientation theOrientation, - vtkFloatingPointType theXAngle, - vtkFloatingPointType theYAngle) + double theXAngle, + double theYAngle) { bool anIsSameValue = VISU::CheckIsSameValue(GetRotateX(), theXAngle); anIsSameValue &= VISU::CheckIsSameValue(GetRotateY(), theYAngle); @@ -447,7 +447,7 @@ SetOrientation(VISU_CutPlanesPL::PlaneOrientation theOrientation, //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_Plot3DPL ::GetPlanePosition() { @@ -460,14 +460,14 @@ VISU_Plot3DPL //======================================================================= void VISU_Plot3DPL -::GetBasePlane(vtkFloatingPointType theOrigin[3], - vtkFloatingPointType theNormal[3], +::GetBasePlane(double theOrigin[3], + double theNormal[3], bool theCenterOrigine ) { VISU_CutPlanesPL::GetDir(theNormal,myAngle,myOrientation); - vtkFloatingPointType aPosition = myPosition; - vtkFloatingPointType aBounds[6], aBoundPrj[3]; + double aPosition = myPosition; + double aBounds[6], aBoundPrj[3]; if ( myIsRelative ) { GetInput()->GetBounds(aBounds); @@ -479,7 +479,7 @@ VISU_Plot3DPL if ( theCenterOrigine ) { // move theOrigin to the center of aBounds projections to the plane GetMergedInput()->GetBounds(aBounds); - vtkFloatingPointType boundPoints[8][3] = { + double boundPoints[8][3] = { {aBounds[0],aBounds[2],aBounds[4]}, {aBounds[1],aBounds[2],aBounds[4]}, {aBounds[0],aBounds[3],aBounds[4]}, @@ -488,9 +488,9 @@ VISU_Plot3DPL {aBounds[1],aBounds[2],aBounds[5]}, {aBounds[0],aBounds[3],aBounds[5]}, {aBounds[1],aBounds[3],aBounds[5]}}; - vtkFloatingPointType newOrigin[3] = { 0,0,0 }; + double newOrigin[3] = { 0,0,0 }; for(int i = 0; i < 8; i++) { - vtkFloatingPointType proj[3]; + double proj[3]; vtkPlane::ProjectPoint( boundPoints[i], theOrigin, theNormal, proj ); newOrigin[0] += proj[0]; newOrigin[1] += proj[1]; @@ -508,10 +508,10 @@ VISU_Plot3DPL //======================================================================= void VISU_Plot3DPL -::GetMinMaxPosition( vtkFloatingPointType& minPos, - vtkFloatingPointType& maxPos ) +::GetMinMaxPosition( double& minPos, + double& maxPos ) { - vtkFloatingPointType aBounds[6], aBoundPrj[3], aNormal[3]; + double aBounds[6], aBoundPrj[3], aNormal[3]; VISU_CutPlanesPL::GetDir(aNormal,myAngle,myOrientation); GetInput()->GetBounds(aBounds); VISU_CutPlanesPL::GetBoundProject(aBoundPrj,aBounds,aNormal); @@ -526,15 +526,15 @@ VISU_Plot3DPL void VISU_Plot3DPL -::SetMapScale(vtkFloatingPointType theMapScale) +::SetMapScale(double theMapScale) { myMapScaleFactor = theMapScale; Superclass::SetMapScale(theMapScale); if ( myIsContour ) { - vtkFloatingPointType aRange[2]; + double aRange[2]; GetSourceRange(aRange); - vtkFloatingPointType aNewRange[] = { aRange[1] - theMapScale*(aRange[1]-aRange[0]), aRange[1] }; + double aNewRange[] = { aRange[1] - theMapScale*(aRange[1]-aRange[0]), aRange[1] }; myContourFilter->GenerateValues(GetNumberOfContours(),aNewRange); } myWarpScalar->SetScaleFactor(myScaleFactor*theMapScale); diff --git a/src/PIPELINE/VISU_Plot3DPL.hxx b/src/PIPELINE/VISU_Plot3DPL.hxx index 328fa3bd..d1e3422a 100644 --- a/src/PIPELINE/VISU_Plot3DPL.hxx +++ b/src/PIPELINE/VISU_Plot3DPL.hxx @@ -56,31 +56,31 @@ public: VISU_CutPlanesPL::PlaneOrientation GetPlaneOrientation(); - vtkFloatingPointType + double GetRotateX(); - vtkFloatingPointType + double GetRotateY(); void SetOrientation(VISU_CutPlanesPL::PlaneOrientation theOrientation, - vtkFloatingPointType theXAngle = 0.0, - vtkFloatingPointType theYAngle = 0.0); + double theXAngle = 0.0, + double theYAngle = 0.0); - vtkFloatingPointType + double GetPlanePosition(); bool IsPositionRelative(); void - SetPlanePosition(vtkFloatingPointType thePosition, + SetPlanePosition(double thePosition, bool theIsRelative); void - SetScaleFactor(vtkFloatingPointType theScaleFactor); + SetScaleFactor(double theScaleFactor); - vtkFloatingPointType + double GetScaleFactor(); void @@ -96,13 +96,13 @@ public: GetNumberOfContours(); void - GetBasePlane (vtkFloatingPointType theOrigin[3], - vtkFloatingPointType theNormal[3], + GetBasePlane (double theOrigin[3], + double theNormal[3], bool theCenterOrigine = false ); void - GetMinMaxPosition( vtkFloatingPointType& minPos, - vtkFloatingPointType& maxPos ); + GetMinMaxPosition( double& minPos, + double& maxPos ); public: virtual @@ -123,12 +123,12 @@ public: GetOrientation(vtkDataSet* theDataSet); static - vtkFloatingPointType + double GetScaleFactor( VISU_ColoredPL* theColoredPL, vtkDataSet* theDataSet ); void - SetMapScale(vtkFloatingPointType theMapScale); + SetMapScale(double theMapScale); protected: VISU_Plot3DPL(); @@ -145,9 +145,9 @@ protected: DoShallowCopy(VISU_PipeLine *thePipeLine, bool theIsCopyInput); - vtkFloatingPointType myAngle[3]; + double myAngle[3]; bool myIsRelative, myIsContour; - vtkFloatingPointType myPosition, myScaleFactor, myMapScaleFactor; + double myPosition, myScaleFactor, myMapScaleFactor; VISU_CutPlanesPL::PlaneOrientation myOrientation; vtkSmartPointer myCellDataToPointData; diff --git a/src/PIPELINE/VISU_PolyDataMapperHolder.cxx b/src/PIPELINE/VISU_PolyDataMapperHolder.cxx index a504018f..f1616404 100644 --- a/src/PIPELINE/VISU_PolyDataMapperHolder.cxx +++ b/src/PIPELINE/VISU_PolyDataMapperHolder.cxx @@ -215,7 +215,7 @@ VISU_PolyDataMapperHolder } //---------------------------------------------------------------------------- -vtkFloatingPointType* +double* VISU_PolyDataMapperHolder ::GetNodeCoord(vtkIdType theObjID) { diff --git a/src/PIPELINE/VISU_PolyDataMapperHolder.hxx b/src/PIPELINE/VISU_PolyDataMapperHolder.hxx index e7d84e0b..05ccdfc0 100644 --- a/src/PIPELINE/VISU_PolyDataMapperHolder.hxx +++ b/src/PIPELINE/VISU_PolyDataMapperHolder.hxx @@ -81,7 +81,7 @@ public: GetNodeVTKID(vtkIdType theID); virtual - vtkFloatingPointType* + double* GetNodeCoord(vtkIdType theObjID); virtual diff --git a/src/PIPELINE/VISU_ScalarBarActor.cxx b/src/PIPELINE/VISU_ScalarBarActor.cxx index 776f9aa9..a81c5d62 100644 --- a/src/PIPELINE/VISU_ScalarBarActor.cxx +++ b/src/PIPELINE/VISU_ScalarBarActor.cxx @@ -44,8 +44,6 @@ using namespace std; -vtkCxxRevisionMacro(VISU_ScalarBarActor, "$Revision$"); - vtkCxxSetObjectMacro(VISU_ScalarBarActor,LookupTable,VISU_LookupTable); vtkCxxSetObjectMacro(VISU_ScalarBarActor,LabelTextProperty,vtkTextProperty); vtkCxxSetObjectMacro(VISU_ScalarBarActor,TitleTextProperty,vtkTextProperty); @@ -311,7 +309,7 @@ int VISU_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport) // we hard code how many steps to display int numColors = this->MaximumNumberOfColors; - vtkFloatingPointType *range = lut->GetRange(); + double *range = lut->GetRange(); int numPts = 2*(numColors + 1); vtkPoints *pts = vtkPoints::New(); @@ -396,11 +394,11 @@ int VISU_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport) this->SizeBar(barWidth, barHeight, size, viewport, range); // generate points - vtkFloatingPointType x[3]; x[2] = 0.0; - vtkFloatingPointType delta, val; + double x[3]; x[2] = 0.0; + double delta, val; if ( this->Orientation == VTK_ORIENT_VERTICAL ) { - delta=(vtkFloatingPointType)barHeight/numColors; + delta=(double)barHeight/numColors; for (i=0; iInsertNextCell(4,ptIds); if ( isLogTable ){ //SALOME specific - vtkFloatingPointType rgbval = log10(range[0]) + + double 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])* - ((vtkFloatingPointType)i /(numColors-1.0))); + ((double)i /(numColors-1.0))); } rgb = colors->GetPointer(3*i); //write into array directly @@ -460,7 +458,7 @@ int VISU_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport) for (i=0; i < this->NumberOfLabels; i++) { - val = (vtkFloatingPointType)i/(this->NumberOfLabels-1) *barHeight; + val = (double)i/(this->NumberOfLabels-1) *barHeight; this->TextMappers[i]->GetSize(viewport,sizeTextData); this->TextMappers[i]->GetTextProperty()->SetJustificationToLeft(); this->TextActors[i]->SetPosition(barWidth+3, @@ -475,7 +473,7 @@ int VISU_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport) for (i=0; i < this->NumberOfLabels; i++) { this->TextMappers[i]->GetTextProperty()->SetJustificationToCentered(); - val = (vtkFloatingPointType)i/(this->NumberOfLabels-1) * barWidth; + val = (double)i/(this->NumberOfLabels-1) * barWidth; this->TextActors[i]->SetPosition(val, barHeight + 0.05*size[1]); } @@ -589,7 +587,7 @@ void VISU_ScalarBarActor::ShallowCopy(vtkProp *prop) void VISU_ScalarBarActor::AllocateAndSizeLabels(int *labelSize, int *size, vtkViewport *viewport, - vtkFloatingPointType *range) + double *range) { labelSize[0] = labelSize[1] = 0; @@ -598,7 +596,7 @@ void VISU_ScalarBarActor::AllocateAndSizeLabels(int *labelSize, int *size, char string[512]; - vtkFloatingPointType val; + double val; int i; // TODO: this should be optimized, maybe by keeping a list of @@ -615,11 +613,11 @@ void VISU_ScalarBarActor::AllocateAndSizeLabels(int *labelSize, int *size, this->TextMappers[i] = vtkTextMapper::New(); if(isLogTable && 0 < i && i < this->NumberOfLabels - 1){ // SALOME specific - vtkFloatingPointType lval = log10(range[0]) + (vtkFloatingPointType)i/(this->NumberOfLabels-1) * + double lval = log10(range[0]) + (double)i/(this->NumberOfLabels-1) * (log10(range[1])-log10(range[0])); val = pow((double)10,(double)lval); }else{ - val = range[0] + (vtkFloatingPointType)i/(this->NumberOfLabels-1) * (range[1]-range[0]); + val = range[0] + (double)i/(this->NumberOfLabels-1) * (range[1]-range[0]); } sprintf(string, this->LabelFormat, val); this->TextMappers[i]->SetInput(string); @@ -784,7 +782,7 @@ void VISU_ScalarBarActor::GetRatios(int& titleRatioSize, int& labelRatioWidth, } void VISU_ScalarBarActor::SizeBar(int& barSizeWidth, int& barSizeHeight, int *size, - vtkViewport *viewport, vtkFloatingPointType *range) + vtkViewport *viewport, double *range) { if(BarRatioWidth == 0) if ( this->Orientation == VTK_ORIENT_VERTICAL ) diff --git a/src/PIPELINE/VISU_ScalarBarActor.hxx b/src/PIPELINE/VISU_ScalarBarActor.hxx index dcb57286..8392b082 100644 --- a/src/PIPELINE/VISU_ScalarBarActor.hxx +++ b/src/PIPELINE/VISU_ScalarBarActor.hxx @@ -52,7 +52,7 @@ class vtkTextProperty; class VISU_PIPELINE_EXPORT VISU_ScalarBarActor : public vtkActor2D { public: - vtkTypeRevisionMacro(VISU_ScalarBarActor,vtkActor2D); + vtkTypeMacro(VISU_ScalarBarActor,vtkActor2D); void PrintSelf(ostream& os, vtkIndent indent); // Description: @@ -179,7 +179,7 @@ protected: vtkTextMapper **TextMappers; virtual void AllocateAndSizeLabels(int *labelSize, int *size, - vtkViewport *viewport, vtkFloatingPointType *range); + vtkViewport *viewport, double *range); private: vtkTextMapper *TitleMapper; @@ -201,7 +201,7 @@ private: void SizeTitle(int *titleSize, int *size, vtkViewport *viewport); void SizeBar(int& barSizeWidth, int& barSizeHeight, int *size, - vtkViewport *viewport, vtkFloatingPointType *range); + vtkViewport *viewport, double *range); /** Place the distribution plot actor in the viewport according to the * scalar bar location and orientation */ diff --git a/src/PIPELINE/VISU_ScalarBarCtrl.cxx b/src/PIPELINE/VISU_ScalarBarCtrl.cxx index d128a5cb..08fe75b9 100644 --- a/src/PIPELINE/VISU_ScalarBarCtrl.cxx +++ b/src/PIPELINE/VISU_ScalarBarCtrl.cxx @@ -145,15 +145,15 @@ VISU_ScalarBarCtrl //---------------------------------------------------------------------------- void VISU_ScalarBarCtrl -::SetRangeLocal(vtkFloatingPointType *theRange) +::SetRangeLocal(double *theRange) { myLocalLookupTable->SetTableRange(theRange); } void VISU_ScalarBarCtrl -::SetRangeLocal(vtkFloatingPointType theMin, - vtkFloatingPointType theMax) +::SetRangeLocal(double theMin, + double theMax) { myLocalLookupTable->SetTableRange(theMin,theMax); } @@ -162,15 +162,15 @@ VISU_ScalarBarCtrl //---------------------------------------------------------------------------- void VISU_ScalarBarCtrl -::SetRangeGlobal(vtkFloatingPointType *theRange) +::SetRangeGlobal(double *theRange) { myGlobalLookupTable->SetTableRange(theRange); } void VISU_ScalarBarCtrl -::SetRangeGlobal(vtkFloatingPointType theMin, - vtkFloatingPointType theMax) +::SetRangeGlobal(double theMin, + double theMax) { myGlobalLookupTable->SetTableRange(theMin,theMax); } @@ -237,13 +237,13 @@ VISU_ScalarBarCtrl //---------------------------------------------------------------------------- void VISU_ScalarBarCtrl -::SetWidth(vtkFloatingPointType theWidth) +::SetWidth(double theWidth) { myGlobalScalarBar->SetWidth(theWidth); myLocalScalarBar->SetWidth(theWidth); } -vtkFloatingPointType +double VISU_ScalarBarCtrl ::GetWidth() const { @@ -254,14 +254,14 @@ VISU_ScalarBarCtrl //---------------------------------------------------------------------------- void VISU_ScalarBarCtrl -::SetHeight(vtkFloatingPointType theHeight) +::SetHeight(double theHeight) { myGlobalScalarBar->SetHeight(theHeight); myLocalScalarBar->SetHeight(theHeight); } -vtkFloatingPointType +double VISU_ScalarBarCtrl ::GetHeight() const { @@ -272,13 +272,13 @@ VISU_ScalarBarCtrl //---------------------------------------------------------------------------- void VISU_ScalarBarCtrl -::SetPosition(const vtkFloatingPointType* thePosition) +::SetPosition(const double* thePosition) { myPosition[0] = thePosition[0]; myPosition[1] = thePosition[1]; } -const vtkFloatingPointType* +const double* VISU_ScalarBarCtrl::GetPosition() const { return myPosition; @@ -288,12 +288,12 @@ VISU_ScalarBarCtrl::GetPosition() const //---------------------------------------------------------------------------- void VISU_ScalarBarCtrl -::SetSpacing(const vtkFloatingPointType theSpacing) +::SetSpacing(const double theSpacing) { myDistance = theSpacing; } -vtkFloatingPointType +double VISU_ScalarBarCtrl ::GetSpacing() const { @@ -320,12 +320,12 @@ VISU_ScalarBarCtrl //---------------------------------------------------------------------------- void VISU_ScalarBarCtrl -::SetMarkValue(const vtkFloatingPointType theValue) +::SetMarkValue(const double theValue) { myMarkedValue = theValue; } -vtkFloatingPointType +double VISU_ScalarBarCtrl ::GetMarkValue() const { @@ -380,7 +380,7 @@ VISU_ScalarBarCtrl } } if(myGlobalRangeIsDefined){ - vtkFloatingPointType aLocalRange[2]; + double aLocalRange[2]; myLocalLookupTable->GetTableRange(aLocalRange); myGlobalLookupTable->MarkValueByColor( aLocalRange[0], myBlack ); myGlobalLookupTable->MarkValueByColor( aLocalRange[1], myBlack ); @@ -398,10 +398,10 @@ VISU_ScalarBarCtrl vtkCoordinate * aCoordinate = theScalarBarActor->GetPositionCoordinate(); aCoordinate->SetCoordinateSystemToNormalizedViewport(); if(theScalarBarActor->GetOrientation() == VTK_ORIENT_VERTICAL){ - vtkFloatingPointType aWidth = theScalarBarActor->GetWidth(); + double aWidth = theScalarBarActor->GetWidth(); aCoordinate->SetValue(myPosition[0]+theId*(aWidth+myDistance), myPosition[1]); }else{ - vtkFloatingPointType aHeight = theScalarBarActor->GetHeight(); + double aHeight = theScalarBarActor->GetHeight(); aCoordinate->SetValue(myPosition[0], myPosition[1]+theId*(aHeight+myDistance)); } // Initialize Lookup Tables and Scalar Bars diff --git a/src/PIPELINE/VISU_ScalarBarCtrl.hxx b/src/PIPELINE/VISU_ScalarBarCtrl.hxx index c883a116..f858dbdd 100644 --- a/src/PIPELINE/VISU_ScalarBarCtrl.hxx +++ b/src/PIPELINE/VISU_ScalarBarCtrl.hxx @@ -57,19 +57,19 @@ public: // Ranges void - SetRangeGlobal(vtkFloatingPointType theMin, - vtkFloatingPointType theMax); + SetRangeGlobal(double theMin, + double theMax); void - SetRangeGlobal(vtkFloatingPointType *theRange); + SetRangeGlobal(double *theRange); void SetGlobalRangeIsDefined(bool theIsDefined); void - SetRangeLocal(vtkFloatingPointType theMin, - vtkFloatingPointType theMax); + SetRangeLocal(double theMin, + double theMax); void - SetRangeLocal(vtkFloatingPointType *theRange); + SetRangeLocal(double *theRange); // Selectors VISU_ScalarBarActor* @@ -110,28 +110,28 @@ public: // Position void - SetWidth(const vtkFloatingPointType theWidth); + SetWidth(const double theWidth); - vtkFloatingPointType + double GetWidth() const; void - SetHeight(const vtkFloatingPointType theHeight); + SetHeight(const double theHeight); - vtkFloatingPointType + double GetHeight() const; void - SetPosition(const vtkFloatingPointType* thePosition); + SetPosition(const double* thePosition); - const vtkFloatingPointType* + const double* GetPosition() const; // // Spacing void - SetSpacing(const vtkFloatingPointType theSpacing); + SetSpacing(const double theSpacing); - vtkFloatingPointType + double GetSpacing() const; // // Rainbow/bicolor @@ -143,9 +143,9 @@ public: // // Misc void - SetMarkValue(const vtkFloatingPointType theValue); + SetMarkValue(const double theValue); - vtkFloatingPointType + double GetMarkValue() const; void @@ -181,8 +181,8 @@ protected: EMode myMode; bool myGlobalRangeIsDefined; - vtkFloatingPointType myDistance; - vtkFloatingPointType myPosition[2]; + double myDistance; + double myPosition[2]; bool myBicolor; int myCtrlVisibility; @@ -190,7 +190,7 @@ protected: unsigned char myGrey[3]; // bool myMarked; - vtkFloatingPointType myMarkedValue; + double myMarkedValue; // VISU_ScalarBarActor *myGlobalScalarBar; VISU_LookupTable *myGlobalLookupTable; diff --git a/src/PIPELINE/VISU_ScalarMapPL.cxx b/src/PIPELINE/VISU_ScalarMapPL.cxx index ffa61c00..fe6549c7 100644 --- a/src/PIPELINE/VISU_ScalarMapPL.cxx +++ b/src/PIPELINE/VISU_ScalarMapPL.cxx @@ -243,7 +243,7 @@ VISU_ScalarMapPL //---------------------------------------------------------------------------- void VISU_ScalarMapPL -::GetSourceRange(vtkFloatingPointType theRange[2]) +::GetSourceRange(double theRange[2]) { if(!IsExternalGeometryUsed()) Superclass::GetSourceRange(theRange); diff --git a/src/PIPELINE/VISU_ScalarMapPL.hxx b/src/PIPELINE/VISU_ScalarMapPL.hxx index ad8d56f3..27b9ffdb 100644 --- a/src/PIPELINE/VISU_ScalarMapPL.hxx +++ b/src/PIPELINE/VISU_ScalarMapPL.hxx @@ -85,7 +85,7 @@ public: virtual void - GetSourceRange(vtkFloatingPointType theRange[2]); + GetSourceRange(double theRange[2]); virtual void diff --git a/src/PIPELINE/VISU_SphereWidget.cxx b/src/PIPELINE/VISU_SphereWidget.cxx index 27681762..93a440b9 100755 --- a/src/PIPELINE/VISU_SphereWidget.cxx +++ b/src/PIPELINE/VISU_SphereWidget.cxx @@ -43,7 +43,6 @@ #include #include -vtkCxxRevisionMacro(VISU_SphereWidget, "$Revision$"); vtkStandardNewMacro(VISU_SphereWidget); //==================================================================== // function: @@ -65,7 +64,7 @@ VISU_SphereWidget::VISU_SphereWidget() mySphereActor->SetMapper(mySphereMapper); // // Define the point coordinates - vtkFloatingPointType bounds[6]; + double bounds[6]; for(int i = 0; i < 6; i += 2){ bounds[i]=-.5; bounds[i+1]=-bounds[i]; @@ -148,7 +147,7 @@ int VISU_SphereWidget::GetPhiResolution() // function: SetRadius // purpose : //==================================================================== -void VISU_SphereWidget::SetRadius(vtkFloatingPointType theRadius) +void VISU_SphereWidget::SetRadius(double theRadius) { if ( theRadius <= myRmin ) { theRadius = myRmin; @@ -160,7 +159,7 @@ void VISU_SphereWidget::SetRadius(vtkFloatingPointType theRadius) // function: GetRadius // purpose : //==================================================================== -vtkFloatingPointType VISU_SphereWidget::GetRadius() +double VISU_SphereWidget::GetRadius() { return mySphereSource->GetRadius(); } @@ -168,7 +167,7 @@ vtkFloatingPointType VISU_SphereWidget::GetRadius() // function: SetCenter // purpose : //==================================================================== -void VISU_SphereWidget::SetCenter(vtkFloatingPointType theCenter[3]) +void VISU_SphereWidget::SetCenter(double theCenter[3]) { mySphereSource->SetCenter(theCenter); mySphere->SetCenter(theCenter); @@ -177,9 +176,9 @@ void VISU_SphereWidget::SetCenter(vtkFloatingPointType theCenter[3]) // function: SetCenter // purpose : //==================================================================== -void VISU_SphereWidget::SetCenter(vtkFloatingPointType theX, vtkFloatingPointType theY, vtkFloatingPointType theZ) +void VISU_SphereWidget::SetCenter(double theX, double theY, double theZ) { - vtkFloatingPointType aCenter[3] = {theX, theY, theZ}; + double aCenter[3] = {theX, theY, theZ}; SetCenter(aCenter); } @@ -187,7 +186,7 @@ void VISU_SphereWidget::SetCenter(vtkFloatingPointType theX, vtkFloatingPointTyp // function: GetCenter // purpose : //==================================================================== -vtkFloatingPointType* VISU_SphereWidget::GetCenter() +double* VISU_SphereWidget::GetCenter() { return mySphereSource->GetCenter(); } @@ -195,7 +194,7 @@ vtkFloatingPointType* VISU_SphereWidget::GetCenter() // function: GetCenter // purpose : //==================================================================== -void VISU_SphereWidget::GetCenter(vtkFloatingPointType theCenter[3]) +void VISU_SphereWidget::GetCenter(double theCenter[3]) { mySphereSource->GetCenter(theCenter); } @@ -491,7 +490,7 @@ void VISU_SphereWidget::OnMiddleButtonUp() //==================================================================== void VISU_SphereWidget::Translate(double *p1, double *p2) { - vtkFloatingPointType v[3], aC[3], aC1[3]; + double v[3], aC[3], aC1[3]; // v[0] = p2[0] - p1[0]; v[1] = p2[1] - p1[1]; @@ -517,7 +516,7 @@ void VISU_SphereWidget::Scale(double *p1, double *p2, v[1] = p2[1] - p1[1]; v[2] = p2[2] - p1[2]; // - vtkFloatingPointType aC[3], aR, sf, aR1; + double aC[3], aR, sf, aR1; aR=mySphereSource->GetRadius(); mySphereSource->GetCenter(aC); sf=vtkMath::Norm(v)/aR; @@ -583,12 +582,12 @@ void VISU_SphereWidget::CreateDefaultProperties() // function:PlaceWidget // purpose: //==================================================================== -void VISU_SphereWidget::PlaceWidget(vtkFloatingPointType bds[6]) +void VISU_SphereWidget::PlaceWidget(double bds[6]) { - vtkFloatingPointType bounds[6], center[3], radius; + double bounds[6], center[3], radius; this->AdjustBounds(bds, bounds, center); - vtkFloatingPointType dX, dY, dZ; + double dX, dY, dZ; // dX=bounds[1]-bounds[0]; dY=bounds[3]-bounds[2]; @@ -613,7 +612,7 @@ void VISU_SphereWidget::PlaceWidget(vtkFloatingPointType bds[6]) (bounds[3]-bounds[2])*(bounds[3]-bounds[2]) + (bounds[5]-bounds[4])*(bounds[5]-bounds[4])); - static vtkFloatingPointType EPS = 1.0E-1; + static double EPS = 1.0E-1; myRmin = EPS*InitialLength; } diff --git a/src/PIPELINE/VISU_SphereWidget.hxx b/src/PIPELINE/VISU_SphereWidget.hxx index 9fe4917e..533adeb6 100755 --- a/src/PIPELINE/VISU_SphereWidget.hxx +++ b/src/PIPELINE/VISU_SphereWidget.hxx @@ -46,7 +46,7 @@ public: // Description: // Instantiate the object. static VISU_SphereWidget *New(); - vtkTypeRevisionMacro(VISU_SphereWidget,VISU_ImplicitFunctionWidget); + vtkTypeMacro(VISU_SphereWidget,VISU_ImplicitFunctionWidget); void PrintSelf(ostream& os, vtkIndent indent); virtual vtkImplicitFunction* ImplicitFunction(); @@ -56,7 +56,7 @@ public: virtual void SetEnabled(int); // //PlaceWidget - virtual void PlaceWidget(vtkFloatingPointType bounds[6]); + virtual void PlaceWidget(double bounds[6]); // // Description: // Set/Get the resolution of the sphere in the Theta direction. @@ -69,24 +69,24 @@ public: // Description: // Set/Get the radius of sphere. Default is .5. - void SetRadius(vtkFloatingPointType r); - vtkFloatingPointType GetRadius(); + void SetRadius(double r); + double GetRadius(); // Description: // Set/Get the center of the sphere. - void SetCenter(vtkFloatingPointType x, - vtkFloatingPointType y, - vtkFloatingPointType z); - void SetCenter(vtkFloatingPointType x[3]); + void SetCenter(double x, + double y, + double z); + void SetCenter(double x[3]); - vtkFloatingPointType* GetCenter(); - void GetCenter(vtkFloatingPointType xyz[3]); + double* GetCenter(); + void GetCenter(double xyz[3]); // Description: // Set the ratio of the radius changing. - void SetRatio(vtkFloatingPointType r) { myRatio = r; } - vtkFloatingPointType GetRatio() { return myRatio; } + void SetRatio(double r) { myRatio = r; } + double GetRatio() { return myRatio; } void ChangeRadius(bool up); @@ -147,10 +147,10 @@ protected: // the manipulator in general. vtkProperty *mySphereProperty; vtkProperty *mySelectedSphereProperty; - vtkFloatingPointType myRmin; + double myRmin; vtkSphere *mySphere; vtkImplicitSum* myImplicitSum; - vtkFloatingPointType myRatio; + double myRatio; private: VISU_SphereWidget(const VISU_SphereWidget&); //Not implemented void operator=(const VISU_SphereWidget&); //Not implemented diff --git a/src/PIPELINE/VISU_StreamLine.cxx b/src/PIPELINE/VISU_StreamLine.cxx index a93fc708..cca50ff6 100644 --- a/src/PIPELINE/VISU_StreamLine.cxx +++ b/src/PIPELINE/VISU_StreamLine.cxx @@ -30,7 +30,6 @@ #include "vtkPolyData.h" #include "vtkPolyLine.h" -vtkCxxRevisionMacro(VISU_StreamLine, "$Revision$"); vtkStandardNewMacro(VISU_StreamLine); // Construct object with step size set to 1.0. diff --git a/src/PIPELINE/VISU_StreamLine.hxx b/src/PIPELINE/VISU_StreamLine.hxx index 63202f81..4e47ff68 100644 --- a/src/PIPELINE/VISU_StreamLine.hxx +++ b/src/PIPELINE/VISU_StreamLine.hxx @@ -26,7 +26,7 @@ class VISU_PIPELINE_EXPORT VISU_StreamLine : public VISU_Streamer { public: - vtkTypeRevisionMacro(VISU_StreamLine,VISU_Streamer); + vtkTypeMacro(VISU_StreamLine,VISU_Streamer); void PrintSelf(ostream& os, vtkIndent indent); // Description: diff --git a/src/PIPELINE/VISU_StreamLinesPL.cxx b/src/PIPELINE/VISU_StreamLinesPL.cxx index 6fd7b52c..7083fc37 100644 --- a/src/PIPELINE/VISU_StreamLinesPL.cxx +++ b/src/PIPELINE/VISU_StreamLinesPL.cxx @@ -51,10 +51,10 @@ static int MYDEBUG = 0; static int MYDEBUG = 0; #endif -static vtkFloatingPointType EPS = 1.0e-7; -static vtkFloatingPointType aMinNbOfSteps = 1.0E+2; -//static vtkFloatingPointType aMaxNbOfSteps = 1.0E+3; -static vtkFloatingPointType aCoeffOfIntStep = 1.0E+1; +static double EPS = 1.0e-7; +static double aMinNbOfSteps = 1.0E+2; +//static double aMaxNbOfSteps = 1.0E+3; +static double aCoeffOfIntStep = 1.0E+1; //---------------------------------------------------------------------------- @@ -135,31 +135,31 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetNecasseryMemorySize(vtkIdType theNbOfPoints, - vtkFloatingPointType theStepLength, - vtkFloatingPointType thePropogationTime, - vtkFloatingPointType thePercents) + double theStepLength, + double thePropogationTime, + double thePercents) { - static vtkFloatingPointType aStreamPointSize = sizeof(vtkFloatingPointType)*15 + sizeof(vtkIdType)*2; - static vtkFloatingPointType aStreamArraySize = aStreamPointSize*1024; // == 69632 + static double aStreamPointSize = sizeof(double)*15 + sizeof(vtkIdType)*2; + static double aStreamArraySize = aStreamPointSize*1024; // == 69632 - vtkFloatingPointType aNbCells = thePercents*theNbOfPoints*2.0; - vtkFloatingPointType aNbPointsPerCell = thePropogationTime/theStepLength; - vtkFloatingPointType aCellsSize = aNbCells*(1+aNbPointsPerCell); - vtkFloatingPointType aPointsSize = aCellsSize*3.0*sizeof(vtkFloatingPointType); + double aNbCells = thePercents*theNbOfPoints*2.0; + double aNbPointsPerCell = thePropogationTime/theStepLength; + double aCellsSize = aNbCells*(1+aNbPointsPerCell); + double aPointsSize = aCellsSize*3.0*sizeof(double); - 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; + double aConnectivitySize = aCellsSize*sizeof(vtkIdType); + double aTypesSize = aNbCells*sizeof(char); + double aLocationsSize = aNbCells*sizeof(int); + //double aNbCellsPerPoint = aCellsSize / aNbCells - 1; + double aMeshSize = aPointsSize + aConnectivitySize + aTypesSize + aLocationsSize; - vtkFloatingPointType anAssignedDataSize = aCellsSize*4.0*sizeof(vtkFloatingPointType); - vtkFloatingPointType anOutputDataSetSize = aMeshSize + anAssignedDataSize; + double anAssignedDataSize = aCellsSize*4.0*sizeof(double); + double anOutputDataSetSize = aMeshSize + anAssignedDataSize; - vtkFloatingPointType aResult = aStreamArraySize*aNbCells + anOutputDataSetSize; + double aResult = aStreamArraySize*aNbCells + anOutputDataSetSize; return aResult; } @@ -168,26 +168,26 @@ VISU_StreamLinesPL size_t VISU_StreamLinesPL ::FindPossibleParams(vtkDataSet* theDataSet, - vtkFloatingPointType& theStepLength, - vtkFloatingPointType& thePropogationTime, - vtkFloatingPointType& thePercents) + double& theStepLength, + double& thePropogationTime, + double& thePercents) { - static vtkFloatingPointType aPercentsDecrease = 3.0, aStepLengthIncrease = 9.0; + static double aPercentsDecrease = 3.0, aStepLengthIncrease = 9.0; vtkIdType aNbOfPoints = theDataSet->GetNumberOfPoints(); - vtkFloatingPointType aSize = GetNecasseryMemorySize(aNbOfPoints,theStepLength,thePropogationTime,thePercents); + double aSize = GetNecasseryMemorySize(aNbOfPoints,theStepLength,thePropogationTime,thePercents); size_t anIsPossible = CheckAvailableMemory(aSize); if(!anIsPossible){ - vtkFloatingPointType aMaxStepLength = std::max(GetMaxStepLength(theDataSet),thePropogationTime); - vtkFloatingPointType aMinStepLength = GetMinStepLength(theDataSet,thePercents); - vtkFloatingPointType aDeltaStepLength = (aMaxStepLength - aMinStepLength)/aStepLengthIncrease; + double aMaxStepLength = std::max(GetMaxStepLength(theDataSet),thePropogationTime); + double aMinStepLength = GetMinStepLength(theDataSet,thePercents); + double aDeltaStepLength = (aMaxStepLength - aMinStepLength)/aStepLengthIncrease; for(int i = 2, aStepChanged = 1, aPerecentsChanged = 1; aStepChanged || aPerecentsChanged; i++){ - vtkFloatingPointType aStepLength = theStepLength + aDeltaStepLength; + double aStepLength = theStepLength + aDeltaStepLength; if(aStepLength < aMaxStepLength) theStepLength = aStepLength; else if(aStepChanged){ aStepLength = aMaxStepLength; aStepChanged = 0; } - vtkFloatingPointType aPercents = thePercents /= aPercentsDecrease; + double aPercents = thePercents /= aPercentsDecrease; if(aPercents*aNbOfPoints > 1) thePercents = aPercents; else if(aPerecentsChanged) { thePercents = 1.1 / aNbOfPoints; @@ -208,11 +208,11 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- size_t VISU_StreamLinesPL -::SetParams(vtkFloatingPointType theIntStep, - vtkFloatingPointType thePropogationTime, - vtkFloatingPointType theStepLength, +::SetParams(double theIntStep, + double thePropogationTime, + double theStepLength, vtkPointSet* theSource, - vtkFloatingPointType thePercents, + double thePercents, int theDirection) { vtkPointSet* aDataSet = theSource? theSource: GetMergedInput(); @@ -274,7 +274,7 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetUsedPoints() { @@ -292,7 +292,7 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetVelocityCoeff() { @@ -301,12 +301,12 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetVelocityCoeff(vtkDataSet* theDataSet) { - vtkFloatingPointType* aScalarRange = theDataSet->GetScalarRange(); - vtkFloatingPointType aVelocity = (fabs(aScalarRange[1]) + fabs(aScalarRange[0]))/2.0; + double* aScalarRange = theDataSet->GetScalarRange(); + double aVelocity = (fabs(aScalarRange[1]) + fabs(aScalarRange[0]))/2.0; if (aVelocity < EPS) return EPS; @@ -319,10 +319,10 @@ size_t VISU_StreamLinesPL ::IsPossible(vtkPointSet* theDataSet) { - vtkFloatingPointType aPercents = GetUsedPointsDefault(); - vtkFloatingPointType aStepLength = GetBaseStepLength(theDataSet, + double aPercents = GetUsedPointsDefault(); + double aStepLength = GetBaseStepLength(theDataSet, aPercents); - vtkFloatingPointType aBasePropTime = GetBasePropagationTime(theDataSet); + double aBasePropTime = GetBasePropagationTime(theDataSet); VISU_MaskPointsFilter *aPointsFilter = VISU_MaskPointsFilter::New(); aPointsFilter->SetInput(theDataSet); vtkDataSet* aDataSet = aPointsFilter->GetOutput(); @@ -337,7 +337,7 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetIntegrationStep() { @@ -346,7 +346,7 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetStepLength() { @@ -355,7 +355,7 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetPropagationTime() { @@ -373,10 +373,10 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetMinIntegrationStep(vtkDataSet* theDataSet, - vtkFloatingPointType thePercents) + double thePercents) { if(!theDataSet) return -1.0; @@ -384,10 +384,10 @@ VISU_StreamLinesPL theDataSet->Update(); int degree = 0; - vtkFloatingPointType aVolume = 1.0; - vtkFloatingPointType* aBounds = theDataSet->GetBounds(); + double aVolume = 1.0; + double* aBounds = theDataSet->GetBounds(); for(int i = 0, j = 0; i < 3; ++i, j = 2*i){ - vtkFloatingPointType tmp = aBounds[j+1] - aBounds[j]; + double tmp = aBounds[j+1] - aBounds[j]; if (tmp > EPS ) { aVolume *= tmp; degree += 1; @@ -397,21 +397,21 @@ VISU_StreamLinesPL if (degree < 1) return 0.0; // absolutely empty object - vtkFloatingPointType anStepLength = GetMaxIntegrationStep(theDataSet)/aCoeffOfIntStep; + double anStepLength = GetMaxIntegrationStep(theDataSet)/aCoeffOfIntStep; // 0020724: last division has been commented, seems to be a logical mistake (to discuss with APO) - vtkFloatingPointType aBasePropTime = GetBasePropagationTime(theDataSet); // /GetVelocityCoeff(theDataSet) + double aBasePropTime = GetBasePropagationTime(theDataSet); // /GetVelocityCoeff(theDataSet) thePercents = 1.0; vtkIdType aNbOfPoints = theDataSet->GetNumberOfPoints(); - vtkFloatingPointType aSize = GetNecasseryMemorySize(aNbOfPoints,anStepLength,aBasePropTime,thePercents); + double aSize = GetNecasseryMemorySize(aNbOfPoints,anStepLength,aBasePropTime,thePercents); size_t aRealSize = GetAvailableMemory(aSize); - vtkFloatingPointType anAverageVolume = aVolume / aRealSize; - vtkFloatingPointType aStep = pow(double(anAverageVolume), double(1.0/double(degree))); + double anAverageVolume = aVolume / aRealSize; + double aStep = pow(double(anAverageVolume), double(1.0/double(degree))); return aStep; } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetMinIntegrationStep() { @@ -420,7 +420,7 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetMaxIntegrationStep(vtkDataSet* theDataSet) { @@ -429,11 +429,11 @@ VISU_StreamLinesPL theDataSet->Update(); - 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; + double aLength = theDataSet->GetLength(); + double* aBounds = theDataSet->GetBounds(); + double aMaxSizeY = (aBounds[3]-aBounds[2])/aLength; + double aMaxSizeZ = (aBounds[5]-aBounds[4])/aLength; + double aMinMax = (aBounds[1] - aBounds[0])/aLength; if (aMinMax < EPS || (aMaxSizeY < aMinMax && aMaxSizeY > EPS)) aMinMax = aMaxSizeY; if (aMinMax < EPS || (aMaxSizeZ < aMinMax && aMaxSizeZ > EPS)) @@ -443,7 +443,7 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetMaxIntegrationStep() { @@ -452,20 +452,20 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetBaseIntegrationStep(vtkDataSet* theDataSet, - vtkFloatingPointType thePercents) + double thePercents) { theDataSet->Update(); - vtkFloatingPointType aMaxIntegrationStep = GetMaxIntegrationStep(theDataSet); - vtkFloatingPointType anIntegrationStep = aMaxIntegrationStep / aCoeffOfIntStep; - vtkFloatingPointType aMinMax = theDataSet->GetLength() / theDataSet->GetNumberOfPoints(); + double aMaxIntegrationStep = GetMaxIntegrationStep(theDataSet); + double anIntegrationStep = aMaxIntegrationStep / aCoeffOfIntStep; + double aMinMax = theDataSet->GetLength() / theDataSet->GetNumberOfPoints(); if(aMinMax > anIntegrationStep) anIntegrationStep = (anIntegrationStep*aCoeffOfIntStep*0.9+aMinMax)/aCoeffOfIntStep; - vtkFloatingPointType aMinIntegrationStep = GetMinIntegrationStep(theDataSet, thePercents); + double aMinIntegrationStep = GetMinIntegrationStep(theDataSet, thePercents); if(aMinIntegrationStep > anIntegrationStep) anIntegrationStep = aMinIntegrationStep; @@ -474,19 +474,19 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL -::CorrectIntegrationStep(vtkFloatingPointType theStep, +::CorrectIntegrationStep(double theStep, vtkDataSet* theDataSet, - vtkFloatingPointType thePercents) + double thePercents) { theDataSet->Update(); - vtkFloatingPointType aMinIntegrationStep = GetMinIntegrationStep(theDataSet, thePercents); + double aMinIntegrationStep = GetMinIntegrationStep(theDataSet, thePercents); if(aMinIntegrationStep > theStep) theStep = aMinIntegrationStep; - vtkFloatingPointType aMaxIntegrationStep = GetMaxIntegrationStep(theDataSet); + double aMaxIntegrationStep = GetMaxIntegrationStep(theDataSet); if(aMaxIntegrationStep < theStep) theStep = aMaxIntegrationStep; @@ -495,10 +495,10 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetMinPropagationTime(vtkDataSet* theDataSet, - vtkFloatingPointType thePercents) + double thePercents) { if(!theDataSet) return -1.0; @@ -508,7 +508,7 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetMinPropagationTime() { @@ -517,7 +517,7 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetMaxPropagationTime(vtkDataSet* theDataSet) { @@ -529,7 +529,7 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetMaxPropagationTime() { @@ -538,17 +538,17 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL -::CorrectPropagationTime(vtkFloatingPointType thePropagationTime, +::CorrectPropagationTime(double thePropagationTime, vtkDataSet* theDataSet, - vtkFloatingPointType thePercents) + double thePercents) { - vtkFloatingPointType aMinPropagationTime = GetMinPropagationTime(theDataSet, thePercents); + double aMinPropagationTime = GetMinPropagationTime(theDataSet, thePercents); if(aMinPropagationTime > thePropagationTime) thePropagationTime = aMinPropagationTime; - vtkFloatingPointType aMaxPropagationTime = GetMaxPropagationTime(theDataSet); + double aMaxPropagationTime = GetMaxPropagationTime(theDataSet); if(aMaxPropagationTime < thePropagationTime) thePropagationTime = aMaxPropagationTime; @@ -557,7 +557,7 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetBasePropagationTime(vtkDataSet* theDataSet) { @@ -565,14 +565,14 @@ VISU_StreamLinesPL return -1.0; theDataSet->Update(); - vtkFloatingPointType aPropagationTime = theDataSet->GetLength() / GetVelocityCoeff(theDataSet); + double aPropagationTime = theDataSet->GetLength() / GetVelocityCoeff(theDataSet); return aPropagationTime; } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetBasePropagationTime() { @@ -581,20 +581,20 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetMinStepLength(vtkDataSet* theDataSet, - vtkFloatingPointType thePercents) + double thePercents) { - static vtkFloatingPointType aNbOfStepsOfIntStep = 1.0E+1; - vtkFloatingPointType anIntStep = GetMinIntegrationStep(theDataSet, thePercents); - vtkFloatingPointType aStepLength = anIntStep * aNbOfStepsOfIntStep / GetVelocityCoeff(theDataSet); + static double aNbOfStepsOfIntStep = 1.0E+1; + double anIntStep = GetMinIntegrationStep(theDataSet, thePercents); + double aStepLength = anIntStep * aNbOfStepsOfIntStep / GetVelocityCoeff(theDataSet); return aStepLength; } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetMinStepLength() { @@ -603,17 +603,17 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetMaxStepLength(vtkDataSet* theDataSet) { - vtkFloatingPointType aStepLength = GetBasePropagationTime(theDataSet); + double aStepLength = GetBasePropagationTime(theDataSet); return aStepLength; } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetMaxStepLength() { @@ -622,17 +622,17 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL -::CorrectStepLength(vtkFloatingPointType theStep, +::CorrectStepLength(double theStep, vtkDataSet* theDataSet, - vtkFloatingPointType thePercents) + double thePercents) { - vtkFloatingPointType aMinStep = GetMinStepLength(theDataSet, thePercents); + double aMinStep = GetMinStepLength(theDataSet, thePercents); if(theStep < aMinStep) theStep = aMinStep; - vtkFloatingPointType aMaxStep = GetMaxStepLength(theDataSet); + double aMaxStep = GetMaxStepLength(theDataSet); if(theStep > aMaxStep) theStep = aMaxStep; @@ -641,14 +641,14 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetBaseStepLength(vtkDataSet* theDataSet, - vtkFloatingPointType thePercents) + double thePercents) { - static vtkFloatingPointType anAvgNbOfSteps = 1.0E+2; - vtkFloatingPointType aPropagationTime = GetBasePropagationTime(theDataSet); - vtkFloatingPointType aStepLength = aPropagationTime/anAvgNbOfSteps; + static double anAvgNbOfSteps = 1.0E+2; + double aPropagationTime = GetBasePropagationTime(theDataSet); + double aStepLength = aPropagationTime/anAvgNbOfSteps; aStepLength = CorrectStepLength(aStepLength,theDataSet,thePercents); return aStepLength; @@ -656,7 +656,7 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_StreamLinesPL ::GetUsedPointsDefault() { @@ -673,9 +673,9 @@ VISU_StreamLinesPL Superclass::Init(); vtkDataSet* aDataSet = GetExtractorFilter()->GetOutput(); - vtkFloatingPointType anIntStep = GetBaseIntegrationStep(aDataSet, GetUsedPoints()); - vtkFloatingPointType aPropagationTime = GetBasePropagationTime(aDataSet); - vtkFloatingPointType aStepLength = GetBaseStepLength(aDataSet, GetUsedPoints()); + double anIntStep = GetBaseIntegrationStep(aDataSet, GetUsedPoints()); + double aPropagationTime = GetBasePropagationTime(aDataSet); + double aStepLength = GetBaseStepLength(aDataSet, GetUsedPoints()); SetParams(anIntStep, aPropagationTime, aStepLength, @@ -717,7 +717,7 @@ VISU_StreamLinesPL try{ Superclass::Update(); - vtkFloatingPointType aBounds[6]; + double aBounds[6]; GetMergedInput()->GetBounds(aBounds); myGeomFilter->SetExtent(aBounds); //{ @@ -756,7 +756,7 @@ VISU_StreamLinesPL //---------------------------------------------------------------------------- void VISU_StreamLinesPL -::SetMapScale(vtkFloatingPointType theMapScale) +::SetMapScale(double theMapScale) { Superclass::SetMapScale(theMapScale); } diff --git a/src/PIPELINE/VISU_StreamLinesPL.hxx b/src/PIPELINE/VISU_StreamLinesPL.hxx index adf6e829..1b4c62e4 100644 --- a/src/PIPELINE/VISU_StreamLinesPL.hxx +++ b/src/PIPELINE/VISU_StreamLinesPL.hxx @@ -58,11 +58,11 @@ public: //---------------------------------------------------------------------------- virtual size_t - SetParams(vtkFloatingPointType theIntStep, - vtkFloatingPointType thePropogationTime, - vtkFloatingPointType theStepLength, + SetParams(double theIntStep, + double thePropogationTime, + double theStepLength, vtkPointSet* theSource, - vtkFloatingPointType thePercents, + double thePercents, int theDirection = VTK_INTEGRATE_BOTH_DIRECTIONS); virtual @@ -70,19 +70,19 @@ public: GetSource(); virtual - vtkFloatingPointType + double GetUsedPoints(); virtual - vtkFloatingPointType + double GetIntegrationStep(); virtual - vtkFloatingPointType + double GetPropagationTime(); virtual - vtkFloatingPointType + double GetStepLength(); virtual @@ -94,35 +94,35 @@ public: GetStreamerSource(); virtual - vtkFloatingPointType + double GetVelocityCoeff(); virtual - vtkFloatingPointType + double GetMaxIntegrationStep(); virtual - vtkFloatingPointType + double GetMinIntegrationStep(); virtual - vtkFloatingPointType + double GetMinStepLength(); virtual - vtkFloatingPointType + double GetMaxStepLength(); virtual - vtkFloatingPointType + double GetMinPropagationTime(); virtual - vtkFloatingPointType + double GetMaxPropagationTime(); virtual - vtkFloatingPointType + double GetBasePropagationTime(); public: @@ -149,51 +149,51 @@ public: virtual void - SetMapScale(vtkFloatingPointType theMapScale = 1.0); + SetMapScale(double theMapScale = 1.0); public: static - vtkFloatingPointType + double GetMaxIntegrationStep(vtkDataSet* theDataSet); static - vtkFloatingPointType + double GetMinIntegrationStep(vtkDataSet* theDataSet, - vtkFloatingPointType thePercents); + double thePercents); static - vtkFloatingPointType + double GetBaseIntegrationStep(vtkDataSet* theDataSet, - vtkFloatingPointType thePercents); + double thePercents); static - vtkFloatingPointType + double GetMinPropagationTime(vtkDataSet* theDataSet, - vtkFloatingPointType thePercents); + double thePercents); static - vtkFloatingPointType + double GetMaxPropagationTime(vtkDataSet* theDataSet); static - vtkFloatingPointType + double GetBasePropagationTime(vtkDataSet* theDataSet); static - vtkFloatingPointType + double GetMinStepLength(vtkDataSet* theDataSet, - vtkFloatingPointType thePercents); + double thePercents); static - vtkFloatingPointType + double GetMaxStepLength(vtkDataSet* theDataSet); static - vtkFloatingPointType + double GetBaseStepLength(vtkDataSet* theDataSet, - vtkFloatingPointType thePercents); + double thePercents); static - vtkFloatingPointType + double GetVelocityCoeff(vtkDataSet* theDataSet); static @@ -212,39 +212,39 @@ protected: bool theIsCopyInput); static - vtkFloatingPointType + double GetNecasseryMemorySize(vtkIdType theNbOfPoints, - vtkFloatingPointType theStepLength, - vtkFloatingPointType thePropogationTime, - vtkFloatingPointType thePercents); + double theStepLength, + double thePropogationTime, + double thePercents); static size_t FindPossibleParams(vtkDataSet* theDataSet, - vtkFloatingPointType& theStepLength, - vtkFloatingPointType& thePropogationTime, - vtkFloatingPointType& thePercents); + double& theStepLength, + double& thePropogationTime, + double& thePercents); static - vtkFloatingPointType - CorrectIntegrationStep(vtkFloatingPointType theStep, + double + CorrectIntegrationStep(double theStep, vtkDataSet* theDataSet, - vtkFloatingPointType thePercents); + double thePercents); static - vtkFloatingPointType - CorrectPropagationTime(vtkFloatingPointType thePropagationTime, + double + CorrectPropagationTime(double thePropagationTime, vtkDataSet* theDataSet, - vtkFloatingPointType thePercents); + double thePercents); static - vtkFloatingPointType - CorrectStepLength(vtkFloatingPointType theStep, + double + CorrectStepLength(double theStep, vtkDataSet* theDataSet, - vtkFloatingPointType thePercents); + double thePercents); static - vtkFloatingPointType + double GetUsedPointsDefault(); vtkStreamLine* myStream; @@ -252,7 +252,7 @@ protected: VTKViewer_CellCenters* myCenters; VTKViewer_GeometryFilter *myGeomFilter; VISU_MaskPointsFilter *myPointsFilter; - vtkFloatingPointType myPercents; + double myPercents; private: VISU_StreamLinesPL(const VISU_StreamLinesPL&); // Not implemented. diff --git a/src/PIPELINE/VISU_Streamer.cxx b/src/PIPELINE/VISU_Streamer.cxx index 98f3e2f6..89d19997 100644 --- a/src/PIPELINE/VISU_Streamer.cxx +++ b/src/PIPELINE/VISU_Streamer.cxx @@ -32,8 +32,6 @@ #include "vtkPointData.h" #include "vtkRungeKutta2.h" -vtkCxxRevisionMacro(VISU_Streamer, "$Revision$"); - #define VTK_START_FROM_POSITION 0 #define VTK_START_FROM_LOCATION 1 diff --git a/src/PIPELINE/VISU_Streamer.hxx b/src/PIPELINE/VISU_Streamer.hxx index 1ed5750e..03cd178a 100644 --- a/src/PIPELINE/VISU_Streamer.hxx +++ b/src/PIPELINE/VISU_Streamer.hxx @@ -27,7 +27,7 @@ class VISU_PIPELINE_EXPORT VISU_Streamer : public vtkStreamer { public: - vtkTypeRevisionMacro(VISU_Streamer,vtkStreamer); + vtkTypeMacro(VISU_Streamer,vtkStreamer); protected: // Description: diff --git a/src/PIPELINE/VISU_VectorsPL.cxx b/src/PIPELINE/VISU_VectorsPL.cxx index 61c8fc85..09a4184f 100644 --- a/src/PIPELINE/VISU_VectorsPL.cxx +++ b/src/PIPELINE/VISU_VectorsPL.cxx @@ -155,7 +155,7 @@ VISU_VectorsPL //---------------------------------------------------------------------------- void VISU_VectorsPL -::SetScale(vtkFloatingPointType theScale) +::SetScale(double theScale) { if ( VISU::CheckIsSameValue( myScaleFactor, theScale ) ) return; @@ -169,7 +169,7 @@ VISU_VectorsPL //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU_VectorsPL ::GetScale() { @@ -346,7 +346,7 @@ VISU_VectorsPL //---------------------------------------------------------------------------- void VISU_VectorsPL -::SetMapScale(vtkFloatingPointType theMapScale) +::SetMapScale(double theMapScale) { VISU_ScalarMapPL::SetMapScale(theMapScale); myMapScaleFactor = theMapScale; diff --git a/src/PIPELINE/VISU_VectorsPL.hxx b/src/PIPELINE/VISU_VectorsPL.hxx index 5c70b160..1b69f50b 100644 --- a/src/PIPELINE/VISU_VectorsPL.hxx +++ b/src/PIPELINE/VISU_VectorsPL.hxx @@ -60,10 +60,10 @@ public: //---------------------------------------------------------------------------- virtual void - SetScale(vtkFloatingPointType theScale); + SetScale(double theScale); virtual - vtkFloatingPointType + double GetScale(); enum GlyphType{ ARROW, CONE2, CONE6, NONE}; @@ -117,7 +117,7 @@ public: virtual void - SetMapScale(vtkFloatingPointType theMapScale = 1.0); + SetMapScale(double theMapScale = 1.0); protected: VISU_VectorsPL(); diff --git a/src/PIPELINE/VISU_WidgetCtrl.cxx b/src/PIPELINE/VISU_WidgetCtrl.cxx index be9ef342..cccb7325 100644 --- a/src/PIPELINE/VISU_WidgetCtrl.cxx +++ b/src/PIPELINE/VISU_WidgetCtrl.cxx @@ -41,7 +41,6 @@ #include #include // -vtkCxxRevisionMacro(VISU_WidgetCtrl,"$Revision$"); vtkStandardNewMacro(VISU_WidgetCtrl); //================================================================== @@ -268,7 +267,7 @@ VISU_SphereWidget* VISU_WidgetCtrl::GetSphereWidget() // function: PlaceWidget // purpose : //================================================================== -void VISU_WidgetCtrl::PlaceWidget(vtkFloatingPointType theBounds[6]) +void VISU_WidgetCtrl::PlaceWidget(double theBounds[6]) { for (int i=0; iPlaceWidget(theBounds); @@ -298,7 +297,7 @@ vtkRenderWindowInteractor* VISU_WidgetCtrl::GetInteractor() // function: SetPlaceFactor // purpose : //================================================================== -void VISU_WidgetCtrl::SetPlaceFactor(vtkFloatingPointType theFactor) +void VISU_WidgetCtrl::SetPlaceFactor(double theFactor) { for (int i=0; iSetPlaceFactor(theFactor); @@ -310,7 +309,7 @@ void VISU_WidgetCtrl::SetPlaceFactor(vtkFloatingPointType theFactor) // function: GetPlaceFactor // purpose : //================================================================== -vtkFloatingPointType VISU_WidgetCtrl::GetPlaceFactor() +double VISU_WidgetCtrl::GetPlaceFactor() { return myWidgets[0]->GetPlaceFactor(); } @@ -324,9 +323,9 @@ vtkImplicitFunction* VISU_WidgetCtrl::ImplicitFunction() } //================================================================== -vtkFloatingPointType +double VISU_WidgetCtrl -::EvaluateFunction(vtkFloatingPointType theX[3]) +::EvaluateFunction(double theX[3]) { if(VISU_ImplicitFunctionWidget* aWidget = GetActiveWidget()){ if(vtkImplicitFunction* aFunction = aWidget->ImplicitFunction()) @@ -338,8 +337,8 @@ VISU_WidgetCtrl //================================================================== void VISU_WidgetCtrl -::EvaluateGradient(vtkFloatingPointType theX[3], - vtkFloatingPointType theG[3]) +::EvaluateGradient(double theX[3], + double theG[3]) { theG[0] = theG[1] = theG[2] = 0.0; if(VISU_ImplicitFunctionWidget* aWidget = GetActiveWidget()){ diff --git a/src/PIPELINE/VISU_WidgetCtrl.hxx b/src/PIPELINE/VISU_WidgetCtrl.hxx index f9571155..f7d877e0 100644 --- a/src/PIPELINE/VISU_WidgetCtrl.hxx +++ b/src/PIPELINE/VISU_WidgetCtrl.hxx @@ -48,24 +48,24 @@ class VISU_PIPELINE_EXPORT VISU_WidgetCtrl : public vtkImplicitFunction { public: static VISU_WidgetCtrl *New(); - vtkTypeRevisionMacro(VISU_WidgetCtrl,vtkObject); + vtkTypeMacro(VISU_WidgetCtrl,vtkObject); vtkImplicitFunction* ImplicitFunction(); virtual - vtkFloatingPointType - EvaluateFunction(vtkFloatingPointType theX[3]); + double + EvaluateFunction(double theX[3]); virtual void - EvaluateGradient(vtkFloatingPointType theX[3], - vtkFloatingPointType theG[3]); + EvaluateGradient(double theX[3], + double theG[3]); virtual unsigned long GetMTime(); - void PlaceWidget(vtkFloatingPointType theBounds[6]); + void PlaceWidget(double theBounds[6]); void SetEnabled(int theFlag); int GetEnabled(); void On() {SetEnabled(1);} @@ -75,9 +75,9 @@ public: vtkRenderWindowInteractor* GetInteractor(); // void - SetPlaceFactor(vtkFloatingPointType theFactor); + SetPlaceFactor(double theFactor); - vtkFloatingPointType + double GetPlaceFactor(); // void SetActiveIndex(const int theFlag); @@ -111,7 +111,7 @@ protected: int myActiveIndex; int myCounter; int myDisableAll; - vtkFloatingPointType myPriority; + double myPriority; VISU_ImplicitFunctionWidget *myWidgets[2]; VISU_ImplicitFunctionWidget *myDummyWidget; VISU_PlanesWidget *myPlanesWidget; diff --git a/src/PIPELINE/VISU_XYPlotActor.cxx b/src/PIPELINE/VISU_XYPlotActor.cxx index 738780ab..41f834a1 100644 --- a/src/PIPELINE/VISU_XYPlotActor.cxx +++ b/src/PIPELINE/VISU_XYPlotActor.cxx @@ -49,7 +49,6 @@ using namespace std; -vtkCxxRevisionMacro(VISU_XYPlotActor, "$Revision$"); vtkStandardNewMacro(VISU_XYPlotActor); vtkCxxSetObjectMacro(VISU_XYPlotActor,TitleTextProperty,vtkTextProperty); diff --git a/src/PIPELINE/VISU_XYPlotActor.hxx b/src/PIPELINE/VISU_XYPlotActor.hxx index cc066b52..a69d15d7 100644 --- a/src/PIPELINE/VISU_XYPlotActor.hxx +++ b/src/PIPELINE/VISU_XYPlotActor.hxx @@ -126,7 +126,7 @@ enum VISU_XYPlotLocation { VISU_XYPLOT_BOTTOM = 0, class VISU_PIPELINE_EXPORT VISU_XYPlotActor : public vtkActor2D { public: - vtkTypeRevisionMacro(VISU_XYPlotActor,vtkActor2D); + vtkTypeMacro(VISU_XYPlotActor,vtkActor2D); void PrintSelf(ostream& os, vtkIndent indent); // Description: diff --git a/src/VISUGUI/VisuGUI_ClippingDlg.cxx b/src/VISUGUI/VisuGUI_ClippingDlg.cxx index a9786c3c..57c864c3 100644 --- a/src/VISUGUI/VisuGUI_ClippingDlg.cxx +++ b/src/VISUGUI/VisuGUI_ClippingDlg.cxx @@ -891,18 +891,18 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneParam() OrientedPlane* aPlane = myPlanes[aCurPlaneIndex].GetPointer(); - vtkFloatingPointType aNormal[3]; + double aNormal[3]; VISU::Orientation anOrientation; - vtkFloatingPointType aDir[3][3] = {{0, 0, 0}, {0, 0, 0}}; + double aDir[3][3] = {{0, 0, 0}, {0, 0, 0}}; { static double aCoeff = vtkMath::Pi()/180.0; - vtkFloatingPointType aRot[2] = {getRotation1(), getRotation2()}; + double aRot[2] = {getRotation1(), getRotation2()}; aPlane->myAngle[0] = aRot[0]; aPlane->myAngle[1] = aRot[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])}; + double anU[2] = {cos(aCoeff*aRot[0]), cos(aCoeff*aRot[1])}; + double 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]; @@ -950,42 +950,42 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneParam() myPrs3d->SetPlaneParam(aNormal, 1. - getDistance(), aPlane); //Get bounds of the visible part of the dataset - vtkFloatingPointType aBounds[6]; + double aBounds[6]; myPrs3d->GetPipeLine()->GetVisibleBounds(aBounds); //Get center - vtkFloatingPointType aPnt[3]; + double aPnt[3]; VISU::ComputeBoxCenter(aBounds,aPnt); - vtkFloatingPointType* anOrigin = aPlane->GetOrigin(); + double* anOrigin = aPlane->GetOrigin(); //Get Length of the diagonal - vtkFloatingPointType aDel = VISU::ComputeBoxDiagonal(aBounds)/2.0; + double aDel = VISU::ComputeBoxDiagonal(aBounds)/2.0; - vtkFloatingPointType aDelta[2][3] = {{aDir[0][0]*aDel, aDir[0][1]*aDel, aDir[0][2]*aDel}, + double 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]; + double aParam, aPnt0[3], aPnt1[3], aPnt2[3]; - vtkFloatingPointType aPnt01[3] = {aPnt[0] - aDelta[0][0] - aDelta[1][0], + double 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], + double aPnt02[3] = {aPnt01[0] + aNormal[0], aPnt01[1] + aNormal[1], aPnt01[2] + aNormal[2]}; vtkPlane::IntersectWithLine(aPnt01,aPnt02,aNormal,anOrigin,aParam,aPnt0); - vtkFloatingPointType aPnt11[3] = {aPnt[0] - aDelta[0][0] + aDelta[1][0], + double 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], + double aPnt12[3] = {aPnt11[0] + aNormal[0], aPnt11[1] + aNormal[1], aPnt11[2] + aNormal[2]}; vtkPlane::IntersectWithLine(aPnt11,aPnt12,aNormal,anOrigin,aParam,aPnt1); - vtkFloatingPointType aPnt21[3] = {aPnt[0] + aDelta[0][0] - aDelta[1][0], + double 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], + double aPnt22[3] = {aPnt21[0] + aNormal[0], aPnt21[1] + aNormal[1], aPnt21[2] + aNormal[2]}; vtkPlane::IntersectWithLine(aPnt21,aPnt22,aNormal,anOrigin,aParam,aPnt2); @@ -1035,14 +1035,14 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneIJKParam() VISU::Result_i::TAxis axis = (VISU::Result_i::TAxis) axId; gp_Dir dir; CORBA::String_var aMeshName = myPrs3d->GetMeshName(); - const vector * values = + const vector * values = result->GetAxisInfo(aMeshName.in(), axis, dir); if (!values) return; // find distance; int index = SpinBoxIJKIndex->value(); - vtkFloatingPointType distance = 0; + double distance = 0; if (index < values->size()) distance = (*values)[ index ]; @@ -1059,14 +1059,14 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneIJKParam() } } // find rotation angles - vtkFloatingPointType angle[2]; + double 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) { - vtkFloatingPointType cosin = cos[ rotId[ i ]]; + double cosin = cos[ rotId[ i ]]; // if (maxCos < 0) // cosin = -cosin; angle[ i ] = asin(cosin) * aCoeff; @@ -1103,7 +1103,7 @@ void VisuGUI_ClippingDlg::setIJKByNonStructured() int planeIndex = ComboBoxPlanes->currentIndex(); OrientedPlane* plane = myPlanes[ planeIndex ].GetPointer(); vtkPlaneSource* planeSource = plane->myPlaneSource; - vtkFloatingPointType * planeNormal = planeSource->GetNormal(); + double * planeNormal = planeSource->GetNormal(); gp_Dir normal(planeNormal[0], planeNormal[1], planeNormal[2]); // find a grid axis most co-directed with plane normal @@ -1111,7 +1111,7 @@ void VisuGUI_ClippingDlg::setIJKByNonStructured() int i, maxAx = 0, gridAxId = 0; gp_Dir dir, gridDir; double maxDot = 0; - const vector *curValues, *values = 0; + const vector *curValues, *values = 0; VISU::Result_i* result = myPrs3d->GetCResult(); int aNbAxes = 3; VISU_PipeLine* aPipeLine = myPrs3d->GetPipeLine(); @@ -1200,7 +1200,7 @@ void VisuGUI_ClippingDlg::onIJKAxisChanged(int axisId) VISU::Result_i::TAxis axis = (VISU::Result_i::TAxis) axisId; gp_Dir dir; CORBA::String_var aMeshName = myPrs3d->GetMeshName(); - const vector * indices = result->GetAxisInfo(aMeshName.in(), + const vector * indices = result->GetAxisInfo(aMeshName.in(), axis, dir); if (indices) maxIndex = indices->size() - 1; diff --git a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx index 4884d842..415ddc42 100644 --- a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx @@ -567,7 +567,7 @@ void VisuGUI_CutLinesDlg::setBaseDefault (bool theUpdate) createPlanes(); } } - vtkFloatingPointType aPos = myCutLines->GetBasePlanePosition(); + double aPos = myCutLines->GetBasePlanePosition(); myBasePlanePos->setText( QString::number(aPos) ); myBasePlanePos->setEnabled(false); } else { @@ -673,14 +673,14 @@ void VisuGUI_CutLinesDlg::DrawTable() void VisuGUI_CutLinesDlg::updateGlyphs(bool update){ if (myPreviewActorGlyphs == 0 ) return; - const vtkFloatingPointType *aDirLn = myCutLines->GetSpecificPL()->GetRealDirLn(); - vtkFloatingPointType aSecondPnt[3]; - vtkFloatingPointType aBoundCenter[3]; + const double *aDirLn = myCutLines->GetSpecificPL()->GetRealDirLn(); + double aSecondPnt[3]; + double aBoundCenter[3]; vtkAppendPolyData* aPolyData = myCutLines->GetSpecificPL()->GetAppendPolyData(); vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New(); aPlaneMapper->SetInput(aPolyData->GetOutput()); - vtkFloatingPointType bounds[6]; + double bounds[6]; aPlaneMapper->GetBounds(bounds); for(int i=0; i<3; i++) aBoundCenter[i] = (bounds[i*2] + bounds[i*2+1])/2.0; @@ -691,7 +691,7 @@ void VisuGUI_CutLinesDlg::updateGlyphs(bool update){ aSecondPnt[i] = - aDirLn[i]; } - vtkFloatingPointType max_bound = 0; + double 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; diff --git a/src/VISUGUI/VisuGUI_CutSegmentDlg.cxx b/src/VISUGUI/VisuGUI_CutSegmentDlg.cxx index b35d0287..5c4d9462 100644 --- a/src/VISUGUI/VisuGUI_CutSegmentDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutSegmentDlg.cxx @@ -229,7 +229,7 @@ void VisuGUI_CutSegmentDlg::initFromPrsObject ( VISU::ColoredPrs3d_i* thePrs, vtkDataSet* anInput = myCutSegment->GetPipeLine()->GetInput(); anInput->Update(); - vtkFloatingPointType bounds[6]; + double bounds[6]; anInput->GetBounds( bounds ); for( int i = 0; i < 3; i++ ) { @@ -350,14 +350,14 @@ void VisuGUI_CutSegmentDlg::deletePlanes() //------------------------------------------------------------------------------ void VisuGUI_CutSegmentDlg::updateGlyphs(bool update){ if (myPreviewActorGlyphs == 0 ) return; - const vtkFloatingPointType *aDirLn = myCutSegment->GetSpecificPL()->GetRealDirLn(); - vtkFloatingPointType aSecondPnt[3]; - vtkFloatingPointType aBoundCenter[3]; + const double *aDirLn = myCutSegment->GetSpecificPL()->GetRealDirLn(); + double aSecondPnt[3]; + double aBoundCenter[3]; vtkAppendPolyData* aPolyData = myCutSegment->GetSpecificPL()->GetAppendPolyData(); vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New(); aPlaneMapper->SetInput(aPolyData->GetOutput()); - vtkFloatingPointType bounds[6]; + double bounds[6]; aPlaneMapper->GetBounds(bounds); for(int i=0; i<3; i++) aBoundCenter[i] = (bounds[i*2] + bounds[i*2+1])/2.0; @@ -368,7 +368,7 @@ void VisuGUI_CutSegmentDlg::updateGlyphs(bool update){ aSecondPnt[i] = - aDirLn[i]; } - vtkFloatingPointType max_bound = 0; + double 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; @@ -424,7 +424,7 @@ void VisuGUI_CutSegmentDlg::updatePoints( bool update ) if( !myPreviewActorPoints ) return; - vtkFloatingPointType aPoint1[3], aPoint2[3]; + double aPoint1[3], aPoint2[3]; myCutSegment->GetSpecificPL()->GetPoint1( aPoint1[0], aPoint1[1], aPoint1[2] ); myCutSegment->GetSpecificPL()->GetPoint2( aPoint2[0], aPoint2[1], aPoint2[2] ); diff --git a/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx b/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx index 28710828..56cc2e98 100644 --- a/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx +++ b/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx @@ -582,7 +582,7 @@ void VisuGUI_GaussScalarBarPane::initFromPrsObject(VISU::GaussPoints_i* thePrs, // "Title" myTextDlg->setTitleText(QString(thePrs->GetTitle())); - vtkFloatingPointType R, G, B; + double R, G, B; thePrs->GetTitleColor(R, G, B); int lp = VISU::ToPrecision( thePrs->GetLabelsFormat() ); diff --git a/src/VISUGUI/VisuGUI_Module.cxx b/src/VISUGUI/VisuGUI_Module.cxx index 074b5a66..f514b772 100644 --- a/src/VISUGUI/VisuGUI_Module.cxx +++ b/src/VISUGUI/VisuGUI_Module.cxx @@ -1093,7 +1093,7 @@ namespace const char* theSuffix, std::ostringstream& theStr) { - vtkFloatingPointType aColor[3]; + double aColor[3]; vtkRenderer* aRenderer = theViewWindow->getRenderer(); aRenderer->GetBackground(aColor); Storable::DataToStream(theStr,(std::string("myColor") + theSuffix + ".R").c_str(),aColor[0]); @@ -1119,7 +1119,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]); - vtkFloatingPointType aParallelScale = aCamera->GetParallelScale(); + double aParallelScale = aCamera->GetParallelScale(); Storable::DataToStream(theStr,(std::string("myParallelScale") + theSuffix).c_str(),aParallelScale); double aScaleFactor[3]; @@ -1134,7 +1134,7 @@ namespace const char* theSuffix, const Storable::TRestoringMap& theMap) { - vtkFloatingPointType aColor[3]; + double 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(); @@ -1160,7 +1160,7 @@ namespace aViewUp[2] = Storable::FindValue(theMap,std::string("myViewUp") + theSuffix + "[2]").toDouble(); aCamera->SetViewUp(aViewUp); - vtkFloatingPointType aParallelScale = Storable::FindValue(theMap,std::string("myParallelScale") + theSuffix).toDouble(); + double aParallelScale = Storable::FindValue(theMap,std::string("myParallelScale") + theSuffix).toDouble(); aCamera->SetParallelScale(aParallelScale); double aScaleFactor[3]; @@ -1181,31 +1181,31 @@ namespace std::string aSegmentationMode; if(aWidgetCtrl->IsPlanesActive()){ VISU_PlanesWidget *aPlanesWidget = aWidgetCtrl->GetPlanesWidget(); - vtkFloatingPointType anOrigin[3]; + double 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]); - vtkFloatingPointType aNormal[3]; + double 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]); - vtkFloatingPointType aDepth = aPlanesWidget->Distance(); + double aDepth = aPlanesWidget->Distance(); Storable::DataToStream(theStr,"myCursorDepth",aDepth); aSegmentationMode = "Planes"; }else if(aWidgetCtrl->IsSphereActive()){ VISU_SphereWidget *aSphereWidget = aWidgetCtrl->GetSphereWidget(); - vtkFloatingPointType aCenter[3]; + double 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]); - vtkFloatingPointType aRadius = aSphereWidget->GetRadius(); + double aRadius = aSphereWidget->GetRadius(); Storable::DataToStream(theStr,"mySphereCursorRaduis",aRadius); aSegmentationMode = "Sphere"; @@ -1540,31 +1540,31 @@ namespace if(aSegmentationMode == "Planes"){ VISU_PlanesWidget *aPlanesWidget = aWidgetCtrl->GetPlanesWidget(); - vtkFloatingPointType anOrigin[3]; + double 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); - vtkFloatingPointType aNormal[3]; + double 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); - vtkFloatingPointType aDepth = Storable::FindValue(aMap,"myCursorDepth").toDouble(); + double aDepth = Storable::FindValue(aMap,"myCursorDepth").toDouble(); aPlanesWidget->SetDistance(aDepth); aMainWindow->SetPlanesSegementation(true); }else if(aSegmentationMode == "Sphere"){ VISU_SphereWidget *aSphereWidget = aWidgetCtrl->GetSphereWidget(); - vtkFloatingPointType aCenter[3]; + double 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); - vtkFloatingPointType aRadius = Storable::FindValue(aMap,"mySphereCursorRaduis").toDouble(); + double aRadius = Storable::FindValue(aMap,"mySphereCursorRaduis").toDouble(); aSphereWidget->SetRadius(aRadius); aMainWindow->SetSphereSegementation(true); @@ -1725,7 +1725,7 @@ void VisuGUI_Module::storeVisualParameters(int savePoint) ip->setParameter( entry, param, QString::number( vActor->GetQuadratic2DRepresentation() ).toLatin1().data() ); param = vtkParam + "Opacity"; ip->setParameter( entry, param, QString::number( vActor->GetOpacity() ).toLatin1().data() ); - vtkFloatingPointType r, g, b; + double r, g, b; vActor->GetColor(r, g, b); QString colorStr = QString::number( r ); colorStr += gDigitsSep; colorStr += QString::number( g ); colorStr += gDigitsSep; @@ -1752,7 +1752,7 @@ void VisuGUI_Module::storeVisualParameters(int savePoint) ip->setParameter( entry, param, "Off" ); for ( int p = 0; p < nPlanes; p++ ) { vtkPlane* plane = vPrs->GetClippingPlane( p ); - vtkFloatingPointType normal[3], origin[3]; + double normal[3], origin[3]; plane->GetNormal( normal ); plane->GetOrigin( origin ); std::string planeValue = QString::number( normal[0] ).toLatin1().data(); planeValue += gDigitsSep; @@ -1787,7 +1787,7 @@ void VisuGUI_Module::storeVisualParameters(int savePoint) ip->setParameter( entry, param, QString::number( vActor->GetRepresentation() ).toLatin1().data() ); param = vtkParam + "Opacity"; ip->setParameter( entry, param, QString::number( vActor->GetOpacity() ).toLatin1().data() ); - vtkFloatingPointType r, g, b; + double r, g, b; vActor->GetColor(r, g, b); QString colorStr = QString::number( r ); colorStr += gDigitsSep; colorStr += QString::number( g ); colorStr += gDigitsSep; @@ -2014,7 +2014,7 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint) if ( val != "Off" ) { QStringList vals = val.split( gDigitsSep, QString::SkipEmptyParts ); if ( vals.count() == 6 ) { // format check: 6 float values - vtkFloatingPointType normal[3], origin[3]; + double normal[3], origin[3]; for (int x = 0; x < 3; x++ ) { normal[x] = vals[x].toFloat(); origin[x] = vals[x+3].toFloat(); diff --git a/src/VISUGUI/VisuGUI_OffsetDlg.cxx b/src/VISUGUI/VisuGUI_OffsetDlg.cxx index b0e0b0cd..dc99b386 100644 --- a/src/VISUGUI/VisuGUI_OffsetDlg.cxx +++ b/src/VISUGUI/VisuGUI_OffsetDlg.cxx @@ -214,14 +214,14 @@ void VisuGUI_OffsetDlg::addPointMapPresentation (VISU::PointMap3d_i* thePrs) } } -void VisuGUI_OffsetDlg::setOffset (const vtkFloatingPointType* theOffset) +void VisuGUI_OffsetDlg::setOffset (const double* theOffset) { myDxEdt->setValue(theOffset[0]); myDyEdt->setValue(theOffset[1]); myDzEdt->setValue(theOffset[2]); } -void VisuGUI_OffsetDlg::getOffset (vtkFloatingPointType* theOffset) const +void VisuGUI_OffsetDlg::getOffset (double* theOffset) const { theOffset[0] = myDxEdt->value(); theOffset[1] = myDyEdt->value(); @@ -243,7 +243,7 @@ bool VisuGUI_OffsetDlg::isToSave() const return false; } -void VisuGUI_OffsetDlg::updateOffset (VISU::Prs3d_i* thePrs, vtkFloatingPointType* theOffset) +void VisuGUI_OffsetDlg::updateOffset (VISU::Prs3d_i* thePrs, double* theOffset) { if (myPrsList.count() == 0) return; @@ -275,7 +275,7 @@ void VisuGUI_OffsetDlg::updateOffset (VISU::Prs3d_i* thePrs, vtkFloatingPointTyp } } -void VisuGUI_OffsetDlg::updatePointMapOffset (VISU::PointMap3d_i* thePrs, vtkFloatingPointType* theOffset) +void VisuGUI_OffsetDlg::updatePointMapOffset (VISU::PointMap3d_i* thePrs, double* theOffset) { if (myPointMapList.count() == 0) return; @@ -308,7 +308,7 @@ void VisuGUI_OffsetDlg::updatePointMapOffset (VISU::PointMap3d_i* thePrs, vtkFlo void VisuGUI_OffsetDlg::accept() { - vtkFloatingPointType anOffset[3]; + double anOffset[3]; getOffset(anOffset); for (int i = 0; i < myPrsList.count(); i++) { updateOffset(myPrsList.at(i), anOffset); @@ -332,7 +332,7 @@ void VisuGUI_OffsetDlg::reject() void VisuGUI_OffsetDlg::onApply() { - vtkFloatingPointType anOffset[3]; + double anOffset[3]; getOffset(anOffset); for (int i = 0; i < myPrsList.count(); i++) { diff --git a/src/VISUGUI/VisuGUI_OffsetDlg.h b/src/VISUGUI/VisuGUI_OffsetDlg.h index bb187d59..c813c58e 100644 --- a/src/VISUGUI/VisuGUI_OffsetDlg.h +++ b/src/VISUGUI/VisuGUI_OffsetDlg.h @@ -38,16 +38,16 @@ class LightApp_SelectionMgr; struct OffsetStruct { - vtkFloatingPointType myOffset[3]; + double myOffset[3]; OffsetStruct() { myOffset[0] = myOffset[1] = myOffset[2] = 0; } - OffsetStruct(vtkFloatingPointType theX, - vtkFloatingPointType theY, - vtkFloatingPointType theZ) + OffsetStruct(double theX, + double theY, + double theZ) { myOffset[0] = theX; myOffset[1] = theY; @@ -69,8 +69,8 @@ class VisuGUI_OffsetDlg: public QDialog int getPrsCount() const { return myPrsList.count() + myPointMapList.count(); } void clearPresentations(); - void setOffset (const vtkFloatingPointType* theOffset); - void getOffset (vtkFloatingPointType* theOffset) const; + void setOffset (const double* theOffset); + void getOffset (double* theOffset) const; bool isToSave() const; private: @@ -87,8 +87,8 @@ class VisuGUI_OffsetDlg: public QDialog void onSelectionChanged(); private: - void updateOffset (VISU::Prs3d_i* thePrs, vtkFloatingPointType* theOffset); - void updatePointMapOffset (VISU::PointMap3d_i* thePrs, vtkFloatingPointType* theOffset); + void updateOffset (VISU::Prs3d_i* thePrs, double* theOffset); + void updatePointMapOffset (VISU::PointMap3d_i* thePrs, double* theOffset); VisuGUI * myModule; LightApp_SelectionMgr* mySelectionMgr; diff --git a/src/VISUGUI/VisuGUI_Plot3DDlg.cxx b/src/VISUGUI/VisuGUI_Plot3DDlg.cxx index fccdabf5..12eebfb4 100644 --- a/src/VISUGUI/VisuGUI_Plot3DDlg.cxx +++ b/src/VISUGUI/VisuGUI_Plot3DDlg.cxx @@ -90,20 +90,20 @@ static void renderViewFrame (SVTK_ViewWindow* vw) //======================================================================= class TPlane : public SALOME_Actor { - vtkFloatingPointType mySize; + double mySize; vtkDataSetMapper* myMapper; vtkPlaneSource* myPlaneSource; public: // constructor - TPlane(vtkFloatingPointType planeSize): mySize(planeSize) + TPlane(double planeSize): mySize(planeSize) { Init(); } // set plane parameters - void Set(vtkFloatingPointType origin[3], vtkFloatingPointType normal[3]) + void Set(double origin[3], double normal[3]) { - vtkFloatingPointType point2[3], point1[3]; + double point2[3], point1[3]; vtkMath::Perpendiculars(normal, point1, point2, 0.); for (int i = 0; i < 3; ++i) { point1[ i ] = point1[ i ] * mySize + origin[ i ]; @@ -322,7 +322,7 @@ void VisuGUI_Plot3DPane::restorePrsParams() void VisuGUI_Plot3DPane::onPositionSpn() { if (myPrs && !RelativeChkB->isChecked()) { - vtkFloatingPointType minPos, maxPos; + double minPos, maxPos; storePrsParams(); myPrs->GetSpecificPL()->GetMinMaxPosition(minPos, maxPos); restorePrsParams(); @@ -360,7 +360,7 @@ void VisuGUI_Plot3DPane::orientationChanged(int Id) //======================================================================= void VisuGUI_Plot3DPane::onRelativePos(bool isRelativePos) { - vtkFloatingPointType minPos = 0., maxPos = 1., pos = PositionSpn->value(); + double minPos = 0., maxPos = 1., pos = PositionSpn->value(); if (myPrs) { storePrsParams(); myPrs->GetSpecificPL()->GetMinMaxPosition(minPos, maxPos); @@ -418,7 +418,7 @@ void VisuGUI_Plot3DPane::updatePreview() } // set plane parameters corresponding to control values storePrsParams(); - vtkFloatingPointType normal[3], origin[3]; + double normal[3], origin[3]; myPrs->GetSpecificPL()->GetBasePlane(origin, normal, true); planePreview->Set(origin, normal); restorePrsParams(); diff --git a/src/VISUGUI/VisuGUI_Prs3dDlg.cxx b/src/VISUGUI/VisuGUI_Prs3dDlg.cxx index 093ad398..c78427eb 100644 --- a/src/VISUGUI/VisuGUI_Prs3dDlg.cxx +++ b/src/VISUGUI/VisuGUI_Prs3dDlg.cxx @@ -1062,7 +1062,7 @@ void VisuGUI_ScalarBarPane::initFromPrsObject(VISU::ColoredPrs3d_i* thePrs) myBarDlg->setLabelsPrecision( VISU::ToPrecision( myScalarMap->GetLabelsFormat() ) ); myBarDlg->setUnitsVisible(myScalarMap->IsUnitsVisible()); - vtkFloatingPointType R, G, B; + double R, G, B; myScalarMap->GetTitleColor(R, G, B); QColor aTextColor = QColor((int)(R*255.), (int)(G*255.), (int)(B*255.)); @@ -1152,9 +1152,9 @@ void VisuGUI_ScalarBarPane::createScalarBar() if ( RBFrange->isChecked() ) { myScalarMapPL->SetSourceRange(); } else { - vtkFloatingPointType aRange[2]; - aRange[0] = (vtkFloatingPointType)MinEdit->text().toDouble(); - aRange[1] = (vtkFloatingPointType)MaxEdit->text().toDouble(); + double aRange[2]; + aRange[0] = (double)MinEdit->text().toDouble(); + aRange[1] = (double)MaxEdit->text().toDouble(); myScalarMapPL->SetScalarRange( aRange ); } @@ -1210,9 +1210,9 @@ void VisuGUI_ScalarBarPane::createScalarBar() isTitleBold,isTitleItalic,isTitleShadow); vtkTextProperty* aTitleProp = aScalarBarActor->GetTitleTextProperty(); aTitleProp->SetFontFamily(aTitleFontFamily); - aTitleProp->SetColor(vtkFloatingPointType(aTitleColor.red())/255., - vtkFloatingPointType(aTitleColor.green())/255., - vtkFloatingPointType(aTitleColor.blue())/255.); + aTitleProp->SetColor(double(aTitleColor.red())/255., + double(aTitleColor.green())/255., + double(aTitleColor.blue())/255.); (isTitleBold)? aTitleProp->BoldOn() : aTitleProp->BoldOff(); (isTitleItalic)? aTitleProp->ItalicOn() : aTitleProp->ItalicOff(); (isTitleShadow)? aTitleProp->ShadowOn() : aTitleProp->ShadowOff(); @@ -1227,9 +1227,9 @@ void VisuGUI_ScalarBarPane::createScalarBar() isLabelBold, isLabelItalic, isLabelShadow); vtkTextProperty* aLabelProp = aScalarBarActor->GetLabelTextProperty(); aLabelProp->SetFontFamily(aLabelFontFamily); - aLabelProp->SetColor(vtkFloatingPointType(aLabelColor.red())/255., - vtkFloatingPointType(aLabelColor.green())/255., - vtkFloatingPointType(aLabelColor.blue())/255.); + aLabelProp->SetColor(double(aLabelColor.red())/255., + double(aLabelColor.green())/255., + double(aLabelColor.blue())/255.); (isLabelBold)? aLabelProp->BoldOn() : aLabelProp->BoldOff(); (isLabelItalic)? aLabelProp->ItalicOn() : aLabelProp->ItalicOff(); (isLabelShadow)? aLabelProp->ShadowOn() : aLabelProp->ShadowOff(); diff --git a/src/VISUGUI/VisuGUI_SelectionPanel.cxx b/src/VISUGUI/VisuGUI_SelectionPanel.cxx index e9590442..d7f0fe8a 100644 --- a/src/VISUGUI/VisuGUI_SelectionPanel.cxx +++ b/src/VISUGUI/VisuGUI_SelectionPanel.cxx @@ -454,7 +454,7 @@ void VisuGUI_SelectionPanel::closeEvent( QCloseEvent* theEvent ) template QString getScalar(TData* theData, int theId){ if (vtkDataArray *aScalar = theData->GetScalars()){ - vtkFloatingPointType aVal = aScalar->GetTuple1(theId); + double aVal = aScalar->GetTuple1(theId); return QString::number(aVal); } else { return QString("No data"); @@ -463,7 +463,7 @@ template QString getScalar(TData* theData, int theId){ template QString getVector(TData* theData, int theId){ if (vtkDataArray *aVector = theData->GetVectors()) { - vtkFloatingPointType *aVal = aVector->GetTuple3(theId); + double *aVal = aVector->GetTuple3(theId); return QString("%1; %2; %3").arg(aVal[0]).arg(aVal[1]).arg(aVal[2]); } else { return QString("No data"); @@ -487,7 +487,7 @@ TPointData getPointData( TPointID thePointVTKID, VISU_Actor* theActor, const VIS vtkDataSet* aDataSet = theActor->GetMapper()->GetInput(); - vtkFloatingPointType* aCoord = aDataSet->GetPoint( thePointVTKID ); + double* aCoord = aDataSet->GetPoint( thePointVTKID ); aPointData.X = aCoord[0]; aPointData.Y = aCoord[1]; aPointData.Z = aCoord[2]; @@ -566,7 +566,7 @@ void VisuGUI_SelectionPanel::onSelectionEvent() { VISU::FindActor(VISU::GetAppStudy(myModule), aViewWindow, aSObject->GetID().c_str()); myFindPane->setActor( anVISUActor ); if (anVISUActor) { - vtkFloatingPointType aCoord[6]; + double aCoord[6]; anVISUActor->GetBounds(aCoord); myXPosLbl->setText(QString::number( aCoord[0] )); myYPosLbl->setText(QString::number( aCoord[2] )); diff --git a/src/VISUGUI/VisuGUI_SelectionPanel.h b/src/VISUGUI/VisuGUI_SelectionPanel.h index 2aa5cb69..007d38b0 100644 --- a/src/VISUGUI/VisuGUI_SelectionPanel.h +++ b/src/VISUGUI/VisuGUI_SelectionPanel.h @@ -54,9 +54,9 @@ struct TValueData struct TPointData { - vtkFloatingPointType X; - vtkFloatingPointType Y; - vtkFloatingPointType Z; + double X; + double Y; + double Z; vtkIdType I; vtkIdType J; vtkIdType K; diff --git a/src/VISUGUI/VisuGUI_SelectionPrefDlg.cxx b/src/VISUGUI/VisuGUI_SelectionPrefDlg.cxx index d5ecab46..9f485548 100644 --- a/src/VISUGUI/VisuGUI_SelectionPrefDlg.cxx +++ b/src/VISUGUI/VisuGUI_SelectionPrefDlg.cxx @@ -224,14 +224,14 @@ void VisuGUI_SelectionPrefDlg::update() myPyramidHeightSpinBox->setValue( aPickingSettings->GetPyramidHeight() ); myPointToleranceSpinBox->setValue( aPickingSettings->GetPointTolerance() ); - vtkFloatingPointType* aColor = aPickingSettings->GetColor(); + double* aColor = aPickingSettings->GetColor(); mySelectionColorButton->setColor( QColor( ( int )( aColor[0] * 255.0 ), ( int )( aColor[1] * 255.0 ), ( int )( aColor[2] * 255.0 ) ) ); myInfoWindowGroup->setChecked( aPickingSettings->GetInfoWindowEnabled() ); // VSR 28.06.2011 : IPAL 22513: add 0.5 to eliminate any prevision problems - vtkFloatingPointType transparency = aPickingSettings->GetInfoWindowTransparency() * 100.0 + 0.5; + double transparency = aPickingSettings->GetInfoWindowTransparency() * 100.0 + 0.5; myTransparencySpinBox->setValue( (int) transparency ); myPositionComboBox->setCurrentIndex( aPickingSettings->GetInfoWindowPosition() ); myCameraGroup->setChecked( aPickingSettings->GetCameraMovementEnabled() ); @@ -255,7 +255,7 @@ void VisuGUI_SelectionPrefDlg::onApply() aPickingSettings->SetPointTolerance( myPointToleranceSpinBox->value() ); QColor aButtonColor = mySelectionColorButton->color(); - vtkFloatingPointType aColor[3]; + double aColor[3]; aColor[0] = aButtonColor.red() / 255.0; aColor[1] = aButtonColor.green() / 255.0; aColor[2] = aButtonColor.blue() / 255.0; diff --git a/src/VISUGUI/VisuGUI_Table3dDlg.cxx b/src/VISUGUI/VisuGUI_Table3dDlg.cxx index 5fd4e4ff..6ce0f803 100644 --- a/src/VISUGUI/VisuGUI_Table3dDlg.cxx +++ b/src/VISUGUI/VisuGUI_Table3dDlg.cxx @@ -422,7 +422,7 @@ void VisuGUI_TableScalarBarPane::initFromPrsObject( VISU::PointMap3d_i* thePrs ) myTextDlg->setTitleText( aTitle.in() ); myTitle = aTitle.in(); - vtkFloatingPointType R, G, B; + double R, G, B; myBarPrs->GetTitleColor( R, G, B ); setPosAndSize( myBarPrs->GetPosX(), diff --git a/src/VISUGUI/VisuGUI_TimeAnimation.cxx b/src/VISUGUI/VisuGUI_TimeAnimation.cxx index e7d8f2b8..76766155 100644 --- a/src/VISUGUI/VisuGUI_TimeAnimation.cxx +++ b/src/VISUGUI/VisuGUI_TimeAnimation.cxx @@ -437,9 +437,9 @@ void ArrangeDlg::acceptAnimation() FieldData& aData = myAnimator->getFieldData(myFieldLst->currentRow()); if (aData.myPrs.empty()) GeneratePresentations(myFieldLst->currentRow(),myAnimator); - vtkFloatingPointType aBounds[6]; + double aBounds[6]; aData.myPrs[0]->GetBounds(aBounds); - vtkFloatingPointType aDist = 0; + double aDist = 0; int aAxis = getAxis(); switch (aAxis) { case XAxis: @@ -452,10 +452,10 @@ void ArrangeDlg::acceptAnimation() aDist = fabs(aBounds[5] - aBounds[4]); } - 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; + double dx = fabs(aBounds[1] - aBounds[0]); + double dy = fabs(aBounds[3] - aBounds[2]); + double dz = fabs(aBounds[5] - aBounds[4]); + double max = (dx > dy) ? dx : dy; max = (dz > max) ? dz : max; max /= 100.0; @@ -511,10 +511,10 @@ void ArrangeDlg::acceptViewWindow() aPrs->SetOffset(aOffs.myOffset[0],aOffs.myOffset[1],aOffs.myOffset[2]); } } else { - vtkFloatingPointType aDist = 0; - vtkFloatingPointType aShift = 0; - vtkFloatingPointType aPrevDist = 0; - vtkFloatingPointType aPrevShift = 0; + double aDist = 0; + double aShift = 0; + double aPrevDist = 0; + double aPrevShift = 0; int i = 0; QMap::Iterator it; for (it = myPrsMap.begin(); it != myPrsMap.end(); ++it, i++) { @@ -522,12 +522,12 @@ void ArrangeDlg::acceptViewWindow() if (VISU_Actor* aActor = VISU::FindActor(myViewWindow, aPrs)) { int aAxis = getAxis(); - vtkFloatingPointType aZeroOffset[3]; + double aZeroOffset[3]; aZeroOffset[0] = aZeroOffset[1] = aZeroOffset[2] = 0; aActor->SetPosition(aZeroOffset); aActor->GetMapper()->Update(); - vtkFloatingPointType aBounds[6]; + double aBounds[6]; aActor->GetBounds(aBounds); switch (aAxis) { case XAxis: @@ -539,18 +539,18 @@ void ArrangeDlg::acceptViewWindow() case ZAxis: aDist = fabs(aBounds[5] - aBounds[4]); } - vtkFloatingPointType aOffset[3]; + double 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) { - vtkFloatingPointType aCCDist = (aDist + aPrevDist) / 2.0; + double aCCDist = (aDist + aPrevDist) / 2.0; - 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; + double dx = fabs(aBounds[1] - aBounds[0]); + double dy = fabs(aBounds[3] - aBounds[2]); + double dz = fabs(aBounds[5] - aBounds[4]); + double max = (dx > dy) ? dx : dy; max = (dz > max) ? dz : max; max /= 100.0; @@ -598,12 +598,12 @@ void ArrangeDlg::acceptViewWindow() if (VISU_ActorBase* aActor = VISU::FindActorBase(myViewWindow, aPrs)) { int aAxis = getAxis(); - vtkFloatingPointType aZeroOffset[3]; + double aZeroOffset[3]; aZeroOffset[0] = aZeroOffset[1] = aZeroOffset[2] = 0; aActor->SetPosition(aZeroOffset); aActor->GetMapper()->Update(); - vtkFloatingPointType aBounds[6]; + double aBounds[6]; aActor->GetBounds(aBounds); switch (aAxis) { case XAxis: @@ -615,18 +615,18 @@ void ArrangeDlg::acceptViewWindow() case ZAxis: aDist = fabs(aBounds[5] - aBounds[4]); } - vtkFloatingPointType aOffset[3]; + double 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) { - vtkFloatingPointType aCCDist = (aDist + aPrevDist) / 2.0; + double aCCDist = (aDist + aPrevDist) / 2.0; - 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; + double dx = fabs(aBounds[1] - aBounds[0]); + double dy = fabs(aBounds[3] - aBounds[2]); + double dz = fabs(aBounds[5] - aBounds[4]); + double max = (dx > dy) ? dx : dy; max = (dz > max) ? dz : max; max /= 100.0; diff --git a/src/VISUGUI/VisuGUI_TimeAnimation.h b/src/VISUGUI/VisuGUI_TimeAnimation.h index ba1f6d5f..0128c3db 100644 --- a/src/VISUGUI/VisuGUI_TimeAnimation.h +++ b/src/VISUGUI/VisuGUI_TimeAnimation.h @@ -95,7 +95,7 @@ class ArrangeDlg: public QDialog private: struct Offset { - vtkFloatingPointType myOffset[3]; + double myOffset[3]; }; diff --git a/src/VISUGUI/VisuGUI_Tools.cxx b/src/VISUGUI/VisuGUI_Tools.cxx index f0f7fbd4..f8b78af8 100644 --- a/src/VISUGUI/VisuGUI_Tools.cxx +++ b/src/VISUGUI/VisuGUI_Tools.cxx @@ -888,14 +888,14 @@ namespace VISU //------------------------------------------------------------ bool ComputeVisiblePropBounds(SVTK_ViewWindow* theViewWindow, - vtkFloatingPointType allBounds[6], + double allBounds[6], const char* theActorClassName) { vtkRenderer *aRen = theViewWindow->getRenderer(); VTK::ActorCollectionCopy aCopy(aRen->GetActors()); vtkActorCollection *anActColl = aCopy.GetActors(); vtkProp *prop; - vtkFloatingPointType *bounds; + double *bounds; int somethingVisible = false; allBounds[0] = allBounds[2] = allBounds[4] = VTK_LARGE_FLOAT; @@ -927,14 +927,14 @@ namespace VISU //------------------------------------------------------------ void SetFitAll(SVTK_ViewWindow* theViewWindow) { - static vtkFloatingPointType PRECISION = 0.000001; - static vtkFloatingPointType DEVIATION = 600; - vtkFloatingPointType XYZ_Bnd[6]; + static double PRECISION = 0.000001; + static double DEVIATION = 600; + double XYZ_Bnd[6]; if (!ComputeVisiblePropBounds(theViewWindow, XYZ_Bnd)) return; - vtkFloatingPointType absX = XYZ_Bnd[1] - XYZ_Bnd[0]; - vtkFloatingPointType absY = XYZ_Bnd[3] - XYZ_Bnd[2]; - vtkFloatingPointType absZ = XYZ_Bnd[5] - XYZ_Bnd[4]; + double absX = XYZ_Bnd[1] - XYZ_Bnd[0]; + double absY = XYZ_Bnd[3] - XYZ_Bnd[2]; + double absZ = XYZ_Bnd[5] - XYZ_Bnd[4]; enum CameraOrient {e3D, eFront, eLeft, eTop}; CameraOrient aCameraOrient = e3D; @@ -945,9 +945,9 @@ namespace VISU if (absZ <= PRECISION) aCameraOrient = eTop; else { // all the three dimensions exceeds precision - vtkFloatingPointType dev_abs_XY = absX / absY; - vtkFloatingPointType dev_abs_YZ = absY / absZ; - vtkFloatingPointType dev_abs_XZ = absX / absZ; + double dev_abs_XY = absX / absY; + double dev_abs_YZ = absY / absZ; + double dev_abs_XZ = absX / absZ; if (dev_abs_XY >= DEVIATION || 1./dev_abs_YZ >= DEVIATION) aCameraOrient = eLeft; else { diff --git a/src/VISUGUI/VisuGUI_Tools.h b/src/VISUGUI/VisuGUI_Tools.h index 6ec752bd..bdb44849 100644 --- a/src/VISUGUI/VisuGUI_Tools.h +++ b/src/VISUGUI/VisuGUI_Tools.h @@ -191,7 +191,7 @@ namespace VISU VISU::Prs3d_i* thePrs); bool ComputeVisiblePropBounds(SVTK_ViewWindow* theViewWindow, - vtkFloatingPointType allBounds[6], + double allBounds[6], const char* theActorClassName = "VISU_Actor"); /*! diff --git a/src/VISUGUI/VisuGUI_ValuesLabelingDlg.cxx b/src/VISUGUI/VisuGUI_ValuesLabelingDlg.cxx index fc0c0495..26e88af2 100755 --- a/src/VISUGUI/VisuGUI_ValuesLabelingDlg.cxx +++ b/src/VISUGUI/VisuGUI_ValuesLabelingDlg.cxx @@ -139,7 +139,7 @@ void VisuGUI_ValuesLabelingDlg::initFromPrsObject( VISU::ColoredPrs3d_i* thePrs, bool isItalic = thePrs->IsItalicValLbl(); bool isShadow = thePrs->IsShadowValLbl(); - vtkFloatingPointType aGRB[ 3 ]; + double aGRB[ 3 ]; thePrs->GetValLblFontColor( aGRB[ 0 ], aGRB[ 1 ], aGRB[ 2 ] ); // font diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.cc b/src/VISU_I/VISU_ColoredPrs3d_i.cc index 56f51672..75e8e6f1 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3d_i.cc @@ -102,7 +102,7 @@ namespace VISU //--------------------------------------------------------------- - vtkFloatingPointType + double TMinMaxController ::GetComponentMin(vtkIdType theCompID) { @@ -111,7 +111,7 @@ namespace VISU //--------------------------------------------------------------- - vtkFloatingPointType + double TMinMaxController ::GetComponentMax(vtkIdType theCompID) { @@ -134,7 +134,7 @@ namespace VISU {} virtual - vtkFloatingPointType + double GetComponentMin(vtkIdType theCompID) { if ( VISU::PField aField = myColoredPrs3d->GetScalarField() ) { @@ -145,7 +145,7 @@ namespace VISU } virtual - vtkFloatingPointType + double GetComponentMax(vtkIdType theCompID) { if ( VISU::PField aField = myColoredPrs3d->GetScalarField() ) { @@ -729,7 +729,7 @@ VISU::ColoredPrs3d_i SetItalicTitle(anOrigin->IsItalicTitle()); SetShadowTitle(anOrigin->IsShadowTitle()); SetTitFontType(anOrigin->GetTitFontType()); - vtkFloatingPointType r,g,b; + double r,g,b; anOrigin->GetTitleColor(r,g,b); SetTitleColor(r,g,b); @@ -820,8 +820,8 @@ VISU::ColoredPrs3d_i { VISU::TSetModified aModified(this); - vtkFloatingPointType aScalarRange[2] = {theMin, theMax}; - ProcessVoidEvent(new TVoidMemFun1ArgEvent + double aScalarRange[2] = {theMin, theMax}; + ProcessVoidEvent(new TVoidMemFun1ArgEvent (GetSpecificPL(), &VISU_ColoredPL::SetScalarRange, aScalarRange)); UseFixedRange(true); } @@ -834,8 +834,8 @@ VISU::ColoredPrs3d_i { VISU::TSetModified aModified(this); - vtkFloatingPointType aScalarRange[ 2 ] = { theMin, theMax }; - ProcessVoidEvent(new TVoidMemFun1ArgEvent + double aScalarRange[ 2 ] = { theMin, theMax }; + ProcessVoidEvent(new TVoidMemFun1ArgEvent (GetSpecificPL(), &VISU_ColoredPL::SetScalarFilterRange, aScalarRange) ); } @@ -845,7 +845,7 @@ CORBA::Double VISU::ColoredPrs3d_i ::GetScalarFilterMin() { - vtkFloatingPointType aScalarRange[ 2 ]; + double aScalarRange[ 2 ]; GetSpecificPL()->GetScalarFilterRange( aScalarRange ); return aScalarRange[ 0 ]; @@ -857,7 +857,7 @@ CORBA::Double VISU::ColoredPrs3d_i ::GetScalarFilterMax() { - vtkFloatingPointType aScalarRange[ 2 ]; + double aScalarRange[ 2 ]; GetSpecificPL()->GetScalarFilterRange( aScalarRange ); return aScalarRange[ 1 ]; @@ -892,8 +892,8 @@ VISU::ColoredPrs3d_i ProcessVoidEvent(new TVoidMemFunEvent (GetSpecificPL(), &VISU_ColoredPL::SetSourceRange)); }else{ - vtkFloatingPointType aScalarRange[ 2 ] = {GetSourceMin(), GetSourceMax()}; - ProcessVoidEvent(new TVoidMemFun1ArgEvent + double aScalarRange[ 2 ] = {GetSourceMin(), GetSourceMax()}; + ProcessVoidEvent(new TVoidMemFun1ArgEvent (GetSpecificPL(), &VISU_ColoredPL::SetScalarRange, aScalarRange)); } UseFixedRange(false); @@ -905,7 +905,7 @@ VISU::ColoredPrs3d_i ::GetSourceMin() { if(IsTimeStampFixed()){ - vtkFloatingPointType aRange[2]; + double aRange[2]; GetSpecificPL()->GetSourceRange(aRange); return aRange[0]; } @@ -918,7 +918,7 @@ VISU::ColoredPrs3d_i ::GetSourceMax() { if(IsTimeStampFixed()){ - vtkFloatingPointType aRange[2]; + double aRange[2]; GetSpecificPL()->GetSourceRange(aRange); return aRange[1]; } @@ -1295,9 +1295,9 @@ VISU::ColoredPrs3d_i //---------------------------------------------------------------------------- void VISU::ColoredPrs3d_i -::GetTitleColor(vtkFloatingPointType& theR, - vtkFloatingPointType& theG, - vtkFloatingPointType& theB) +::GetTitleColor(double& theR, + double& theG, + double& theB) { theR = myTitleColor[0]; theG = myTitleColor[1]; @@ -1307,9 +1307,9 @@ VISU::ColoredPrs3d_i //---------------------------------------------------------------------------- void VISU::ColoredPrs3d_i -::SetTitleColor(vtkFloatingPointType theR, - vtkFloatingPointType theG, - vtkFloatingPointType theB) +::SetTitleColor(double theR, + double theG, + double theB) { bool anIsSameValue = VISU::CheckIsSameValue(myTitleColor[0], theR); anIsSameValue &= VISU::CheckIsSameValue(myTitleColor[1], theG); @@ -1416,9 +1416,9 @@ VISU::ColoredPrs3d_i //---------------------------------------------------------------------------- void VISU::ColoredPrs3d_i -::GetLabelColor(vtkFloatingPointType& theR, - vtkFloatingPointType& theG, - vtkFloatingPointType& theB) +::GetLabelColor(double& theR, + double& theG, + double& theB) { theR = myLabelColor[0]; theG = myLabelColor[1]; @@ -1428,9 +1428,9 @@ VISU::ColoredPrs3d_i //---------------------------------------------------------------------------- void VISU::ColoredPrs3d_i -::SetLabelColor(vtkFloatingPointType theR, - vtkFloatingPointType theG, - vtkFloatingPointType theB) +::SetLabelColor(double theR, + double theG, + double theB) { bool anIsSameValue = VISU::CheckIsSameValue(myLabelColor[0], theR); anIsSameValue &= VISU::CheckIsSameValue(myLabelColor[1], theG); @@ -1532,11 +1532,11 @@ VISU::ColoredPrs3d_i // Scalar Bar origin QString propertyName = QString( "scalar_bar_%1_" ).arg( anOrientation == 0 ? "vertical" : "horizontal" ); - vtkFloatingPointType aXorigin = (myOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.01 : 0.1; + double aXorigin = (myOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.01 : 0.1; aXorigin = aResourceMgr->doubleValue("VISU", propertyName + "x", aXorigin); myPosition[0] = aXorigin; - vtkFloatingPointType aYorigin = (myOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.1 : 0.01; + double aYorigin = (myOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.1 : 0.01; aYorigin = aResourceMgr->doubleValue("VISU", propertyName + "y", aYorigin); myPosition[1] = aYorigin; @@ -2054,9 +2054,9 @@ VISU::ColoredPrs3d_i void VISU::ColoredPrs3d_i -::GetValLblFontColor( vtkFloatingPointType& theR, - vtkFloatingPointType& theG, - vtkFloatingPointType& theB ) const +::GetValLblFontColor( double& theR, + double& theG, + double& theB ) const { theR = myValLblFontColor[ 0 ]; theG = myValLblFontColor[ 1 ]; @@ -2067,9 +2067,9 @@ VISU::ColoredPrs3d_i void VISU::ColoredPrs3d_i -::SetValLblFontColor( const vtkFloatingPointType theR, - const vtkFloatingPointType theG, - const vtkFloatingPointType theB ) +::SetValLblFontColor( const double theR, + const double theG, + const double theB ) { if ( VISU::CheckIsSameValue( myValLblFontColor[ 0 ], theR ) && VISU::CheckIsSameValue( myValLblFontColor[ 1 ], theG ) && diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.hh b/src/VISU_I/VISU_ColoredPrs3d_i.hh index c4476bbc..b98ddacf 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.hh +++ b/src/VISU_I/VISU_ColoredPrs3d_i.hh @@ -49,11 +49,11 @@ namespace VISU UpdateReference(ColoredPrs3d_i* theFromPrs3, ColoredPrs3d_i* theToPrs3d); virtual - vtkFloatingPointType + double GetComponentMin(vtkIdType theCompID); virtual - vtkFloatingPointType + double GetComponentMax(vtkIdType theCompID); virtual @@ -228,11 +228,11 @@ namespace VISU SetRange(CORBA::Double theMin, CORBA::Double theMax); virtual - vtkFloatingPointType + double GetComponentMin(vtkIdType theCompID) = 0; virtual - vtkFloatingPointType + double GetComponentMax(vtkIdType theCompID) = 0; virtual @@ -513,15 +513,15 @@ namespace VISU virtual void - GetTitleColor(vtkFloatingPointType& theR, - vtkFloatingPointType& theG, - vtkFloatingPointType& theB); + GetTitleColor(double& theR, + double& theG, + double& theB); virtual void - SetTitleColor(vtkFloatingPointType theR, - vtkFloatingPointType theG, - vtkFloatingPointType theB); + SetTitleColor(double theR, + double theG, + double theB); virtual bool @@ -557,15 +557,15 @@ namespace VISU virtual void - GetLabelColor(vtkFloatingPointType& theR, - vtkFloatingPointType& theG, - vtkFloatingPointType& theB); + GetLabelColor(double& theR, + double& theG, + double& theB); virtual void - SetLabelColor(vtkFloatingPointType theR, - vtkFloatingPointType theG, - vtkFloatingPointType theB); + SetLabelColor(double theR, + double theG, + double theB); virtual void @@ -619,15 +619,15 @@ namespace VISU virtual void - GetValLblFontColor( vtkFloatingPointType& theR, - vtkFloatingPointType& theG, - vtkFloatingPointType& theB ) const; + GetValLblFontColor( double& theR, + double& theG, + double& theB ) const; virtual void - SetValLblFontColor( const vtkFloatingPointType theR, - const vtkFloatingPointType theG, - const vtkFloatingPointType theB ); + SetValLblFontColor( const double theR, + const double theG, + const double theB ); virtual void @@ -743,7 +743,7 @@ namespace VISU std::string myLabelsFormat; VISU::ColoredPrs3dBase::Orientation myOrientation; - vtkFloatingPointType myPosition[2], + double myPosition[2], myWidth, myHeight, myTitleSize, myLabelSize, myBarWidth, myBarHeight; @@ -753,13 +753,13 @@ namespace VISU bool myIsItalicTitle; bool myIsShadowTitle; int myTitFontType; - vtkFloatingPointType myTitleColor[3]; + double myTitleColor[3]; bool myIsBoldLabel; bool myIsItalicLabel; bool myIsShadowLabel; int myLblFontType; - vtkFloatingPointType myLabelColor[3]; + double myLabelColor[3]; VISU_ColoredPL* myColoredPL; bool myIsFixedRange; @@ -772,7 +772,7 @@ namespace VISU bool myIsBoldValLbl; bool myIsItalicValLbl; bool myIsShadowValLbl; - vtkFloatingPointType myValLblFontColor[ 3 ]; + double myValLblFontColor[ 3 ]; }; diff --git a/src/VISU_I/VISU_CutLinesBase_i.cc b/src/VISU_I/VISU_CutLinesBase_i.cc index 28c7cf86..f6784012 100644 --- a/src/VISU_I/VISU_CutLinesBase_i.cc +++ b/src/VISU_I/VISU_CutLinesBase_i.cc @@ -35,7 +35,7 @@ #include -static vtkFloatingPointType EPS_machine = 1.0E-7; +static double EPS_machine = 1.0E-7; #ifdef _DEBUG_ static int MYDEBUG = 0; @@ -298,8 +298,8 @@ VISU::CutLinesBase_i anAttr = aStudyBuilder->FindOrCreateAttribute(theSObject, "AttributeTableOfReal"); SALOMEDS::AttributeTableOfReal_var aTableOfReal = SALOMEDS::AttributeTableOfReal::_narrow(anAttr); - typedef set TXCont; - typedef map TXYMap; + typedef set TXCont; + typedef map TXYMap; typedef map TXYMapCont; typedef map TLineIdCont; @@ -312,9 +312,9 @@ VISU::CutLinesBase_i TXCont aXCont; TXYMapCont aXYMapCont; TLineIdCont aLineIdCont; // Define internal numeration of lines - const vtkFloatingPointType *aDirLn = myCutLinesBasePL->GetDirLn(); - const vtkFloatingPointType *aBasePnt = myCutLinesBasePL->GetBasePnt(); - const vtkFloatingPointType *aBoundPrjLn = myCutLinesBasePL->GetBoundPrjLn(); + const double *aDirLn = myCutLinesBasePL->GetDirLn(); + const double *aBasePnt = myCutLinesBasePL->GetBasePnt(); + const double *aBoundPrjLn = myCutLinesBasePL->GetBoundPrjLn(); for(int iLine = 0, jLine = 0; iLine < iLineEnd; iLine++){ vtkDataSet *aDataSet = myCutLinesBasePL->GetAppendPolyData()->GetInput(iLine); aDataSet->Update(); @@ -336,7 +336,7 @@ VISU::CutLinesBase_i if(MYDEBUG) MESSAGE("CutPlanes_i::BuildTableOfReal iLine = "< EPS_machine) @@ -463,7 +463,7 @@ VISU::CutLinesBase_i 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; - vtkFloatingPointType aVal = aXYMapIter->second; + double aVal = aXYMapIter->second; aTableOfReal->PutValue(aVal,iLineId+2,i+1); } } diff --git a/src/VISU_I/VISU_CutLines_i.cc b/src/VISU_I/VISU_CutLines_i.cc index bde752fc..32275a73 100644 --- a/src/VISU_I/VISU_CutLines_i.cc +++ b/src/VISU_I/VISU_CutLines_i.cc @@ -330,7 +330,7 @@ VISU::CutLines_i { VISU::TSetModified aModified(this); - ProcessVoidEvent(new TVoidMemFun2ArgEvent + ProcessVoidEvent(new TVoidMemFun2ArgEvent (GetSpecificPL(), &VISU_CutLinesPL::SetDisplacement, theDisp, 0)); } @@ -341,7 +341,7 @@ VISU::CutLines_i { VISU::TSetModified aModified(this); - ProcessVoidEvent(new TVoidMemFun2ArgEvent + ProcessVoidEvent(new TVoidMemFun2ArgEvent (GetSpecificPL(), &VISU_CutLinesPL::SetDisplacement, theDisp, 1)); } @@ -370,7 +370,7 @@ VISU::CutLines_i { VISU::TSetModified aModified(this); - ProcessVoidEvent(new TVoidMemFun1ArgEvent + ProcessVoidEvent(new TVoidMemFun1ArgEvent (GetSpecificPL(), &VISU_CutLinesPL::SetPosition, thePlanePosition)); } @@ -390,7 +390,7 @@ VISU::CutLines_i { VISU::TSetModified aModified(this); - ProcessVoidEvent(new TVoidMemFun2ArgEvent + ProcessVoidEvent(new TVoidMemFun2ArgEvent (GetSpecificPL(), &VISU_CutLinesPL::SetPartPosition, thePlaneNumber, thePlanePosition)); } diff --git a/src/VISU_I/VISU_CutPlanes_i.cc b/src/VISU_I/VISU_CutPlanes_i.cc index 59b2538c..6a990be0 100644 --- a/src/VISU_I/VISU_CutPlanes_i.cc +++ b/src/VISU_I/VISU_CutPlanes_i.cc @@ -247,7 +247,7 @@ VISU::CutPlanes_i { VISU::TSetModified aModified(this); - ProcessVoidEvent(new TVoidMemFun2ArgEvent + ProcessVoidEvent(new TVoidMemFun2ArgEvent (GetSpecificPL(), &VISU_CutPlanesPL::SetDisplacement, theDisp, 0)); } @@ -268,7 +268,7 @@ VISU::CutPlanes_i { VISU::TSetModified aModified(this); - ProcessVoidEvent(new TVoidMemFun2ArgEvent + ProcessVoidEvent(new TVoidMemFun2ArgEvent (GetSpecificPL(), &VISU_CutPlanesPL::SetPartPosition, thePlaneNumber, thePlanePosition)); } diff --git a/src/VISU_I/VISU_Deformation_i.cc b/src/VISU_I/VISU_Deformation_i.cc index f78df4ee..192ec2c2 100755 --- a/src/VISU_I/VISU_Deformation_i.cc +++ b/src/VISU_I/VISU_Deformation_i.cc @@ -56,7 +56,7 @@ void VISU::Deformation_i::SetScale(CORBA::Double theScale) VISU::TSetModified aModified(GetColoredPrs3d()); - ProcessVoidEvent(new TVoidMemFun1ArgEvent + ProcessVoidEvent(new TVoidMemFun1ArgEvent (GetSpecificDeformedPL(), &VISU_DeformationPL::SetScale, theScale)); } diff --git a/src/VISU_I/VISU_DeformedShapeAndScalarMap_i.cc b/src/VISU_I/VISU_DeformedShapeAndScalarMap_i.cc index a4a94043..9ab69c37 100644 --- a/src/VISU_I/VISU_DeformedShapeAndScalarMap_i.cc +++ b/src/VISU_I/VISU_DeformedShapeAndScalarMap_i.cc @@ -236,7 +236,7 @@ VISU::DeformedShapeAndScalarMap_i { VISU::TSetModified aModified(this); - ProcessVoidEvent(new TVoidMemFun1ArgEvent + ProcessVoidEvent(new TVoidMemFun1ArgEvent (GetSpecificPL(), &VISU_DeformedShapeAndScalarMapPL::SetScale, theScale)); } diff --git a/src/VISU_I/VISU_DeformedShape_i.cc b/src/VISU_I/VISU_DeformedShape_i.cc index 91357fae..d9d0dd0a 100644 --- a/src/VISU_I/VISU_DeformedShape_i.cc +++ b/src/VISU_I/VISU_DeformedShape_i.cc @@ -199,7 +199,7 @@ VISU::DeformedShape_i { VISU::TSetModified aModified(this); - ProcessVoidEvent(new TVoidMemFun1ArgEvent + ProcessVoidEvent(new TVoidMemFun1ArgEvent (GetSpecificPL(), &VISU_DeformedShapePL::SetScale, theScale)); } diff --git a/src/VISU_I/VISU_Evolution.cxx b/src/VISU_I/VISU_Evolution.cxx index c5fd236d..3908eaf2 100644 --- a/src/VISU_I/VISU_Evolution.cxx +++ b/src/VISU_I/VISU_Evolution.cxx @@ -63,19 +63,19 @@ template bool ProcessValForTime( VISU::PValForTimeImpl theValForT typename TMeshValue::TCValueSliceArr aMValueSliceArr = aMeshValue->GetCompValueSliceArr( iElem ); VISU::Comp2Value& aComp2Value = theElem2Comp2Value[ iElem ]; - vtkFloatingPointType& aModulusValue = aComp2Value[ 0 ]; + double& aModulusValue = aComp2Value[ 0 ]; aModulusValue = 0.0; for( vtkIdType iComp = 0; iComp < aNbComp; iComp++ ) { const typename TMeshValue::TCValueSlice& aMValueSlice = aMValueSliceArr[ iComp ]; - vtkFloatingPointType& aValue = aComp2Value[ iComp+1 ]; + double& aValue = aComp2Value[ iComp+1 ]; aValue = 0.0; for(vtkIdType iGauss = 0; iGauss < aNbGauss; iGauss++) { - const vtkFloatingPointType& aVal = aMValueSlice[iGauss]; + const double& aVal = aMValueSlice[iGauss]; aValue += aVal; } if( aNbGauss != 0 ) @@ -344,7 +344,7 @@ bool VISU_Evolution::extractData( int thePointId, VISU::Comp2Value::const_iterator it3 = aComp2Value.find( theComponentId ); if( it3 != aComp2Value.end() ) { - vtkFloatingPointType aValue = it3.value(); + double aValue = it3.value(); theTimeStampValueList.append( aValue ); } } @@ -450,7 +450,7 @@ bool VISU_Evolution::_showEvolution() VISU::TimeStampValueListIterator it( aTimeStampValueList ); while( it.hasNext() ) { - vtkFloatingPointType aValue = it.next(); + double aValue = it.next(); VISU::TimeStampData aTimeStampData = myTimeStampDataList[ aTimeStamp ]; double aTimeValue = aTimeStampData.first; diff --git a/src/VISU_I/VISU_Evolution.h b/src/VISU_I/VISU_Evolution.h index 5938ee3c..b4754afa 100644 --- a/src/VISU_I/VISU_Evolution.h +++ b/src/VISU_I/VISU_Evolution.h @@ -46,8 +46,8 @@ namespace VISU namespace VISU { - typedef QMap< vtkIdType, vtkFloatingPointType > Comp2Value; - typedef QMapIterator< vtkIdType, vtkFloatingPointType > Comp2ValueIterator; + typedef QMap< vtkIdType, double > Comp2Value; + typedef QMapIterator< vtkIdType, double > Comp2ValueIterator; typedef QMap< vtkIdType, Comp2Value > Elem2Comp2Value; typedef QMapIterator< vtkIdType, Comp2Value > Elem2Comp2ValueIterator; @@ -60,8 +60,8 @@ namespace VISU typedef QList< ComponentData > ComponentDataList; typedef QListIterator< ComponentData > ComponentDataListIterator; - typedef QList< vtkFloatingPointType > TimeStampValueList; - typedef QListIterator< vtkFloatingPointType > TimeStampValueListIterator; + typedef QList< double > TimeStampValueList; + typedef QListIterator< double > TimeStampValueListIterator; }; class VISU_I_EXPORT VISU_Evolution diff --git a/src/VISU_I/VISU_GaussPoints_i.cc b/src/VISU_I/VISU_GaussPoints_i.cc index aa43cba6..69f1c075 100644 --- a/src/VISU_I/VISU_GaussPoints_i.cc +++ b/src/VISU_I/VISU_GaussPoints_i.cc @@ -168,16 +168,16 @@ VISU::GaussPoints_i int aBicolor = aResourceMgr->integerValue( "VISU", "scalar_bar_bicolor", GetBiColor() ); SetBiColor( aBicolor == 0 ); - vtkFloatingPointType aSpacing = aResourceMgr->doubleValue( "VISU", "scalar_bar_spacing", GetSpacing() ); + double aSpacing = aResourceMgr->doubleValue( "VISU", "scalar_bar_spacing", GetSpacing() ); SetSpacing( aSpacing ); - vtkFloatingPointType aScaleFactor = aResourceMgr->doubleValue( "VISU", "deformed_shape_scale_factor", GetScaleFactor() ); + double aScaleFactor = aResourceMgr->doubleValue( "VISU", "deformed_shape_scale_factor", GetScaleFactor() ); SetScaleFactor( aScaleFactor ); int aPrimitiveType = aResourceMgr->integerValue( "VISU", "point_sprite_primitive_type", GetPrimitiveType() ); SetPrimitiveType( VISU::GaussPoints::PrimitiveType(aPrimitiveType) ); - vtkFloatingPointType aClamp = aResourceMgr->doubleValue( "VISU", "point_sprite_clamp", GetClamp() ); + double aClamp = aResourceMgr->doubleValue( "VISU", "point_sprite_clamp", GetClamp() ); SetClamp( aClamp ); int aMinSize = aResourceMgr->integerValue( "VISU", "point_sprite_min_size", ( int )( GetMinSize() * 100.0 ) ); @@ -192,7 +192,7 @@ VISU::GaussPoints_i int aMagnification = aResourceMgr->integerValue( "VISU", "point_sprite_magnification", ( int )( GetMagnification() * 100.0 ) ); SetMagnification( aMagnification / 100.0 ); - vtkFloatingPointType anIncrement = aResourceMgr->doubleValue( "VISU", "point_sprite_increment", GetMagnificationIncrement() ); + double anIncrement = aResourceMgr->doubleValue( "VISU", "point_sprite_increment", GetMagnificationIncrement() ); SetMagnificationIncrement( anIncrement ); bool isColored = aResourceMgr->booleanValue( "VISU", "point_sprite_results", GetIsColored() ); @@ -201,7 +201,7 @@ VISU::GaussPoints_i QColor aColor = aResourceMgr->colorValue( "VISU", "point_sprite_color", GetQColor() ); SetQColor( aColor ); - vtkFloatingPointType anAlphaThreshold = aResourceMgr->doubleValue( "VISU", "point_sprite_alpha_threshold", GetAlphaThreshold() ); + double anAlphaThreshold = aResourceMgr->doubleValue( "VISU", "point_sprite_alpha_threshold", GetAlphaThreshold() ); SetAlphaThreshold( anAlphaThreshold ); int aResolution = aResourceMgr->integerValue( "VISU", "geom_sphere_resolution", GetResolution() ); @@ -602,7 +602,7 @@ VISU::GaussPoints_i } //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU::GaussPoints_i ::GetMaximumSupportedSize() { @@ -916,7 +916,7 @@ VISU::GaussPoints_i theLookupTable->SetNumberOfColors(aLookupTable->GetNumberOfColors()); theScalarBar->SetMaximumNumberOfColors(aLookupTable->GetNumberOfColors()); - vtkFloatingPointType anRGB[3]; + double anRGB[3]; vtkTextProperty* aTitleProp = theScalarBar->GetTitleTextProperty(); aTitleProp->SetFontFamily(GetTitFontType()); @@ -953,10 +953,10 @@ VISU::GaussPoints_i GetPipeLine()->GetMapper()->SetScalarVisibility(1); if(IsRangeFixed()){ - vtkFloatingPointType* aRange = GetSpecificPL()->GetScalarRange(); + double* aRange = GetSpecificPL()->GetScalarRange(); aScalarBarCtrl->SetRangeLocal(aRange); }else{ - vtkFloatingPointType aRange[2]; + double aRange[2]; GetSpecificPL()->GetSourceRange(aRange); aScalarBarCtrl->SetRangeLocal(aRange); } @@ -978,7 +978,7 @@ VISU::GaussPoints_i } if(aScalarBarMode == VISU_ScalarBarCtrl::eGlobal){ - vtkFloatingPointType aRangeGlobal[2]; + double aRangeGlobal[2]; // aRangeGlobal[0] = aTMinMax.first; aRangeGlobal[1] = aTMinMax.second; @@ -992,7 +992,7 @@ VISU::GaussPoints_i aScalarBarCtrl->SetWidth(GetWidth()); aScalarBarCtrl->SetHeight(GetHeight()); - vtkFloatingPointType aPosition[] = {GetPosX(), GetPosY()}; + double aPosition[] = {GetPosX(), GetPosY()}; aScalarBarCtrl->SetPosition(aPosition); aScalarBarCtrl->SetSpacing(mySpacing); @@ -1034,7 +1034,7 @@ VISU::GaussPoints_i aProp->SetItalic( IsItalicValLbl() ); aProp->SetShadow( IsShadowValLbl() ); - vtkFloatingPointType anRGB[ 3 ]; + double anRGB[ 3 ]; GetValLblFontColor( anRGB[ 0 ], anRGB[ 1 ], anRGB[ 2 ] ); aProp->SetColor( anRGB[ 0 ], anRGB[ 1 ], anRGB[ 2 ] ); } @@ -1135,8 +1135,8 @@ VISU::GaussPoints_i { VISU::TSetModified aModified(this); - vtkFloatingPointType aScalarRange[2] = {GetSourceMin(), GetSourceMax()}; - ProcessVoidEvent(new TVoidMemFun1ArgEvent + double aScalarRange[2] = {GetSourceMin(), GetSourceMax()}; + ProcessVoidEvent(new TVoidMemFun1ArgEvent (GetSpecificPL(), &VISU_ColoredPL::SetScalarRange, aScalarRange)); UseFixedRange(false); @@ -1160,7 +1160,7 @@ struct TGetSourceMin: public SALOME_Event Execute() { if ( myColoredPrs3d->IsTimeStampFixed() || myColoredPrs3d->GetIsActiveLocalScalarBar() ) { - vtkFloatingPointType aRange[2]; + double aRange[2]; myColoredPrs3d->GetSpecificPL()->GetSourceRange(aRange); myResult = aRange[0]; }else{ @@ -1198,7 +1198,7 @@ struct TGetSourceMax: public SALOME_Event Execute() { if ( myColoredPrs3d->IsTimeStampFixed() || myColoredPrs3d->GetIsActiveLocalScalarBar() ) { - vtkFloatingPointType aRange[2]; + double aRange[2]; myColoredPrs3d->GetSpecificPL()->GetSourceRange(aRange); myResult = aRange[1]; }else{ @@ -1299,7 +1299,7 @@ struct TGaussGetComponentMin: public SALOME_Event //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU::GaussPoints_i ::GetComponentMin(vtkIdType theCompID) { @@ -1341,7 +1341,7 @@ struct TGaussGetComponentMax: public SALOME_Event //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU::GaussPoints_i ::GetComponentMax(vtkIdType theCompID) { diff --git a/src/VISU_I/VISU_GaussPoints_i.hh b/src/VISU_I/VISU_GaussPoints_i.hh index 3f25ad8f..81c8fbaf 100644 --- a/src/VISU_I/VISU_GaussPoints_i.hh +++ b/src/VISU_I/VISU_GaussPoints_i.hh @@ -168,7 +168,7 @@ namespace VISU GetPrimitiveType(); //! Redirect the request to VISU_GaussPointsPL::GetMaximumSupportedSize. - vtkFloatingPointType + double GetMaximumSupportedSize(); //! Redirect the request to VISU_GaussPointsPL::SetClamp. @@ -294,11 +294,11 @@ namespace VISU RemoveAllGeom(); virtual - vtkFloatingPointType + double GetComponentMin(vtkIdType theCompID); virtual - vtkFloatingPointType + double GetComponentMax(vtkIdType theCompID); protected: @@ -344,7 +344,7 @@ namespace VISU bool myIsDispGlobalScalarBar; bool myIsActiveLocalScalarBar; QColor myColor; - vtkFloatingPointType mySpacing; + double mySpacing; int myFaceLimit; QString myMainTexture; diff --git a/src/VISU_I/VISU_IsoSurfaces_i.cc b/src/VISU_I/VISU_IsoSurfaces_i.cc index e84ec24c..b036da68 100644 --- a/src/VISU_I/VISU_IsoSurfaces_i.cc +++ b/src/VISU_I/VISU_IsoSurfaces_i.cc @@ -210,8 +210,8 @@ VISU::IsoSurfaces_i VISU::TSetModified aModified(this); bool isForced = false; - vtkFloatingPointType aRange[2] = {theMin, theMax}; - ProcessVoidEvent(new TVoidMemFun2ArgEvent + double aRange[2] = {theMin, theMax}; + ProcessVoidEvent(new TVoidMemFun2ArgEvent (GetSpecificPL(), &VISU_IsoSurfacesPL::SetRange, aRange, isForced)); } diff --git a/src/VISU_I/VISU_Plot3D_i.cc b/src/VISU_I/VISU_Plot3D_i.cc index 8360d7c1..132b01e4 100644 --- a/src/VISU_I/VISU_Plot3D_i.cc +++ b/src/VISU_I/VISU_Plot3D_i.cc @@ -236,7 +236,7 @@ VISU::Plot3D_i { VISU::TSetModified aModified(this); - ProcessVoidEvent(new TVoidMemFun2ArgEvent + ProcessVoidEvent(new TVoidMemFun2ArgEvent (GetSpecificPL(), &VISU_Plot3DPL::SetPlanePosition, thePlanePosition, theIsRelative)); } @@ -266,7 +266,7 @@ VISU::Plot3D_i { VISU::TSetModified aModified(this); - ProcessVoidEvent(new TVoidMemFun1ArgEvent + ProcessVoidEvent(new TVoidMemFun1ArgEvent (GetSpecificPL(), &VISU_Plot3DPL::SetScaleFactor, theScaleFactor)); } diff --git a/src/VISU_I/VISU_PointMap3d_i.cc b/src/VISU_I/VISU_PointMap3d_i.cc index 8a54f233..ba7eef23 100644 --- a/src/VISU_I/VISU_PointMap3d_i.cc +++ b/src/VISU_I/VISU_PointMap3d_i.cc @@ -229,11 +229,11 @@ VISU::Storable* VISU::PointMap3d_i::Create() // Scalar Bar origin QString propertyName = QString( "scalar_bar_%1_" ).arg( anOrientation == 0 ? "vertical" : "horizontal" ); - vtkFloatingPointType aXorigin = (myBarOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.01 : 0.2; + double aXorigin = (myBarOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.01 : 0.2; aXorigin = aResourceMgr->doubleValue("VISU", propertyName + "x", aXorigin); myPosition[0] = aXorigin; - vtkFloatingPointType aYorigin = (myBarOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.1 : 0.012; + double aYorigin = (myBarOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.1 : 0.012; aYorigin = aResourceMgr->doubleValue("VISU", propertyName + "y", aYorigin); myPosition[1] = aYorigin; @@ -406,7 +406,7 @@ void VISU::PointMap3d_i::UpdateActor(VISU_ActorBase* theActor) aScalarBar->SetNumberOfLabels(GetLabels()); aScalarBar->SetLabelFormat(GetLabelsFormat()); - vtkFloatingPointType anRGB[3]; + double anRGB[3]; vtkTextProperty* aTitleProp = aScalarBar->GetTitleTextProperty(); aTitleProp->SetFontFamily(GetTitFontType()); @@ -830,8 +830,8 @@ CORBA::Double VISU::PointMap3d_i::GetMax() void VISU::PointMap3d_i::SetRange(CORBA::Double theMin, CORBA::Double theMax) { - vtkFloatingPointType aScalarRange[2] = {theMin, theMax}; - ProcessVoidEvent(new TVoidMemFun1ArgEvent + double aScalarRange[2] = {theMin, theMax}; + ProcessVoidEvent(new TVoidMemFun1ArgEvent (GetSpecificPL(), &VISU_DeformedGridPL::SetScalarRange, aScalarRange)); UseFixedRange(true); @@ -839,14 +839,14 @@ void VISU::PointMap3d_i::SetRange(CORBA::Double theMin, CORBA::Double theMax) CORBA::Double VISU::PointMap3d_i::GetSourceMin() { - vtkFloatingPointType aRange[2]; + double aRange[2]; GetSpecificPL()->GetSourceRange(aRange); return aRange[0]; } CORBA::Double VISU::PointMap3d_i::GetSourceMax() { - vtkFloatingPointType aRange[2]; + double aRange[2]; GetSpecificPL()->GetSourceRange(aRange); return aRange[1]; } @@ -948,7 +948,7 @@ void VISU::PointMap3d_i::SetBarOrientation(VISU::ColoredPrs3dBase::Orientation t if ( ( theBarOrientation == VISU::ColoredPrs3dBase::VERTICAL && myHeight < myWidth ) || ( theBarOrientation == VISU::ColoredPrs3dBase::HORIZONTAL && myHeight > myWidth ) ) { - vtkFloatingPointType tmp = myHeight; + double tmp = myHeight; myHeight = myWidth; myWidth = tmp; } @@ -996,7 +996,7 @@ bool VISU::PointMap3d_i::IsPositiveTable() void VISU::PointMap3d_i::SetScaleFactor (CORBA::Double theScaleFactor) { - ProcessVoidEvent(new TVoidMemFun1ArgEvent + ProcessVoidEvent(new TVoidMemFun1ArgEvent (GetSpecificPL(), &VISU_DeformedGridPL::SetScaleFactor, theScaleFactor)); } @@ -1116,9 +1116,9 @@ void VISU::PointMap3d_i::SetTitFontType(int theTitFontType) } //---------------------------------------------------------------------------- -void VISU::PointMap3d_i::GetTitleColor(vtkFloatingPointType& theR, - vtkFloatingPointType& theG, - vtkFloatingPointType& theB) +void VISU::PointMap3d_i::GetTitleColor(double& theR, + double& theG, + double& theB) { theR = myTitleColor[0]; theG = myTitleColor[1]; @@ -1126,9 +1126,9 @@ void VISU::PointMap3d_i::GetTitleColor(vtkFloatingPointType& theR, } //---------------------------------------------------------------------------- -void VISU::PointMap3d_i::SetTitleColor(vtkFloatingPointType theR, - vtkFloatingPointType theG, - vtkFloatingPointType theB) +void VISU::PointMap3d_i::SetTitleColor(double theR, + double theG, + double theB) { bool anIsSameValue = VISU::CheckIsSameValue(myTitleColor[0], theR); anIsSameValue &= VISU::CheckIsSameValue(myTitleColor[1], theG); @@ -1207,9 +1207,9 @@ void VISU::PointMap3d_i::SetLblFontType(int theLblFontType) } //---------------------------------------------------------------------------- -void VISU::PointMap3d_i::GetLabelColor(vtkFloatingPointType& theR, - vtkFloatingPointType& theG, - vtkFloatingPointType& theB) +void VISU::PointMap3d_i::GetLabelColor(double& theR, + double& theG, + double& theB) { theR = myLabelColor[0]; theG = myLabelColor[1]; @@ -1217,9 +1217,9 @@ void VISU::PointMap3d_i::GetLabelColor(vtkFloatingPointType& theR, } //---------------------------------------------------------------------------- -void VISU::PointMap3d_i::SetLabelColor(vtkFloatingPointType theR, - vtkFloatingPointType theG, - vtkFloatingPointType theB) +void VISU::PointMap3d_i::SetLabelColor(double theR, + double theG, + double theB) { bool anIsSameValue = VISU::CheckIsSameValue(myLabelColor[0], theR); anIsSameValue &= VISU::CheckIsSameValue(myLabelColor[1], theG); diff --git a/src/VISU_I/VISU_PointMap3d_i.hh b/src/VISU_I/VISU_PointMap3d_i.hh index aee6ca31..e48e3e4c 100644 --- a/src/VISU_I/VISU_PointMap3d_i.hh +++ b/src/VISU_I/VISU_PointMap3d_i.hh @@ -169,12 +169,12 @@ namespace VISU virtual void SetShadowTitle(bool isShadow); virtual int GetTitFontType(); virtual void SetTitFontType(int theType); - virtual void GetTitleColor(vtkFloatingPointType& theR, - vtkFloatingPointType& theG, - vtkFloatingPointType& theB); - virtual void SetTitleColor(vtkFloatingPointType theR, - vtkFloatingPointType theG, - vtkFloatingPointType theB); + virtual void GetTitleColor(double& theR, + double& theG, + double& theB); + virtual void SetTitleColor(double theR, + double theG, + double theB); virtual bool IsBoldLabel(); virtual void SetBoldLabel(bool isBold); @@ -184,12 +184,12 @@ namespace VISU virtual void SetShadowLabel(bool isShadow); virtual int GetLblFontType(); virtual void SetLblFontType(int theType); - virtual void GetLabelColor(vtkFloatingPointType& theR, - vtkFloatingPointType& theG, - vtkFloatingPointType& theB); - virtual void SetLabelColor(vtkFloatingPointType theR, - vtkFloatingPointType theG, - vtkFloatingPointType theB); + virtual void GetLabelColor(double& theR, + double& theG, + double& theB); + virtual void SetLabelColor(double theR, + double theG, + double theB); //------------------------------------------------------------------- virtual CORBA::Long GetTitleSize(); @@ -213,7 +213,7 @@ namespace VISU SALOMEDS::SObject_var mySObj; int myNumberOfLabels; std::string myLabelsFormat; - vtkFloatingPointType myPosition[2], + double myPosition[2], myWidth, myHeight, myTitleSize, myLabelSize, @@ -232,13 +232,13 @@ namespace VISU bool myIsItalicTitle; bool myIsShadowTitle; int myTitFontType; - vtkFloatingPointType myTitleColor[3]; + double myTitleColor[3]; bool myIsBoldLabel; bool myIsItalicLabel; bool myIsShadowLabel; int myLblFontType; - vtkFloatingPointType myLabelColor[3]; + double myLabelColor[3]; boost::signal0 myUpdateActorsSignal; boost::signal0 myRemoveActorsFromRendererSignal; diff --git a/src/VISU_I/VISU_Prs3d_i.cc b/src/VISU_I/VISU_Prs3d_i.cc index 212bf27e..fa25e542 100644 --- a/src/VISU_I/VISU_Prs3d_i.cc +++ b/src/VISU_I/VISU_Prs3d_i.cc @@ -654,8 +654,8 @@ void VISU::Prs3d_i::RemoveClippingPlane(vtkIdType theID) //---------------------------------------------------------------------------- void VISU::Prs3d_i -::SetPlaneParam(vtkFloatingPointType theDir[3], - vtkFloatingPointType theDist, +::SetPlaneParam(double theDir[3], + double theDist, vtkPlane* thePlane) { GetPipeLine()->SetPlaneParam(theDir, theDist, thePlane); @@ -665,7 +665,7 @@ VISU::Prs3d_i //---------------------------------------------------------------------------- void VISU::Prs3d_i -::GetBounds(vtkFloatingPointType aBounds[6]) +::GetBounds(double aBounds[6]) { GetPipeLine()->GetMapper()->GetBounds(aBounds); } diff --git a/src/VISU_I/VISU_Prs3d_i.hh b/src/VISU_I/VISU_Prs3d_i.hh index 4d6f94b9..4929430d 100644 --- a/src/VISU_I/VISU_Prs3d_i.hh +++ b/src/VISU_I/VISU_Prs3d_i.hh @@ -227,13 +227,13 @@ namespace VISU void RemoveClippingPlane(vtkIdType theID); void - SetPlaneParam(vtkFloatingPointType theDir[3], - vtkFloatingPointType theDist, + SetPlaneParam(double theDir[3], + double theDist, vtkPlane* thePlane); //---------------------------------------------------------------------------- void - GetBounds(vtkFloatingPointType aBounds[6]); + GetBounds(double aBounds[6]); int GetNumberOfActors(); diff --git a/src/VISU_I/VISU_Result_i.cc b/src/VISU_I/VISU_Result_i.cc index 4ef802f8..f4316255 100644 --- a/src/VISU_I/VISU_Result_i.cc +++ b/src/VISU_I/VISU_Result_i.cc @@ -1620,17 +1620,17 @@ VISU::Result_i cell->GetCellType() != VTK_QUADRATIC_HEXAHEDRON ) continue; vtkPoints * points = cell->GetPoints(); - vtkFloatingPointType coords[ 4 ][3]; + double coords[ 4 ][3]; points->GetPoint( 0, coords[0] ); points->GetPoint( 1, coords[1] ); points->GetPoint( 3, coords[2] ); points->GetPoint( 4, coords[3] ); gp_Pnt p0( coords[0][0], coords[0][1], coords[0][2] ); for ( iAx = 0; iAx < nbAxes; ++iAx ) { - vtkFloatingPointType* coo = coords[ iAx + 1 ]; + double* coo = coords[ iAx + 1 ]; gp_Pnt p( coo[0], coo[1], coo[2] ); // min size - vtkFloatingPointType size = p0.SquareDistance( p ); + double size = p0.SquareDistance( p ); if ( size > FLT_MIN && size < minSize[ iAx ] ) minSize[ iAx ] = size; // axis direction @@ -1660,34 +1660,34 @@ VISU::Result_i // get and sort intermediate component values - projections of nodes // on axis direction; define bnd box - set< vtkFloatingPointType > comps[ 3 ]; + set< double > comps[ 3 ]; Bnd_Box box; vtkPoints * points = aMesh->GetPoints(); vtkIdType iP, nbP = aMesh->GetNumberOfPoints(); for ( iP = 0; iP < nbP; ++iP ) { - vtkFloatingPointType coo[3]; + double coo[3]; points->GetPoint( iP, coo ); 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 ]; - vtkFloatingPointType dot = dir.XYZ() * p.XYZ(); + double dot = dir.XYZ() * p.XYZ(); comps[ iAx ].insert( dot ); } } // find a range of projections of bnd box corners on each axis - vtkFloatingPointType range[3], firstValue[3]; + double 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< vtkFloatingPointType > bndComps; + set< double > 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 ] ); - vtkFloatingPointType dot = dir.XYZ() * p.XYZ(); + double dot = dir.XYZ() * p.XYZ(); bndComps.insert( dot ); } } @@ -1698,14 +1698,14 @@ VISU::Result_i // compute component values for ( iAx = 0; iAx < nbAxes; ++iAx ) { - list< vtkFloatingPointType > values; + list< double > values; int nbVals = 0; - 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; + set< double >& comp = comps[ iAx ]; + set< double >::iterator val = comp.begin(); + double bnd = -1., rng = range[ iAx ], first = firstValue[ iAx ]; + double tol = 0.1 * sqrt( minSize[ iAx ]) / rng; for ( ; val != comp.end(); ++val ) { - vtkFloatingPointType value = ( *val - first ) / rng; + double value = ( *val - first ) / rng; if ( value > bnd ) { values.push_back( value ); bnd = value + tol; @@ -1713,9 +1713,9 @@ VISU::Result_i } } // store values in gInfo - vector< vtkFloatingPointType >& myComp = gInfo->myComponets[ iAx ]; + vector< double >& myComp = gInfo->myComponets[ iAx ]; myComp.resize( nbVals ); - list< vtkFloatingPointType >::iterator v = values.begin(); + list< double >::iterator v = values.begin(); for ( int i = 0; v != values.end(); ++v ){ myComp[ i++ ] = *v; } @@ -1739,7 +1739,7 @@ VISU::Result_i }} TStructuredId aStructuredId = theMesh->GetStructure(); - vector PointsCoords[3]; + vector PointsCoords[3]; vtkPoints* aPoints = aMesh->GetPoints(); switch ( aMeshDim ) { case 3: { @@ -1749,7 +1749,7 @@ VISU::Result_i aCoordIJK[2] = i + 1; vtkIdType aObjID = anIDMapper->GetObjectIDByIndexes(aCoordIJK); vtkIdType aVTKID = anIDMapper->GetNodeVTKID(aObjID); - vtkFloatingPointType* aPCoord = aPoints->GetPoint(aVTKID); + double* aPCoord = aPoints->GetPoint(aVTKID); PointsCoords[2].push_back(aPCoord[2]); } } @@ -1760,7 +1760,7 @@ VISU::Result_i aCoordIJK[1] = i + 1; vtkIdType aObjID = anIDMapper->GetObjectIDByIndexes(aCoordIJK); vtkIdType aVTKID = anIDMapper->GetNodeVTKID(aObjID); - vtkFloatingPointType* aPCoord = aPoints->GetPoint(aVTKID); + double* aPCoord = aPoints->GetPoint(aVTKID); PointsCoords[1].push_back(aPCoord[1]); } } @@ -1771,15 +1771,15 @@ VISU::Result_i aCoordIJK[0] = i + 1; vtkIdType aObjID = anIDMapper->GetObjectIDByIndexes(aCoordIJK); vtkIdType aVTKID = anIDMapper->GetNodeVTKID(aObjID); - vtkFloatingPointType* aPCoord = aPoints->GetPoint(aVTKID); + double* aPCoord = aPoints->GetPoint(aVTKID); PointsCoords[0].push_back(aPCoord[0]); } }} for ( int i = 0; i < aMeshDim; i++ ) { - vector< vtkFloatingPointType >& myComp = gInfo->myComponets[ i ]; + vector< double >& myComp = gInfo->myComponets[ i ]; int aSize = PointsCoords[i].size(); if ( aSize > 0 ) { - vtkFloatingPointType aLen = PointsCoords[i][aSize-1] - PointsCoords[i][0]; + double aLen = PointsCoords[i][aSize-1] - PointsCoords[i][0]; myComp.resize(aSize); myComp[0] = 0; for ( int k = 1; k < aSize; k++ ) { diff --git a/src/VISU_I/VISU_Result_i.hh b/src/VISU_I/VISU_Result_i.hh index 1fbb2254..c350a132 100644 --- a/src/VISU_I/VISU_Result_i.hh +++ b/src/VISU_I/VISU_Result_i.hh @@ -394,7 +394,7 @@ namespace VISU // Info on structured mesh contained in TInput public: typedef enum { AXIS_X = 0, AXIS_Y, AXIS_Z } TAxis; - typedef std::vector< vtkFloatingPointType > TAxisInfo; + typedef std::vector< double > TAxisInfo; const TAxisInfo* GetAxisInfo(const std::string& theMeshName, TAxis theAxis, gp_Dir& thePlaneNormal); diff --git a/src/VISU_I/VISU_ScalarMap_i.cc b/src/VISU_I/VISU_ScalarMap_i.cc index c8cf2c4f..09f82475 100644 --- a/src/VISU_I/VISU_ScalarMap_i.cc +++ b/src/VISU_I/VISU_ScalarMap_i.cc @@ -564,7 +564,7 @@ VISU::ScalarMap_i aScalarBar->SetNumberOfLabels(GetLabels()); aScalarBar->SetLabelFormat(GetLabelsFormat()); - vtkFloatingPointType anRGB[3]; + double anRGB[3]; vtkTextProperty* aTitleProp = aScalarBar->GetTitleTextProperty(); aTitleProp->SetFontFamily(GetTitFontType()); @@ -601,7 +601,7 @@ VISU::ScalarMap_i aProp->SetItalic( IsItalicValLbl() ); aProp->SetShadow( IsShadowValLbl() ); - vtkFloatingPointType anRGB[ 3 ]; + double anRGB[ 3 ]; GetValLblFontColor( anRGB[ 0 ], anRGB[ 1 ], anRGB[ 2 ] ); aProp->SetColor( anRGB[ 0 ], anRGB[ 1 ], anRGB[ 2 ] ); } @@ -655,7 +655,7 @@ struct TGetComponentMin: public SALOME_Event //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU::ScalarMap_i ::GetComponentMin(vtkIdType theCompID) { @@ -704,7 +704,7 @@ struct TGetComponentMax: public SALOME_Event //---------------------------------------------------------------------------- -vtkFloatingPointType +double VISU::ScalarMap_i ::GetComponentMax(vtkIdType theCompID) { diff --git a/src/VISU_I/VISU_ScalarMap_i.hh b/src/VISU_I/VISU_ScalarMap_i.hh index 99901761..f4bdae33 100644 --- a/src/VISU_I/VISU_ScalarMap_i.hh +++ b/src/VISU_I/VISU_ScalarMap_i.hh @@ -203,11 +203,11 @@ namespace VISU UpdateActor(VISU_ActorBase* theActor); virtual - vtkFloatingPointType + double GetComponentMin(vtkIdType theCompID); virtual - vtkFloatingPointType + double GetComponentMax(vtkIdType theCompID); private: diff --git a/src/VISU_I/VISU_TimeAnimation.cxx b/src/VISU_I/VISU_TimeAnimation.cxx index c6230439..fdcd128f 100644 --- a/src/VISU_I/VISU_TimeAnimation.cxx +++ b/src/VISU_I/VISU_TimeAnimation.cxx @@ -167,10 +167,10 @@ namespace VISU } virtual - vtkFloatingPointType + double GetComponentMin(vtkIdType theCompID) { - vtkFloatingPointType aMin = TMinMaxController::GetComponentMin(theCompID); + double aMin = TMinMaxController::GetComponentMin(theCompID); if ( !myMinMaxContainer.empty() ) { TMinMaxContainer::const_iterator anIter = myMinMaxContainer.begin(); for(; anIter != myMinMaxContainer.end(); anIter++){ @@ -182,10 +182,10 @@ namespace VISU } virtual - vtkFloatingPointType + double GetComponentMax(vtkIdType theCompID) { - vtkFloatingPointType aMax = TMinMaxController::GetComponentMax(theCompID); + double aMax = TMinMaxController::GetComponentMax(theCompID); if ( !myMinMaxContainer.empty() ) { TMinMaxContainer::const_iterator anIter = myMinMaxContainer.begin(); for(; anIter != myMinMaxContainer.end(); anIter++){ diff --git a/src/VISU_I/VISU_View_i.cc b/src/VISU_I/VISU_View_i.cc index dd5fc075..1e1f754a 100644 --- a/src/VISU_I/VISU_View_i.cc +++ b/src/VISU_I/VISU_View_i.cc @@ -829,7 +829,7 @@ namespace VISU { void Execute() { - vtkFloatingPointType backint[3]; + double backint[3]; GetRenderer(myVW)->GetBackground(backint); myResult.R = backint[0]; myResult.G = backint[1]; @@ -1839,7 +1839,7 @@ namespace VISU { void View3D_i::ToStream (SUIT_ViewWindow* theViewWindow, std::ostringstream& theStr) { - vtkFloatingPointType backint[3]; + double backint[3]; GetRenderer(theViewWindow)->GetBackground(backint); Storable::DataToStream(theStr,"myColor.R",backint[0]); Storable::DataToStream(theStr,"myColor.G",backint[1]); @@ -1921,7 +1921,7 @@ namespace VISU { SALOMEDS::Color View3D_i::GetBackground (SUIT_ViewWindow* theViewWindow) { SALOMEDS::Color aColor; - vtkFloatingPointType backint[3]; + double backint[3]; GetRenderer(theViewWindow)->GetBackground(backint); aColor.R = backint[0]; aColor.G = backint[1]; aColor.B = backint[2]; return aColor; @@ -2355,7 +2355,7 @@ namespace VISU { TPrsManageEvent(theView3D, thePrs), myResult(-1.0) {} virtual void Execute() { if (VISU_Actor* anActor = GetMyActor()) { - vtkFloatingPointType oldvalue = anActor->GetOpacity(); + double oldvalue = anActor->GetOpacity(); myResult = (double)oldvalue; } } @@ -2369,7 +2369,7 @@ namespace VISU { TPrsManageEvent(theView3D, thePrs), myResult(-1.0) {} virtual void Execute() { if (VISU_Actor* anActor = GetMyActor()) { - vtkFloatingPointType oldvalue = anActor->GetLineWidth(); + double oldvalue = anActor->GetLineWidth(); myResult = (double)oldvalue; } } @@ -2507,7 +2507,7 @@ namespace VISU { return; } if (VISU_Actor* anActor = GetMyActor()) { - anActor->SetOpacity((vtkFloatingPointType)myOpacity); + anActor->SetOpacity((double)myOpacity); SVTK_ViewWindow* vw = dynamic_cast(myView3D->GetViewWindow()); vw->Repaint(); myResult = ""; @@ -2533,7 +2533,7 @@ namespace VISU { return; } if (VISU_Actor* anActor = GetMyActor()) { - anActor->SetLineWidth((vtkFloatingPointType)myLineWidth); + anActor->SetLineWidth((double)myLineWidth); SVTK_ViewWindow* vw = dynamic_cast(myView3D->GetViewWindow()); vw->Repaint(); myResult = ""; -- 2.39.2