From: ouv Date: Wed, 30 Jan 2013 12:27:01 +0000 (+0000) Subject: Porting to VTK 6. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e6ff6155863d3d5f8c22b89ad49baeb61d993eb4;p=modules%2Fgui.git Porting to VTK 6. Compilation with ParaView built without option "-DVTK_LEGACY_REMOVE:BOOL=OFF". --- diff --git a/src/SVTK/SALOME_Actor.cxx b/src/SVTK/SALOME_Actor.cxx index 705025e50..988653a08 100644 --- a/src/SVTK/SALOME_Actor.cxx +++ b/src/SVTK/SALOME_Actor.cxx @@ -84,13 +84,13 @@ namespace { int anEdgeId = 0; if (vtkCell* aPickedCell = theActor->GetElemCell(theObjId)) { - vtkFloatingPointType aPickPosition[3]; + double aPickPosition[3]; thePicker->GetPickPosition(aPickPosition); - vtkFloatingPointType aMinDist = 1000000.0, aDist = 0; + double aMinDist = 1000000.0, aDist = 0; for (int i = 0, iEnd = aPickedCell->GetNumberOfEdges(); i < iEnd; i++){ if(vtkLine* aLine = vtkLine::SafeDownCast(aPickedCell->GetEdge(i))){ int subId; - vtkFloatingPointType pcoords[3], closestPoint[3], weights[3]; + double pcoords[3], closestPoint[3], weights[3]; aLine->EvaluatePosition(aPickPosition,closestPoint,subId,pcoords,aDist,weights); if (aDist < aMinDist) { aMinDist = aDist; @@ -212,7 +212,7 @@ SALOME_Actor aForegroundColor.greenF(), aForegroundColor.blueF()); - vtkFloatingPointType aGroupNamesTransparency = 0.5; + double aGroupNamesTransparency = 0.5; aGroupNamesTransparency = aResourceMgr->doubleValue( "VTKViewer", "group_names_transparency", aGroupNamesTransparency ); myNameActor->SetTransparency(aGroupNamesTransparency); } @@ -357,9 +357,9 @@ SALOME_Actor */ void SALOME_Actor -::SetPosition(vtkFloatingPointType _arg1, - vtkFloatingPointType _arg2, - vtkFloatingPointType _arg3) +::SetPosition(double _arg1, + double _arg2, + double _arg3) { Superclass::SetPosition(_arg1,_arg2,_arg3); @@ -373,7 +373,7 @@ SALOME_Actor */ void SALOME_Actor -::SetPosition(vtkFloatingPointType _arg[3]) +::SetPosition(double _arg[3]) { SetPosition(_arg[0],_arg[1],_arg[2]); } @@ -471,7 +471,7 @@ void SALOME_Actor ::highlight(bool theIsHighlight) { - vtkFloatingPointType aBounds[6]; + double aBounds[6]; vtkDataSet * aDataSet = GetHighlightedDataSet(); aDataSet->GetBounds(aBounds); myOutline->SetBounds(aBounds); @@ -504,9 +504,9 @@ SALOME_Actor myPreHighlightActor->SetMarkerEnabled( aSelectionMode == NodeSelection ); - vtkFloatingPointType x = theSelectionEvent->myX; - vtkFloatingPointType y = theSelectionEvent->myY; - vtkFloatingPointType z = 0.0; + double x = theSelectionEvent->myX; + double y = theSelectionEvent->myY; + double z = 0.0; if( !theIsHighlight ) { if ( hasIO() ) { @@ -664,9 +664,9 @@ SALOME_Actor myHighlightActor->SetMarkerEnabled( aSelectionMode == NodeSelection ); - vtkFloatingPointType x = theSelectionEvent->myX; - vtkFloatingPointType y = theSelectionEvent->myY; - vtkFloatingPointType z = 0.0; + double x = theSelectionEvent->myX; + double y = theSelectionEvent->myY; + double z = 0.0; if( !theSelectionEvent->myIsRectangle ) { switch(aSelectionMode){ @@ -740,16 +740,16 @@ SALOME_Actor break; } }else{ - vtkFloatingPointType xLast = theSelectionEvent->myLastX; - vtkFloatingPointType yLast = theSelectionEvent->myLastY; - vtkFloatingPointType zLast = 0.0; + double xLast = theSelectionEvent->myLastX; + double yLast = theSelectionEvent->myLastY; + double zLast = 0.0; - vtkFloatingPointType x1 = x < xLast ? x : xLast; - vtkFloatingPointType y1 = y < yLast ? y : yLast; - vtkFloatingPointType z1 = z < zLast ? z : zLast; - vtkFloatingPointType x2 = x > xLast ? x : xLast; - vtkFloatingPointType y2 = y > yLast ? y : yLast; - vtkFloatingPointType z2 = z > zLast ? z : zLast; + double x1 = x < xLast ? x : xLast; + double y1 = y < yLast ? y : yLast; + double z1 = z < zLast ? z : zLast; + double x2 = x > xLast ? x : xLast; + double y2 = y > yLast ? y : yLast; + double z2 = z > zLast ? z : zLast; switch(aSelectionMode){ case NodeSelection: { @@ -785,8 +785,8 @@ SALOME_Actor } case ActorSelection : { - vtkFloatingPointType aPnt[3]; - vtkFloatingPointType* aBounds = GetBounds(); + double aPnt[3]; + double* aBounds = GetBounds(); bool anIsPicked = true; for( int i = 0; i <= 1; i++ ) { diff --git a/src/SVTK/SALOME_Actor.h b/src/SVTK/SALOME_Actor.h index bb86575c7..84a48c4b4 100644 --- a/src/SVTK/SALOME_Actor.h +++ b/src/SVTK/SALOME_Actor.h @@ -106,14 +106,14 @@ class SVTK_EXPORT SALOME_Actor : public VTKViewer_Actor //! Apply additional position virtual void - SetPosition(vtkFloatingPointType _arg1, - vtkFloatingPointType _arg2, - vtkFloatingPointType _arg3); + SetPosition(double _arg1, + double _arg2, + double _arg3); //! Apply additional position virtual void - SetPosition(vtkFloatingPointType _arg[3]); + SetPosition(double _arg[3]); //---------------------------------------------------------------------------- //! Visibility management diff --git a/src/SVTK/SVTK_Actor.cxx b/src/SVTK/SVTK_Actor.cxx index 0155b629a..3180a5c60 100644 --- a/src/SVTK/SVTK_Actor.cxx +++ b/src/SVTK/SVTK_Actor.cxx @@ -157,7 +157,7 @@ SVTK_Actor aPoints->SetNumberOfPoints(aNbOfParts); for(vtkIdType i = 0; i < aNbOfParts; i++){ int aPartId = theMapIndex( i+1 ); - if(vtkFloatingPointType* aCoord = theMapActor->GetNodeCoord(aPartId)){ + if(double* aCoord = theMapActor->GetNodeCoord(aPartId)){ aPoints->SetPoint(i,aCoord); // Change the type from int to vtkIdType in order to avoid compilation errors while using VTK // from ParaView-3.4.0 compiled on 64-bit Debian platform with VTK_USE_64BIT_IDS = ON diff --git a/src/SVTK/SVTK_CubeAxesActor2D.cxx b/src/SVTK/SVTK_CubeAxesActor2D.cxx index 2606eafb3..8c2f75d7c 100644 --- a/src/SVTK/SVTK_CubeAxesActor2D.cxx +++ b/src/SVTK/SVTK_CubeAxesActor2D.cxx @@ -43,7 +43,6 @@ #include #include -vtkCxxRevisionMacro(SVTK_CubeAxesActor2D, "$Revision$"); vtkStandardNewMacro(SVTK_CubeAxesActor2D); // Instantiate this object. @@ -192,13 +191,13 @@ int SVTK_CubeAxesActor2D::RenderOverlay(vtkViewport *viewport) return renderedSomething; } -static void ChangeValues(vtkFloatingPointType* aArray1, - vtkFloatingPointType* aArray2, - vtkFloatingPointType *aRange1, - vtkFloatingPointType* aRange2, +static void ChangeValues(double* aArray1, + double* aArray2, + double *aRange1, + double* aRange2, bool theY) { - vtkFloatingPointType tmp=-1000; + double tmp=-1000; if (!theY){ for (int i=0; i<4; i++){ tmp = aArray1[i]; aArray1[i] = aArray2[i]; aArray2[i] = tmp; @@ -218,12 +217,12 @@ static void ChangeValues(vtkFloatingPointType* aArray1, } } -static void ChangeArrays(vtkFloatingPointType* xCoords, - vtkFloatingPointType* yCoords, - vtkFloatingPointType* zCoords, - vtkFloatingPointType* xRange, - vtkFloatingPointType* yRange, - vtkFloatingPointType* zRange, +static void ChangeArrays(double* xCoords, + double* yCoords, + double* zCoords, + double* xRange, + double* yRange, + double* zRange, const int xAxes, const int yAxes, const int zAxes) @@ -249,8 +248,8 @@ static void ChangeArrays(vtkFloatingPointType* xCoords, // with the boundary of the viewport (minus borders). int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport) { - vtkFloatingPointType bounds[6], slope = 0.0, minSlope, num, den; - vtkFloatingPointType pts[8][3], d2, d2Min, min; + double bounds[6], slope = 0.0, minSlope, num, den; + double pts[8][3], d2, d2Min, min; int i, idx = 0; int xIdx, yIdx = 0, zIdx = 0, zIdx2, renderedSomething=0; int xAxes = 0, yAxes, zAxes; @@ -308,7 +307,7 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport) } else { - vtkFloatingPointType e1[2], e2[2], e3[2]; + double e1[2], e2[2], e3[2]; // Find distance to origin d2Min = VTK_LARGE_FLOAT; @@ -401,7 +400,7 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport) } // Setup the axes for plotting - vtkFloatingPointType xCoords[4], yCoords[4], zCoords[4], xRange[2], yRange[2], zRange[2]; + double xCoords[4], yCoords[4], zCoords[4], xRange[2], yRange[2], zRange[2]; this->AdjustAxes(pts, bounds, idx, xIdx, yIdx, zIdx, zIdx2, xAxes, yAxes, zAxes, xCoords, yCoords, zCoords, xRange, yRange, zRange); @@ -445,19 +444,19 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport) // XCoords coordinates for X grid vtkFloatArray *XCoords = vtkFloatArray::New(); for(int i=0;iInsertNextValue(val); } // YCoords coordinates for Y grid vtkFloatArray *YCoords = vtkFloatArray::New(); for(int i=0;iInsertNextValue(val); } // ZCoords coordinates for Z grid vtkFloatArray *ZCoords = vtkFloatArray::New(); for(int i=0;iInsertNextValue(val); } @@ -473,8 +472,8 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport) rgrid->Delete(); - vtkFloatingPointType aCPosition[3]; - vtkFloatingPointType aCDirection[3]; + double aCPosition[3]; + double aCDirection[3]; this->Camera->GetPosition(aCPosition); this->Camera->GetDirectionOfProjection(aCDirection); @@ -482,12 +481,12 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport) bool replaceXY=false; bool replaceYZ=false; bool replaceXZ=false; - vtkFloatingPointType p[6][3]; // centers of planes - vtkFloatingPointType vecs[6][3]; // 6 vectors from camera position to centers + double p[6][3]; // centers of planes + double vecs[6][3]; // 6 vectors from camera position to centers - vtkFloatingPointType aMiddleX = (XCoords->GetValue(0) + XCoords->GetValue(numOfLabelsX-1))/2; - vtkFloatingPointType aMiddleY = (YCoords->GetValue(0) + YCoords->GetValue(numOfLabelsY-1))/2; - vtkFloatingPointType aMiddleZ = (ZCoords->GetValue(0) + ZCoords->GetValue(numOfLabelsZ-1))/2; + double aMiddleX = (XCoords->GetValue(0) + XCoords->GetValue(numOfLabelsX-1))/2; + double aMiddleY = (YCoords->GetValue(0) + YCoords->GetValue(numOfLabelsY-1))/2; + double aMiddleZ = (ZCoords->GetValue(0) + ZCoords->GetValue(numOfLabelsZ-1))/2; // plane XY p[0][0] = aMiddleX; // plane X=0.5 Y=0.5 Z=0 @@ -539,7 +538,7 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport) YCoords->Delete(); ZCoords->Delete(); - vtkFloatingPointType color[3]; + double color[3]; this->GetProperty()->GetColor(color); this->wireActorXY->GetProperty()->SetColor(color); diff --git a/src/SVTK/SVTK_CubeAxesActor2D.h b/src/SVTK/SVTK_CubeAxesActor2D.h index 5f86853e7..aa8d021e8 100644 --- a/src/SVTK/SVTK_CubeAxesActor2D.h +++ b/src/SVTK/SVTK_CubeAxesActor2D.h @@ -53,7 +53,7 @@ class SVTK_EXPORT SVTK_CubeAxesActor2D : public vtkCubeAxesActor2D #endif { public: - vtkTypeRevisionMacro(SVTK_CubeAxesActor2D,vtkCubeAxesActor2D); + vtkTypeMacro(SVTK_CubeAxesActor2D,vtkCubeAxesActor2D); // Description: // Instantiate object with bold, italic, and shadow enabled; font family diff --git a/src/SVTK/SVTK_CubeAxesDlg.cxx b/src/SVTK/SVTK_CubeAxesDlg.cxx index 74788d878..250d21fa7 100644 --- a/src/SVTK/SVTK_CubeAxesDlg.cxx +++ b/src/SVTK/SVTK_CubeAxesDlg.cxx @@ -89,7 +89,7 @@ bool SVTK_AxisWidget::ReadData(vtkAxisActor2D* theActor) vtkTextProperty* aTitleProp = theActor->GetTitleTextProperty(); if (aTitleProp !=0) { - vtkFloatingPointType c[ 3 ]; + double c[ 3 ]; aTitleProp->GetColor(c); aTitleColor.setRgb((int)(c[ 0 ] * 255), (int)(c[ 1 ] * 255), (int)(c[ 2 ] * 255)); aTitleFontFamily = aTitleProp->GetFontFamily(); @@ -117,7 +117,7 @@ bool SVTK_AxisWidget::ReadData(vtkAxisActor2D* theActor) vtkTextProperty* aLabelsProp = theActor->GetLabelTextProperty(); if (aLabelsProp !=0) { - vtkFloatingPointType c[ 3 ]; + double c[ 3 ]; aLabelsProp->GetColor(c); aLabelsColor.setRgb((int)(c[ 0 ] * 255), (int)(c[ 1 ] * 255), (int)(c[ 2 ] * 255)); aLabelsFontFamily = aLabelsProp->GetFontFamily(); diff --git a/src/SVTK/SVTK_DeviceActor.cxx b/src/SVTK/SVTK_DeviceActor.cxx index fc9d06592..72259a06b 100644 --- a/src/SVTK/SVTK_DeviceActor.cxx +++ b/src/SVTK/SVTK_DeviceActor.cxx @@ -292,7 +292,7 @@ SVTK_DeviceActor /*! \return shrink factor */ -vtkFloatingPointType +double SVTK_DeviceActor ::GetShrinkFactor() { @@ -305,7 +305,7 @@ SVTK_DeviceActor */ void SVTK_DeviceActor -::SetShrinkFactor(vtkFloatingPointType theValue) +::SetShrinkFactor(double theValue) { myShrinkFilter->SetShrinkFactor(theValue); } @@ -373,7 +373,7 @@ SVTK_DeviceActor /*! \return angle of feature edges' filter */ -vtkFloatingPointType +double SVTK_DeviceActor ::GetFeatureEdgesAngle() { @@ -386,7 +386,7 @@ SVTK_DeviceActor */ void SVTK_DeviceActor -::SetFeatureEdgesAngle(vtkFloatingPointType theAngle) +::SetFeatureEdgesAngle(double theAngle) { myFeatureEdges->SetFeatureAngle(theAngle); } @@ -529,7 +529,7 @@ SVTK_DeviceActor /*! \return default point size */ -vtkFloatingPointType +double SVTK_DeviceActor ::GetDefaultPointSize() { @@ -539,7 +539,7 @@ SVTK_DeviceActor /*! \return default line width */ -vtkFloatingPointType +double SVTK_DeviceActor ::GetDefaultLineWidth() { @@ -580,7 +580,7 @@ SVTK_DeviceActor /*! Get coordinates of a node for given object index */ -vtkFloatingPointType* +double* SVTK_DeviceActor ::GetNodeCoord(int theObjID) { @@ -617,7 +617,7 @@ SVTK_DeviceActor { if(myIsResolveCoincidentTopology){ int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology(); - vtkFloatingPointType aFactor, aUnit; + double aFactor, aUnit; vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit); vtkMapper::SetResolveCoincidentTopologyToPolygonOffset(); @@ -638,8 +638,8 @@ SVTK_DeviceActor */ void SVTK_DeviceActor -::SetPolygonOffsetParameters(vtkFloatingPointType factor, - vtkFloatingPointType units) +::SetPolygonOffsetParameters(double factor, + double units) { myPolygonOffsetFactor = factor; myPolygonOffsetUnits = units; @@ -651,8 +651,8 @@ SVTK_DeviceActor */ void SVTK_DeviceActor -::GetPolygonOffsetParameters(vtkFloatingPointType& factor, - vtkFloatingPointType& units) +::GetPolygonOffsetParameters(double& factor, + double& units) { factor = myPolygonOffsetFactor; units = myPolygonOffsetUnits; @@ -679,14 +679,14 @@ bool SVTK_DeviceActor::GetQuadraticArcMode(){ /*! * Set Max angle for representation 2D quadratic element as arked polygon */ -void SVTK_DeviceActor::SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle){ +void SVTK_DeviceActor::SetQuadraticArcAngle(double theMaxAngle){ myGeomFilter->SetQuadraticArcAngle(theMaxAngle); } /*! * Return Max angle of the representation 2D quadratic element as arked polygon */ -vtkFloatingPointType SVTK_DeviceActor::GetQuadraticArcAngle(){ +double SVTK_DeviceActor::GetQuadraticArcAngle(){ return myGeomFilter->GetQuadraticArcAngle(); } diff --git a/src/SVTK/SVTK_DeviceActor.h b/src/SVTK/SVTK_DeviceActor.h index 681f25263..366ed9ae4 100644 --- a/src/SVTK/SVTK_DeviceActor.h +++ b/src/SVTK/SVTK_DeviceActor.h @@ -88,7 +88,7 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor GetNodeObjId(int theVtkID); virtual - vtkFloatingPointType* + double* GetNodeCoord(int theObjID); virtual @@ -111,12 +111,12 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor /** @name For shrink mamnagement purpose */ //@{ - vtkFloatingPointType + double GetShrinkFactor(); virtual void - SetShrinkFactor(vtkFloatingPointType value); + SetShrinkFactor(double value); virtual void @@ -156,12 +156,12 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor SetFeatureEdgesEnabled(bool theIsFeatureEdgesEnabled); virtual - vtkFloatingPointType + double GetFeatureEdgesAngle(); virtual void - SetFeatureEdgesAngle(vtkFloatingPointType theAngle); + SetFeatureEdgesAngle(double theAngle); virtual void @@ -194,11 +194,11 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor GetRepresentation(); virtual - vtkFloatingPointType + double GetDefaultPointSize(); virtual - vtkFloatingPointType + double GetDefaultLineWidth(); bool @@ -239,8 +239,8 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor virtual void SetQuadraticArcMode(bool theFlag); virtual bool GetQuadraticArcMode(); - virtual void SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle); - virtual vtkFloatingPointType GetQuadraticArcAngle(); + virtual void SetQuadraticArcAngle(double theMaxAngle); + virtual double GetQuadraticArcAngle(); virtual void @@ -278,13 +278,13 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor bool myIsFeatureEdgesEnabled; bool myIsResolveCoincidentTopology; - vtkFloatingPointType myPolygonOffsetFactor; - vtkFloatingPointType myPolygonOffsetUnits; + double myPolygonOffsetFactor; + double myPolygonOffsetUnits; - void SetPolygonOffsetParameters(vtkFloatingPointType factor, - vtkFloatingPointType units); - void GetPolygonOffsetParameters(vtkFloatingPointType& factor, - vtkFloatingPointType& units); + void SetPolygonOffsetParameters(double factor, + double units); + void GetPolygonOffsetParameters(double& factor, + double& units); SVTK_DeviceActor(); ~SVTK_DeviceActor(); diff --git a/src/SVTK/SVTK_InteractorStyle.cxx b/src/SVTK/SVTK_InteractorStyle.cxx index 40b784cf9..db068bbbe 100644 --- a/src/SVTK/SVTK_InteractorStyle.cxx +++ b/src/SVTK/SVTK_InteractorStyle.cxx @@ -224,7 +224,7 @@ void SVTK_InteractorStyle::RotateXY(int dx, int dy) if ( myCurrRotationPointType == SVTK::SetRotateGravity ) { - vtkFloatingPointType aCenter[3]; + double aCenter[3]; if ( ComputeBBCenter(GetCurrentRenderer(),aCenter) ) { myRotationPointX = aCenter[0]; @@ -511,7 +511,7 @@ void SVTK_InteractorStyle::OnLeftButtonDown(int ctrl, int shift, if ( aVtkId >= 0 ) { int anObjId = anActor->GetNodeObjId( aVtkId ); - vtkFloatingPointType* aCoords = anActor->GetNodeCoord(anObjId); + double* aCoords = anActor->GetNodeCoord(anObjId); if (myCurrRotationPointType == SVTK::StartPointSelection) { myCurrRotationPointType = SVTK::SetRotateSelected; @@ -810,7 +810,7 @@ void SVTK_InteractorStyle::startPointSelection() if(GetCurrentRenderer() != NULL) { GetCurrentRenderer()->AddActor( myHighlightSelectionPointActor.GetPointer() ); - vtkFloatingPointType aColor[3]; + double aColor[3]; GetCurrentRenderer()->GetBackground( aColor ); myHighlightSelectionPointActor->GetProperty()->SetColor(1. - aColor[0], 1. - aColor[1], @@ -829,7 +829,7 @@ void SVTK_InteractorStyle::startFocalPointSelection() if(GetCurrentRenderer() != NULL) { GetCurrentRenderer()->AddActor( myHighlightSelectionPointActor.GetPointer() ); - vtkFloatingPointType aColor[3]; + double aColor[3]; GetCurrentRenderer()->GetBackground( aColor ); myHighlightSelectionPointActor->GetProperty()->SetColor(1. - aColor[0], 1. - aColor[1], @@ -1313,7 +1313,7 @@ void SVTK_InteractorStyle::TranslateView(int toX, int toY, int fromX, int fromY) vtkCamera *cam = GetCurrentRenderer()->GetActiveCamera(); double viewFocus[4], focalDepth, viewPoint[3]; - vtkFloatingPointType newPickPoint[4], oldPickPoint[4], motionVector[3]; + double newPickPoint[4], oldPickPoint[4], motionVector[3]; cam->GetFocalPoint(viewFocus); this->ComputeWorldToDisplay(viewFocus[0], viewFocus[1], @@ -1414,7 +1414,7 @@ void SVTK_InteractorStyle::OnTimer() // check if bounding box was changed if ( GetCurrentRenderer() ) { - vtkFloatingPointType aCurrBBCenter[3]; + double aCurrBBCenter[3]; if ( ComputeBBCenter(GetCurrentRenderer(),aCurrBBCenter) ) { if ( !myBBFirstCheck ) @@ -1516,8 +1516,8 @@ void SVTK_InteractorStyle::ProcessEvents( vtkObject* object, vtkObject* anObject = reinterpret_cast( clientData ); SVTK_InteractorStyle* self = dynamic_cast( anObject ); int aSpeedIncrement=self->ControllerIncrement()->Current(); - vtkFloatingPointType aCenter[3]; - vtkFloatingPointType* aSelectedPoint; + double aCenter[3]; + double* aSelectedPoint; if ( self ) { switch ( event ) { case SVTK::SpaceMouseMoveEvent : @@ -1620,7 +1620,7 @@ void SVTK_InteractorStyle::ProcessEvents( vtkObject* object, } self->myPrevRotationPointType = self->myCurrRotationPointType; self->myCurrRotationPointType = SVTK::SetRotateSelected; - aSelectedPoint = (vtkFloatingPointType*)callData; + aSelectedPoint = (double*)callData; self->myRotationPointX = aSelectedPoint[0]; self->myRotationPointY = aSelectedPoint[1]; self->myRotationPointZ = aSelectedPoint[2]; diff --git a/src/SVTK/SVTK_InteractorStyle.h b/src/SVTK/SVTK_InteractorStyle.h index 38c7278a7..e862ee9b2 100644 --- a/src/SVTK/SVTK_InteractorStyle.h +++ b/src/SVTK/SVTK_InteractorStyle.h @@ -354,7 +354,7 @@ class SVTK_EXPORT SVTK_InteractorStyle: public vtkInteractorStyle vtkSmartPointer myHighlightSelectionPointActor; vtkSmartPointer myPointPicker; - vtkFloatingPointType myBBCenter[3]; + double myBBCenter[3]; bool myBBFirstCheck; QRubberBand* myRectBand; //!< selection rectangle rubber band diff --git a/src/SVTK/SVTK_Recorder.cxx b/src/SVTK/SVTK_Recorder.cxx index 6438a70fc..afd6866cc 100755 --- a/src/SVTK/SVTK_Recorder.cxx +++ b/src/SVTK/SVTK_Recorder.cxx @@ -68,7 +68,6 @@ namespace } //---------------------------------------------------------------------------- -vtkCxxRevisionMacro(SVTK_Recorder,"$Revision$"); vtkStandardNewMacro(SVTK_Recorder); diff --git a/src/SVTK/SVTK_Recorder.h b/src/SVTK/SVTK_Recorder.h index bfc2aaced..1bf266442 100755 --- a/src/SVTK/SVTK_Recorder.h +++ b/src/SVTK/SVTK_Recorder.h @@ -42,7 +42,7 @@ class SVTK_Recorder : public vtkObject public: static SVTK_Recorder *New(); - vtkTypeRevisionMacro(SVTK_Recorder,vtkObject); + vtkTypeMacro(SVTK_Recorder,vtkObject); void SetRenderWindow(vtkRenderWindow* theRenderWindow); diff --git a/src/SVTK/SVTK_RectPicker.cxx b/src/SVTK/SVTK_RectPicker.cxx index 77640da9d..820ed717f 100644 --- a/src/SVTK/SVTK_RectPicker.cxx +++ b/src/SVTK/SVTK_RectPicker.cxx @@ -51,7 +51,7 @@ namespace { //---------------------------------------------------------------------------- inline - vtkFloatingPointType + double GetZ(float* theZPtr, int theSelection[4], int theDX, @@ -66,13 +66,13 @@ namespace int Check(float* theZPtr, int theSelection[4], - vtkFloatingPointType theTolerance, - vtkFloatingPointType theDZ, + double theTolerance, + double theDZ, int theDX, int theDY) { int aRet = 0; - vtkFloatingPointType aZ = -1.0; + double aZ = -1.0; if(theDX >= theSelection[0] && theDX <= theSelection[2] && theDY >= theSelection[1] && theDY <= theSelection[3]) { @@ -97,7 +97,7 @@ namespace vtkDataSet *theInput, SVTK_RectPicker::TVectorIds& theVisibleIds, SVTK_RectPicker::TVectorIds& theInVisibleIds, - vtkFloatingPointType theTolerance) + double theTolerance) { theVisibleIds.clear(); theInVisibleIds.clear(); @@ -140,10 +140,10 @@ namespace for(vtkIdType aPntId = 0; aPntId < aNumPts; aPntId++){ // perform conversion - vtkFloatingPointType aX[4] = {1.0, 1.0, 1.0, 1.0}; + double aX[4] = {1.0, 1.0, 1.0, 1.0}; theInput->GetPoint(aPntId,aX); - vtkFloatingPointType aView[4]; + double aView[4]; aMatrix->MultiplyPoint(aX,aView); if(aView[3] == 0.0) continue; @@ -152,7 +152,7 @@ namespace aView[2]/aView[3]); theRenderer->ViewToDisplay(); - vtkFloatingPointType aDX[3]; + double aDX[3]; theRenderer->GetDisplayPoint(aDX); // check whether visible and in selection window @@ -218,8 +218,8 @@ namespace //---------------------------------------------------------------------------- inline void - GetCenter(const vtkFloatingPointType theBounds[6], - vtkFloatingPointType theCenter[3]) + GetCenter(const double theBounds[6], + double theCenter[3]) { theCenter[0] = (theBounds[1] + theBounds[0]) / 2.0; theCenter[1] = (theBounds[3] + theBounds[2]) / 2.0; @@ -231,7 +231,7 @@ namespace vtkRenderer *theRenderer, vtkDataSet *theInput, SVTK_RectPicker::TVectorIds& theVectorIds, - vtkFloatingPointType theTolerance) + double theTolerance) { theVectorIds.clear(); @@ -266,14 +266,14 @@ namespace for(vtkIdType aCellId = 0; aCellId < aNumCells; aCellId++){ vtkCell* aCell = theInput->GetCell(aCellId); - vtkFloatingPointType aBounds[6]; + double aBounds[6]; aCell->GetBounds(aBounds); - vtkFloatingPointType aCenter[3]; + double aCenter[3]; GetCenter(aBounds,aCenter); - vtkFloatingPointType aView[4]; - vtkFloatingPointType aX[4] = {aCenter[0], aCenter[1], aCenter[2], 1.0}; + double aView[4]; + double aX[4] = {aCenter[0], aCenter[1], aCenter[2], 1.0}; aMatrix->MultiplyPoint(aX,aView); if(aView[3] == 0.0) @@ -284,7 +284,7 @@ namespace aView[2]/aView[3]); theRenderer->ViewToDisplay(); - vtkFloatingPointType aDX[3]; + double aDX[3]; theRenderer->GetDisplayPoint(aDX); // check whether visible and in selection window @@ -312,16 +312,16 @@ namespace //---------------------------------------------------------------------------- void CalculatePickPosition(vtkRenderer *theRenderer, - vtkFloatingPointType theSelectionX, - vtkFloatingPointType theSelectionY, - vtkFloatingPointType theSelectionZ, - vtkFloatingPointType thePickPosition[3]) + double theSelectionX, + double theSelectionY, + double theSelectionZ, + double thePickPosition[3]) { // Convert the selection point into world coordinates. // theRenderer->SetDisplayPoint(theSelectionX, theSelectionY, theSelectionZ); theRenderer->DisplayToWorld(); - vtkFloatingPointType* aWorldCoords = theRenderer->GetWorldPoint(); + double* aWorldCoords = theRenderer->GetWorldPoint(); if ( aWorldCoords[3] != 0.0 ) { for (int i=0; i < 3; i++) { thePickPosition[i] = aWorldCoords[i] / aWorldCoords[3]; @@ -345,9 +345,9 @@ SVTK_RectPicker int SVTK_RectPicker -::Pick(vtkFloatingPointType, - vtkFloatingPointType, - vtkFloatingPointType, +::Pick(double, + double, + double, vtkRenderer*) { return 0; @@ -355,8 +355,8 @@ SVTK_RectPicker int SVTK_RectPicker -::Pick(vtkFloatingPointType theSelection[3], - vtkFloatingPointType theSelection2[3], +::Pick(double theSelection[3], + double theSelection2[3], vtkRenderer *theRenderer) { return Pick(theSelection[0], theSelection[1], theSelection[2], @@ -366,12 +366,12 @@ SVTK_RectPicker int SVTK_RectPicker -::Pick(vtkFloatingPointType theSelectionX, - vtkFloatingPointType theSelectionY, - vtkFloatingPointType theSelectionZ, - vtkFloatingPointType theSelectionX2, - vtkFloatingPointType theSelectionY2, - vtkFloatingPointType theSelectionZ2, +::Pick(double theSelectionX, + double theSelectionY, + double theSelectionZ, + double theSelectionX2, + double theSelectionY2, + double theSelectionZ2, vtkRenderer *theRenderer) { // Initialize picking process @@ -385,14 +385,14 @@ SVTK_RectPicker // vtkCamera* aCamera = theRenderer->GetActiveCamera(); - vtkFloatingPointType aCameraFP[4]; + double aCameraFP[4]; aCamera->GetFocalPoint(aCameraFP); aCameraFP[3] = 1.0; theRenderer->SetWorldPoint(aCameraFP); theRenderer->WorldToDisplay(); - vtkFloatingPointType* aDisplayCoords = theRenderer->GetDisplayPoint(); - vtkFloatingPointType aSelectionZ = aDisplayCoords[2]; + double* aDisplayCoords = theRenderer->GetDisplayPoint(); + double aSelectionZ = aDisplayCoords[2]; this->SelectionPoint[0] = theSelectionX; this->SelectionPoint[1] = theSelectionY; diff --git a/src/SVTK/SVTK_RectPicker.h b/src/SVTK/SVTK_RectPicker.h index 1e9975e94..7cede5321 100644 --- a/src/SVTK/SVTK_RectPicker.h +++ b/src/SVTK/SVTK_RectPicker.h @@ -61,8 +61,8 @@ class SVTK_EXPORT SVTK_RectPicker : public vtkAbstractPropPicker as fraction of rendering window size. (Rendering window size is measured across diagonal.) */ - vtkSetMacro(Tolerance,vtkFloatingPointType); - vtkGetMacro(Tolerance,vtkFloatingPointType); + vtkSetMacro(Tolerance,double); + vtkGetMacro(Tolerance,double); //! Use these methods to pick points or points and cells vtkSetMacro(PickPoints,int); @@ -71,17 +71,17 @@ class SVTK_EXPORT SVTK_RectPicker : public vtkAbstractPropPicker virtual int - Pick(vtkFloatingPointType theSelectionX, - vtkFloatingPointType theSelectionY, - vtkFloatingPointType theSelectionZ, - vtkFloatingPointType theSelectionX2, - vtkFloatingPointType theSelectionY2, - vtkFloatingPointType theSelectionZ2, + Pick(double theSelectionX, + double theSelectionY, + double theSelectionZ, + double theSelectionX2, + double theSelectionY2, + double theSelectionZ2, vtkRenderer *theRenderer); int - Pick(vtkFloatingPointType theSelection[3], - vtkFloatingPointType theSelection2[3], + Pick(double theSelection[3], + double theSelection2[3], vtkRenderer *theRenderer); typedef std::vector TVectorIds; @@ -98,16 +98,16 @@ class SVTK_EXPORT SVTK_RectPicker : public vtkAbstractPropPicker ~SVTK_RectPicker(); //! tolerance for computation (% of window) - vtkFloatingPointType Tolerance; + double Tolerance; //! use the following to control picking mode int PickPoints; //! second rectangle selection point in window (pixel) coordinates - vtkFloatingPointType SelectionPoint2[3]; + double SelectionPoint2[3]; //! second rectangle selection point in world coordinates - vtkFloatingPointType PickPosition2[3]; + double PickPosition2[3]; TVectorIdsMap myPointIdsMap; TVectorIdsMap myCellIdsMap; @@ -115,9 +115,9 @@ class SVTK_EXPORT SVTK_RectPicker : public vtkAbstractPropPicker private: virtual int - Pick(vtkFloatingPointType, - vtkFloatingPointType, - vtkFloatingPointType, + Pick(double, + double, + double, vtkRenderer*); }; diff --git a/src/SVTK/SVTK_Renderer.cxx b/src/SVTK/SVTK_Renderer.cxx index 6584727de..d0417b2d1 100644 --- a/src/SVTK/SVTK_Renderer.cxx +++ b/src/SVTK/SVTK_Renderer.cxx @@ -382,7 +382,7 @@ SVTK_Renderer inline bool -CheckBndBox(const vtkFloatingPointType theBounds[6]) +CheckBndBox(const double theBounds[6]) { if(theBounds[0] > -VTK_LARGE_FLOAT && theBounds[1] < VTK_LARGE_FLOAT && theBounds[2] > -VTK_LARGE_FLOAT && theBounds[3] < VTK_LARGE_FLOAT && @@ -401,7 +401,7 @@ SVTK_Renderer bool aTDisplayed = IsTrihedronDisplayed(); bool aCDisplayed = IsCubeAxesDisplayed(); - vtkFloatingPointType aNewBndBox[6]; + double aNewBndBox[6]; aNewBndBox[ 0 ] = aNewBndBox[ 2 ] = aNewBndBox[ 4 ] = VTK_LARGE_FLOAT; aNewBndBox[ 1 ] = aNewBndBox[ 3 ] = aNewBndBox[ 5 ] = -VTK_LARGE_FLOAT; @@ -414,7 +414,7 @@ SVTK_Renderer myCubeAxes->VisibilityOff(); // if the new trihedron size have sufficient difference, then apply the value - vtkFloatingPointType aSize = myTrihedron->GetSize(); + double aSize = myTrihedron->GetSize(); if ( IsTrihedronRelative() ) { ComputeTrihedronSize(GetDevice(),aSize,aSize,myTrihedronSize); @@ -432,7 +432,7 @@ SVTK_Renderer if(anActor->IsResizable()) anActor->SetSize(0.5*aSize); if(anActor->GetVisibility() && !anActor->IsInfinitive()){ - vtkFloatingPointType *aBounds = anActor->GetBounds(); + double *aBounds = anActor->GetBounds(); if(CheckBndBox(aBounds)) for(int i = 0; i < 5; i = i + 2){ if(aBounds[i] < aNewBndBox[i]) @@ -485,7 +485,7 @@ SVTK_Renderer */ void SVTK_Renderer -::SetTrihedronSize(vtkFloatingPointType theSize, const bool theRelative) +::SetTrihedronSize(double theSize, const bool theRelative) { if(myTrihedronSize != theSize || myIsTrihedronRelative != theRelative){ myTrihedronSize = theSize; @@ -497,7 +497,7 @@ SVTK_Renderer /*! \return size of the trihedron in percents from bounding box of the scene */ -vtkFloatingPointType +double SVTK_Renderer ::GetTrihedronSize() const { @@ -629,7 +629,7 @@ SVTK_Renderer else myCubeAxes->VisibilityOff(); - static vtkFloatingPointType aCoeff = 3.0; + static double aCoeff = 3.0; aCamera->SetParallelScale(aCoeff*aCamera->GetParallelScale()); } diff --git a/src/SVTK/SVTK_Renderer.h b/src/SVTK/SVTK_Renderer.h index edf79ada1..b5725ddcd 100644 --- a/src/SVTK/SVTK_Renderer.h +++ b/src/SVTK/SVTK_Renderer.h @@ -130,10 +130,10 @@ class SVTK_EXPORT SVTK_Renderer : public vtkObject //! Set size of the trihedron in percents from bounding box of the scene void - SetTrihedronSize(vtkFloatingPointType theSize, const bool theRelative = true); + SetTrihedronSize(double theSize, const bool theRelative = true); //! Get size of the trihedron in percents from bounding box of the scene - vtkFloatingPointType + double GetTrihedronSize() const; //! Shows if the size of the trihedron is relative @@ -218,7 +218,7 @@ protected: //---------------------------------------------------------------------------- // Priority at which events are processed - vtkFloatingPointType myPriority; + double myPriority; // Used to process events vtkSmartPointer myEventCallbackCommand; @@ -251,9 +251,9 @@ protected: //---------------------------------------------------------------------------- vtkSmartPointer myCubeAxes; vtkSmartPointer myTrihedron; - vtkFloatingPointType myTrihedronSize; + double myTrihedronSize; bool myIsTrihedronRelative; - vtkFloatingPointType myBndBox[6]; + double myBndBox[6]; }; #ifdef WIN32 diff --git a/src/SVTK/SVTK_SetRotationPointDlg.cxx b/src/SVTK/SVTK_SetRotationPointDlg.cxx index 174a6bae0..1fa5817e1 100755 --- a/src/SVTK/SVTK_SetRotationPointDlg.cxx +++ b/src/SVTK/SVTK_SetRotationPointDlg.cxx @@ -211,7 +211,7 @@ SVTK_SetRotationPointDlg void* theCallData) { SVTK_SetRotationPointDlg* self = reinterpret_cast(theClientData); - vtkFloatingPointType* aCoord = (vtkFloatingPointType*)theCallData; + double* aCoord = (double*)theCallData; switch ( theEvent ) { case SVTK::BBCenterChanged: @@ -310,7 +310,7 @@ SVTK_SetRotationPointDlg && ( myX->hasFocus() || myY->hasFocus() || myZ->hasFocus() ) ) mySelectPoint->toggle(); - vtkFloatingPointType aCenter[3] = {myX->text().toDouble(), + double aCenter[3] = {myX->text().toDouble(), myY->text().toDouble(), myZ->text().toDouble()}; myMainWindow->activateSetRotationSelected((void*)aCenter); diff --git a/src/SVTK/SVTK_SetRotationPointDlg.h b/src/SVTK/SVTK_SetRotationPointDlg.h index ab49b055a..99ad41c75 100755 --- a/src/SVTK/SVTK_SetRotationPointDlg.h +++ b/src/SVTK/SVTK_SetRotationPointDlg.h @@ -80,7 +80,7 @@ protected: //---------------------------------------------------------------------------- // Priority at which events are processed - vtkFloatingPointType myPriority; + double myPriority; // Used to process events vtkSmartPointer myEventCallbackCommand; diff --git a/src/SVTK/SVTK_UpdateRateDlg.cxx b/src/SVTK/SVTK_UpdateRateDlg.cxx index 48e580fa2..db86100bf 100644 --- a/src/SVTK/SVTK_UpdateRateDlg.cxx +++ b/src/SVTK/SVTK_UpdateRateDlg.cxx @@ -49,8 +49,8 @@ #include #include -static vtkFloatingPointType OFF_UPDATE_RATE = 0.00001; -static vtkFloatingPointType FLOAT_TOLERANCE = 1.0 / VTK_LARGE_FLOAT; +static double OFF_UPDATE_RATE = 0.00001; +static double FLOAT_TOLERANCE = 1.0 / VTK_LARGE_FLOAT; namespace { @@ -60,10 +60,10 @@ namespace GetUpdateRate(SVTK_RenderWindowInteractor* theRWInteractor) { if(vtkRenderer *aRenderer = theRWInteractor->getRenderer()){ - vtkFloatingPointType aLastRenderTimeInSeconds = aRenderer->GetLastRenderTimeInSeconds(); + double aLastRenderTimeInSeconds = aRenderer->GetLastRenderTimeInSeconds(); if(aLastRenderTimeInSeconds > FLOAT_TOLERANCE){ std::ostringstream aStr; - vtkFloatingPointType aFPS = 1.0 / aLastRenderTimeInSeconds; + double aFPS = 1.0 / aLastRenderTimeInSeconds; aStr<getRenderer()){ VTK::ActorCollectionCopy aCopy(aRenderer->GetActors()); @@ -332,7 +332,7 @@ SVTK_UpdateRateDlg { vtkRenderWindowInteractor* aRWI = myRWInteractor->GetDevice(); - vtkFloatingPointType anUpdateRate; + double anUpdateRate; if(myIsEnableUpdateRateGroupBox->isChecked()){ anUpdateRate = AdjustUpdateRate(myRWInteractor,myDesiredUpdateRateSblSpinBox->value()); aRWI->SetDesiredUpdateRate(anUpdateRate); diff --git a/src/SVTK/SVTK_UpdateRateDlg.h b/src/SVTK/SVTK_UpdateRateDlg.h index 385a3874f..c698b3b8c 100644 --- a/src/SVTK/SVTK_UpdateRateDlg.h +++ b/src/SVTK/SVTK_UpdateRateDlg.h @@ -70,7 +70,7 @@ protected: //---------------------------------------------------------------------------- // Priority at which events are processed - vtkFloatingPointType myPriority; + double myPriority; // Used to process events vtkSmartPointer myEventCallbackCommand; diff --git a/src/SVTK/SVTK_View.cxx b/src/SVTK/SVTK_View.cxx index 5f52ea604..23b2bcf85 100644 --- a/src/SVTK/SVTK_View.cxx +++ b/src/SVTK/SVTK_View.cxx @@ -691,12 +691,12 @@ SVTK_View ::SetTransparency(const Handle(SALOME_InteractiveObject)& theIObject, float theTrans) { - vtkFloatingPointType anOpacity = 1.0 - theTrans; + double anOpacity = 1.0 - theTrans; using namespace SVTK; VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); ForEachIf(aCopy.GetActors(), TIsSameIObject(theIObject), - TSetFunction + TSetFunction (&SALOME_Actor::SetOpacity,anOpacity)); } @@ -710,13 +710,13 @@ SVTK_View ::SetColor(const Handle(SALOME_InteractiveObject)& theIObject, const QColor& theColor) { - vtkFloatingPointType aColor[3] = {theColor.red()/255., theColor.green()/255., theColor.blue()/255.}; + double aColor[3] = {theColor.red()/255., theColor.green()/255., theColor.blue()/255.}; using namespace SVTK; VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); ForEachIf(aCopy.GetActors(), TIsSameIObject(theIObject), - TSetFunction + TSetFunction (&SALOME_Actor::SetColor,aColor)); } @@ -735,7 +735,7 @@ SVTK_View Find(aCopy.GetActors(), TIsSameIObject(theIObject)); if(anActor){ - vtkFloatingPointType r,g,b; + double r,g,b; anActor->GetColor(r,g,b); return QColor(int(r*255),int(g*255),int(b*255)); } diff --git a/src/SVTK/SVTK_ViewModel.cxx b/src/SVTK/SVTK_ViewModel.cxx index e8ab93171..ce7699715 100644 --- a/src/SVTK/SVTK_ViewModel.cxx +++ b/src/SVTK/SVTK_ViewModel.cxx @@ -193,7 +193,7 @@ SUIT_ViewWindow* SVTK_Viewer::createView( SUIT_Desktop* theDesktop ) /*! \return trihedron size */ -vtkFloatingPointType SVTK_Viewer::trihedronSize() const +double SVTK_Viewer::trihedronSize() const { return myTrihedronSize; } @@ -211,7 +211,7 @@ bool SVTK_Viewer::trihedronRelative() const \param theSize - new size \param theRelative - new relativeness */ -void SVTK_Viewer::setTrihedronSize( const vtkFloatingPointType theSize, const bool theRelative ) +void SVTK_Viewer::setTrihedronSize( const double theSize, const bool theRelative ) { myTrihedronSize = theSize; myTrihedronRelative = theRelative; diff --git a/src/SVTK/SVTK_ViewModel.h b/src/SVTK/SVTK_ViewModel.h index b06714265..cea0ee1ab 100644 --- a/src/SVTK/SVTK_ViewModel.h +++ b/src/SVTK/SVTK_ViewModel.h @@ -93,13 +93,13 @@ public: void setBackground( const Qtx::BackgroundData& ); //! Get size of trihedron of the viewer (see #SVTK_Renderer::SetTrihedronSize) - vtkFloatingPointType trihedronSize() const; + double trihedronSize() const; //! Shows if the size of trihedron relative (see #SVTK_Renderer::SetTrihedronSize) bool trihedronRelative() const; //! Set size of trihedron of the viewer (see #SVTK_Renderer::SetTrihedronSize) - void setTrihedronSize( const vtkFloatingPointType, const bool = true ); + void setTrihedronSize( const double, const bool = true ); //! Get visibility status of the static trihedron bool isStaticTrihedronVisible() const; @@ -197,7 +197,7 @@ private: void updateToolBars(); Qtx::BackgroundData myDefaultBackground; - vtkFloatingPointType myTrihedronSize; + double myTrihedronSize; bool myTrihedronRelative; bool myIsStaticTrihedronVisible; bool mySelectionEnabled; diff --git a/src/SVTK/SVTK_ViewParameterDlg.cxx b/src/SVTK/SVTK_ViewParameterDlg.cxx index c0a7091b4..f004e6208 100755 --- a/src/SVTK/SVTK_ViewParameterDlg.cxx +++ b/src/SVTK/SVTK_ViewParameterDlg.cxx @@ -414,12 +414,12 @@ void SVTK_ViewParameterDlg::ProcessEvents(vtkObject* vtkNotUsed(theObject), void* theCallData) { SVTK_ViewParameterDlg* self = reinterpret_cast(theClientData); - vtkFloatingPointType* aCoord; + double* aCoord; switch ( theEvent ) { case SVTK::FocalPointChanged: if ( theCallData ) { - aCoord = (vtkFloatingPointType*)theCallData; + aCoord = (double*)theCallData; self->myBusy = true; self->myFocalX->setText( QString::number(aCoord[0]) ); self->myFocalY->setText( QString::number(aCoord[1]) ); diff --git a/src/SVTK/SVTK_ViewParameterDlg.h b/src/SVTK/SVTK_ViewParameterDlg.h index a4ef4fe28..3e20f87b7 100755 --- a/src/SVTK/SVTK_ViewParameterDlg.h +++ b/src/SVTK/SVTK_ViewParameterDlg.h @@ -110,7 +110,7 @@ protected: //---------------------------------------------------------------------------- // Priority at which events are processed - vtkFloatingPointType myPriority; + double myPriority; // Used to process events vtkSmartPointer myEventCallbackCommand; diff --git a/src/SVTK/SVTK_ViewWindow.cxx b/src/SVTK/SVTK_ViewWindow.cxx index 9aeea12b3..9f1878a26 100755 --- a/src/SVTK/SVTK_ViewWindow.cxx +++ b/src/SVTK/SVTK_ViewWindow.cxx @@ -830,7 +830,7 @@ SVTK_CubeAxesActor2D* SVTK_ViewWindow::GetCubeAxes() /*! \return trihedron size */ -vtkFloatingPointType SVTK_ViewWindow::GetTrihedronSize() const +double SVTK_ViewWindow::GetTrihedronSize() const { return GetRenderer()->GetTrihedronSize(); } @@ -997,7 +997,7 @@ void SVTK_ViewWindow::SetSpacemouseButtons(const int theBtn1, \param theSize - new trihedron size \param theRelative - trihedron relativeness */ -void SVTK_ViewWindow::SetTrihedronSize(const vtkFloatingPointType theSize, const bool theRelative) +void SVTK_ViewWindow::SetTrihedronSize(const double theSize, const bool theRelative) { GetRenderer()->SetTrihedronSize(theSize, theRelative); Repaint(); @@ -1305,7 +1305,7 @@ void getGradAxisVisualParams( QXmlStreamWriter& writer, vtkAxisActor2D* actor, Q // Name bool isVisible = actor->GetTitleVisibility(); QString title ( actor->GetTitle() ); - vtkFloatingPointType color[ 3 ]; + double color[ 3 ]; int font = VTK_ARIAL; int bold = 0; int italic = 0; @@ -1419,7 +1419,7 @@ void setGradAxisVisualParams(QXmlStreamReader& reader, vtkAxisActor2D* actor) // Read title color aAttr = reader.attributes(); - vtkFloatingPointType color[3]; + double color[3]; color[0] = aAttr.value("R").toString().toDouble(); color[1] = aAttr.value("G").toString().toDouble(); color[2] = aAttr.value("B").toString().toDouble(); @@ -1501,7 +1501,7 @@ void setGradAxisVisualParams( vtkAxisActor2D* actor, const QString& params ) // retrieve and set name parameters bool isVisible = paramsLst[2].toUShort(); QString title = paramsLst[3]; - vtkFloatingPointType color[3]; + double color[3]; color[0] = paramsLst[4].toDouble(); color[1] = paramsLst[5].toDouble(); color[2] = paramsLst[6].toDouble(); diff --git a/src/SVTK/SVTK_ViewWindow.h b/src/SVTK/SVTK_ViewWindow.h index abca4207a..0285a0c17 100755 --- a/src/SVTK/SVTK_ViewWindow.h +++ b/src/SVTK/SVTK_ViewWindow.h @@ -217,10 +217,10 @@ class SVTK_EXPORT SVTK_ViewWindow : public SUIT_ViewWindow SVTK_CubeAxesActor2D* GetCubeAxes(); //! Redirect the request to #SVTK_Renderer::GetTrihedronSize - vtkFloatingPointType GetTrihedronSize() const; + double GetTrihedronSize() const; //! Redirect the request to #SVTK_Renderer::SetTrihedronSize - virtual void SetTrihedronSize( const vtkFloatingPointType, const bool = true ); + virtual void SetTrihedronSize( const double, const bool = true ); //! Set incremental speed virtual void SetIncrementalSpeed( const int, const int = 0 ); diff --git a/src/SVTK/vtkPVAxesActor.cxx b/src/SVTK/vtkPVAxesActor.cxx index 25f471f24..cac96a21b 100644 --- a/src/SVTK/vtkPVAxesActor.cxx +++ b/src/SVTK/vtkPVAxesActor.cxx @@ -50,7 +50,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -vtkCxxRevisionMacro(vtkPVAxesActor, "$Revision$"); vtkStandardNewMacro(vtkPVAxesActor); vtkCxxSetObjectMacro( vtkPVAxesActor, UserDefinedTip, vtkPolyData ); diff --git a/src/SVTK/vtkPVAxesActor.h b/src/SVTK/vtkPVAxesActor.h index 8b9d329cc..9188f48d7 100644 --- a/src/SVTK/vtkPVAxesActor.h +++ b/src/SVTK/vtkPVAxesActor.h @@ -60,7 +60,7 @@ class SVTK_EXPORT vtkPVAxesActor : public vtkProp3D { public: static vtkPVAxesActor *New(); - vtkTypeRevisionMacro(vtkPVAxesActor,vtkProp3D); + vtkTypeMacro(vtkPVAxesActor,vtkProp3D); void PrintSelf(ostream& os, vtkIndent indent); diff --git a/src/SVTK/vtkPVAxesWidget.cxx b/src/SVTK/vtkPVAxesWidget.cxx index 42d80002b..e29c710c3 100644 --- a/src/SVTK/vtkPVAxesWidget.cxx +++ b/src/SVTK/vtkPVAxesWidget.cxx @@ -47,7 +47,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "vtkRenderWindowInteractor.h" vtkStandardNewMacro(vtkPVAxesWidget); -vtkCxxRevisionMacro(vtkPVAxesWidget, "$Revision$"); vtkCxxSetObjectMacro(vtkPVAxesWidget, AxesActor, vtkPVAxesActor); vtkCxxSetObjectMacro(vtkPVAxesWidget, ParentRenderer, vtkRenderer); diff --git a/src/SVTK/vtkPVAxesWidget.h b/src/SVTK/vtkPVAxesWidget.h index 35c152a94..cc2bba8e1 100644 --- a/src/SVTK/vtkPVAxesWidget.h +++ b/src/SVTK/vtkPVAxesWidget.h @@ -52,7 +52,7 @@ class SVTK_EXPORT vtkPVAxesWidget : public vtkInteractorObserver { public: static vtkPVAxesWidget* New(); - vtkTypeRevisionMacro(vtkPVAxesWidget, vtkInteractorObserver); + vtkTypeMacro(vtkPVAxesWidget, vtkInteractorObserver); void PrintSelf(ostream& os, vtkIndent indent); // Description: diff --git a/src/VTKViewer/VTKViewer.h b/src/VTKViewer/VTKViewer.h index c7f5efc5f..37af4e225 100755 --- a/src/VTKViewer/VTKViewer.h +++ b/src/VTKViewer/VTKViewer.h @@ -33,11 +33,4 @@ # define VTKVIEWER_EXPORT #endif -#include - -#if !defined(vtkFloatingPointType) -# define vtkFloatingPointType vtkFloatingPointType - typedef float vtkFloatingPointType; -#endif - #endif diff --git a/src/VTKViewer/VTKViewer_Actor.cxx b/src/VTKViewer/VTKViewer_Actor.cxx index d206110c9..5c21dc552 100755 --- a/src/VTKViewer/VTKViewer_Actor.cxx +++ b/src/VTKViewer/VTKViewer_Actor.cxx @@ -217,7 +217,7 @@ VTKViewer_Actor ::Render(vtkRenderer *ren, vtkMapper* m) { if(vtkDataSet* aDataSet = GetInput()){ - static vtkFloatingPointType PERCENTS_OF_DETAILS = 0.50; + static double PERCENTS_OF_DETAILS = 0.50; vtkIdType aNbOfPoints = vtkIdType(aDataSet->GetNumberOfPoints()*PERCENTS_OF_DETAILS); if(aNbOfPoints > 0) SetNumberOfCloudPoints(aNbOfPoints); @@ -225,7 +225,7 @@ VTKViewer_Actor if(myIsResolveCoincidentTopology){ int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology(); - vtkFloatingPointType aFactor, aUnit; + double aFactor, aUnit; vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit); vtkMapper::SetResolveCoincidentTopologyToPolygonOffset(); @@ -257,8 +257,8 @@ VTKViewer_Actor */ void VTKViewer_Actor -::SetPolygonOffsetParameters(vtkFloatingPointType factor, - vtkFloatingPointType units) +::SetPolygonOffsetParameters(double factor, + double units) { myPolygonOffsetFactor = factor; myPolygonOffsetUnits = units; @@ -270,8 +270,8 @@ VTKViewer_Actor */ void VTKViewer_Actor -::GetPolygonOffsetParameters(vtkFloatingPointType& factor, - vtkFloatingPointType& units) +::GetPolygonOffsetParameters(double& factor, + double& units) { factor = myPolygonOffsetFactor; units = myPolygonOffsetUnits; @@ -280,7 +280,7 @@ VTKViewer_Actor /*! \return shrink factor */ -vtkFloatingPointType +double VTKViewer_Actor ::GetShrinkFactor() { @@ -434,7 +434,7 @@ VTKViewer_Actor /*! Get coordinates of a node for given object index */ -vtkFloatingPointType* +double* VTKViewer_Actor ::GetNodeCoord(int theObjID) { @@ -495,14 +495,14 @@ VTKViewer_Actor if(myIsInfinite) return true; - static vtkFloatingPointType MAX_DISTANCE = 0.9*VTK_LARGE_FLOAT; - vtkFloatingPointType aBounds[6]; + static double MAX_DISTANCE = 0.9*VTK_LARGE_FLOAT; + double aBounds[6]; GetBounds(aBounds); for(int i = 0; i < 6; i++) if(fabs(aBounds[i]) > MAX_DISTANCE) return true; - static vtkFloatingPointType MIN_DISTANCE = 1.0/VTK_LARGE_FLOAT; + static double MIN_DISTANCE = 1.0/VTK_LARGE_FLOAT; if(GetLength() < MIN_DISTANCE) return true; @@ -512,7 +512,7 @@ VTKViewer_Actor /*! \return current bounding box */ -vtkFloatingPointType* +double* VTKViewer_Actor ::GetBounds() { @@ -525,7 +525,7 @@ VTKViewer_Actor */ void VTKViewer_Actor -::GetBounds(vtkFloatingPointType theBounds[6]) +::GetBounds(double theBounds[6]) { Superclass::GetBounds(theBounds); } @@ -547,7 +547,7 @@ VTKViewer_Actor void VTKViewer_Actor -::SetSize( const vtkFloatingPointType ) +::SetSize( const double ) {} @@ -559,13 +559,13 @@ VTKViewer_Actor void VTKViewer_Actor -::SetOpacity(vtkFloatingPointType theOpacity) +::SetOpacity(double theOpacity) { myOpacity = theOpacity; GetProperty()->SetOpacity(theOpacity); } -vtkFloatingPointType +double VTKViewer_Actor ::GetOpacity() { @@ -578,9 +578,9 @@ VTKViewer_Actor */ void VTKViewer_Actor -::SetColor(vtkFloatingPointType r, - vtkFloatingPointType g, - vtkFloatingPointType b) +::SetColor(double r, + double g, + double b) { GetProperty()->SetColor(r,g,b); } @@ -590,7 +590,7 @@ VTKViewer_Actor */ void VTKViewer_Actor -::SetColor(const vtkFloatingPointType theRGB[3]) +::SetColor(const double theRGB[3]) { SetColor(theRGB[0],theRGB[1],theRGB[2]); } @@ -600,11 +600,11 @@ VTKViewer_Actor */ void VTKViewer_Actor -::GetColor(vtkFloatingPointType& r, - vtkFloatingPointType& g, - vtkFloatingPointType& b) +::GetColor(double& r, + double& g, + double& b) { - vtkFloatingPointType aColor[3]; + double aColor[3]; GetProperty()->GetColor(aColor); r = aColor[0]; g = aColor[1]; @@ -729,14 +729,14 @@ bool VTKViewer_Actor::GetQuadraticArcMode() const{ /*! * Set Max angle for representation 2D quadratic element as arked polygon */ -void VTKViewer_Actor::SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle){ +void VTKViewer_Actor::SetQuadraticArcAngle(double theMaxAngle){ myGeomFilter->SetQuadraticArcAngle(theMaxAngle); } /*! * Return Max angle of the representation 2D quadratic element as arked polygon */ -vtkFloatingPointType VTKViewer_Actor::GetQuadraticArcAngle() const{ +double VTKViewer_Actor::GetQuadraticArcAngle() const{ return myGeomFilter->GetQuadraticArcAngle(); } diff --git a/src/VTKViewer/VTKViewer_Actor.h b/src/VTKViewer/VTKViewer_Actor.h index 5225cd6b4..996d89478 100755 --- a/src/VTKViewer/VTKViewer_Actor.h +++ b/src/VTKViewer/VTKViewer_Actor.h @@ -93,31 +93,31 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor //! Change opacity virtual void - SetOpacity(vtkFloatingPointType theOpacity); + SetOpacity(double theOpacity); //! Get current opacity virtual - vtkFloatingPointType + double GetOpacity(); //! Change color virtual void - SetColor(vtkFloatingPointType r, - vtkFloatingPointType g, - vtkFloatingPointType b); + SetColor(double r, + double g, + double b); //! Get current color virtual void - GetColor(vtkFloatingPointType& r, - vtkFloatingPointType& g, - vtkFloatingPointType& b); + GetColor(double& r, + double& g, + double& b); //! Change color virtual void - SetColor(const vtkFloatingPointType theRGB[3]); + SetColor(const double theRGB[3]); //! Change material virtual @@ -143,7 +143,7 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor //! Get coordinates of a node for given object index virtual - vtkFloatingPointType* + double* GetNodeCoord(int theObjID); //! Maps VTK index of a cell to corresponding object index @@ -219,12 +219,12 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor //! To calcualte current bounding box virtual - vtkFloatingPointType* + double* GetBounds(); //! To calcualte current bounding box void - GetBounds(vtkFloatingPointType bounds[6]); + GetBounds(double bounds[6]); //---------------------------------------------------------------------------- virtual @@ -237,7 +237,7 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor virtual void - SetSize( const vtkFloatingPointType ); + SetSize( const double ); virtual void @@ -250,13 +250,13 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor //! Set ResolveCoincidentTopology parameters void - SetPolygonOffsetParameters(vtkFloatingPointType factor, - vtkFloatingPointType units); + SetPolygonOffsetParameters(double factor, + double units); //! Get current ResolveCoincidentTopology parameters void - GetPolygonOffsetParameters(vtkFloatingPointType& factor, - vtkFloatingPointType& units); + GetPolygonOffsetParameters(double& factor, + double& units); virtual void @@ -265,7 +265,7 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor //---------------------------------------------------------------------------- //! Get current shrink factor virtual - vtkFloatingPointType + double GetShrinkFactor(); //! Is the actor is shrunkable @@ -339,8 +339,8 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor virtual void SetQuadraticArcMode(bool theFlag); virtual bool GetQuadraticArcMode() const; - virtual void SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle); - virtual vtkFloatingPointType GetQuadraticArcAngle() const; + virtual void SetQuadraticArcAngle(double theMaxAngle); + virtual double GetQuadraticArcAngle() const; //---------------------------------------------------------------------------- //! Return pointer to the dataset, which used to calculation of the bounding box of the actor @@ -349,12 +349,12 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor protected: //---------------------------------------------------------------------------- bool myIsResolveCoincidentTopology; - vtkFloatingPointType myPolygonOffsetFactor; - vtkFloatingPointType myPolygonOffsetUnits; + double myPolygonOffsetFactor; + double myPolygonOffsetUnits; std::string myName; - vtkFloatingPointType myOpacity; + double myOpacity; int myDisplayMode; bool myIsInfinite; diff --git a/src/VTKViewer/VTKViewer_AppendFilter.cxx b/src/VTKViewer/VTKViewer_AppendFilter.cxx index cc08f7bad..986edd57d 100644 --- a/src/VTKViewer/VTKViewer_AppendFilter.cxx +++ b/src/VTKViewer/VTKViewer_AppendFilter.cxx @@ -44,7 +44,6 @@ #endif #endif -vtkCxxRevisionMacro(VTKViewer_AppendFilter, "$Revision$"); vtkStandardNewMacro(VTKViewer_AppendFilter); VTKViewer_AppendFilter diff --git a/src/VTKViewer/VTKViewer_AppendFilter.h b/src/VTKViewer/VTKViewer_AppendFilter.h index 3a0e27a4f..35c691d63 100644 --- a/src/VTKViewer/VTKViewer_AppendFilter.h +++ b/src/VTKViewer/VTKViewer_AppendFilter.h @@ -46,10 +46,10 @@ public: */ static VTKViewer_AppendFilter *New(); - /*! \fn vtkTypeRevisionMacro(VTKViewer_AppendFilter, vtkAppendFilter) + /*! \fn vtkTypeMacro(VTKViewer_AppendFilter, vtkAppendFilter) * \brief VTK type revision macros. */ - vtkTypeRevisionMacro(VTKViewer_AppendFilter, vtkAppendFilter); + vtkTypeMacro(VTKViewer_AppendFilter, vtkAppendFilter); void SetDoMappingFlag(const bool theFlag); diff --git a/src/VTKViewer/VTKViewer_ArcBuilder.cxx b/src/VTKViewer/VTKViewer_ArcBuilder.cxx index 8fec33a8d..b5d2a0f38 100644 --- a/src/VTKViewer/VTKViewer_ArcBuilder.cxx +++ b/src/VTKViewer/VTKViewer_ArcBuilder.cxx @@ -579,7 +579,7 @@ VTKViewer_ArcBuilder::IncOrder VTKViewer_ArcBuilder::GetArcAngle( const double& //------------------------------------------------------------------------ Pnt CreatePnt(vtkCell* cell, vtkDataArray* scalars, vtkIdType index) { - vtkFloatingPointType coord[3]; + double coord[3]; cell->GetPoints()->GetPoint(index, coord); vtkIdType pointId = cell->GetPointId(index); double scalarValue = scalars ? scalars->GetTuple1(pointId) : 0; @@ -590,7 +590,7 @@ Pnt CreatePnt(vtkCell* cell, vtkDataArray* scalars, vtkIdType index) //------------------------------------------------------------------------ vtkIdType Build1DArc(vtkIdType cellId, vtkUnstructuredGrid* input, vtkPolyData *output,vtkIdType *pts, - vtkFloatingPointType myMaxArcAngle){ + double myMaxArcAngle){ vtkIdType aResult = -1; vtkIdType *aNewPoints; diff --git a/src/VTKViewer/VTKViewer_ArcBuilder.h b/src/VTKViewer/VTKViewer_ArcBuilder.h index c5f47a2c4..0f27af523 100644 --- a/src/VTKViewer/VTKViewer_ArcBuilder.h +++ b/src/VTKViewer/VTKViewer_ArcBuilder.h @@ -25,6 +25,8 @@ #include #include +#include + class vtkCell; class vtkDataArray; class vtkPoints; @@ -45,7 +47,7 @@ vtkIdType Build1DArc(vtkIdType cellId, vtkUnstructuredGrid* input, vtkPolyData *output, vtkIdType *pts, - vtkFloatingPointType myMaxArcAngle); + double myMaxArcAngle); Pnt CreatePnt(vtkCell* cell, vtkDataArray* scalars, diff --git a/src/VTKViewer/VTKViewer_CellCenters.cxx b/src/VTKViewer/VTKViewer_CellCenters.cxx index 0aa717bd2..abaf1a08d 100644 --- a/src/VTKViewer/VTKViewer_CellCenters.cxx +++ b/src/VTKViewer/VTKViewer_CellCenters.cxx @@ -33,7 +33,6 @@ #include #include -vtkCxxRevisionMacro(VTKViewer_CellCenters, "$Revision$"); vtkStandardNewMacro(VTKViewer_CellCenters); /*! diff --git a/src/VTKViewer/VTKViewer_CellCenters.h b/src/VTKViewer/VTKViewer_CellCenters.h index 6a37f1585..c33141aae 100644 --- a/src/VTKViewer/VTKViewer_CellCenters.h +++ b/src/VTKViewer/VTKViewer_CellCenters.h @@ -39,7 +39,7 @@ class VTKVIEWER_EXPORT VTKViewer_CellCenters : public vtkCellCenters { public: - vtkTypeRevisionMacro(VTKViewer_CellCenters,vtkCellCenters); + vtkTypeMacro(VTKViewer_CellCenters,vtkCellCenters); static VTKViewer_CellCenters *New(); diff --git a/src/VTKViewer/VTKViewer_CellLocationsArray.h b/src/VTKViewer/VTKViewer_CellLocationsArray.h index 7cfb3e88c..2d3d7bff1 100644 --- a/src/VTKViewer/VTKViewer_CellLocationsArray.h +++ b/src/VTKViewer/VTKViewer_CellLocationsArray.h @@ -25,6 +25,8 @@ #include "VTKViewer.h" +#include + #if ((VTK_MAJOR_VERSION == 4) && (VTK_MINOR_VERSION >= 4)) || (VTK_MAJOR_VERSION > 4) # include # define TCellLocationsArray vtkIdTypeArray diff --git a/src/VTKViewer/VTKViewer_ConvexTool.cxx b/src/VTKViewer/VTKViewer_ConvexTool.cxx index 519227de9..1c22204a2 100644 --- a/src/VTKViewer/VTKViewer_ConvexTool.cxx +++ b/src/VTKViewer/VTKViewer_ConvexTool.cxx @@ -55,11 +55,11 @@ namespace struct TPolygon { TConnectivities myConnectivities; - vtkFloatingPointType myOrigin[3]; - vtkFloatingPointType myNormal[3]; + double myOrigin[3]; + double myNormal[3]; TPolygon(const TConnectivities& theConnectivities, - vtkFloatingPointType theOrigin[3], - vtkFloatingPointType theNormal[3]): + double theOrigin[3], + double theNormal[3]): myConnectivities(theConnectivities) { myOrigin[0] = theOrigin[0]; @@ -108,7 +108,7 @@ VTKViewer_Triangulator vtkIdType aNumPts; theInput->GetCellPoints(theCellId, aNumPts, myPointIds); if ( aNumPts > 0 ) { - vtkFloatingPointType anAbsoluteCoord[3]; + double anAbsoluteCoord[3]; myPoints->SetNumberOfPoints(aNumPts); vtkPoints *anInputPoints = theInput->GetPoints(); for (int aPntId = 0; aPntId < aNumPts; aPntId++) { @@ -140,14 +140,14 @@ VTKViewer_Triangulator //---------------------------------------------------------------------------- -vtkFloatingPointType +double VTKViewer_Triangulator ::GetCellLength() { - vtkFloatingPointType aBounds[6]; + double aBounds[6]; myPoints->GetBounds(aBounds); - vtkFloatingPointType aCoordDiff[3]; + double aCoordDiff[3]; aCoordDiff[0] = (aBounds[1] - aBounds[0]); aCoordDiff[1] = (aBounds[3] - aBounds[2]); aCoordDiff[2] = (aBounds[5] - aBounds[4]); @@ -210,9 +210,9 @@ VTKViewer_Triangulator return true; // To calculate the bary center of the cell - vtkFloatingPointType aCellCenter[3] = {0.0, 0.0, 0.0}; + double aCellCenter[3] = {0.0, 0.0, 0.0}; { - vtkFloatingPointType aPntCoord[3]; + double aPntCoord[3]; for (int aPntId = 0; aPntId < aNumPts; aPntId++) { aPoints->GetPoint(GetPointId(aPntId),aPntCoord); if(DEBUG_TRIA_EXECUTE) cout<<"\taPntId = "<GetPoint(aNewPts[0],aCoord[0]); aPoints->GetPoint(aNewPts[1],aCoord[1]); aPoints->GetPoint(aNewPts[2],aCoord[2]); @@ -307,11 +307,11 @@ VTKViewer_Triangulator */ - vtkFloatingPointType aVector01[3] = { aCoord[1][0] - aCoord[0][0], + double aVector01[3] = { aCoord[1][0] - aCoord[0][0], aCoord[1][1] - aCoord[0][1], aCoord[1][2] - aCoord[0][2] }; - vtkFloatingPointType aVector02[3] = { aCoord[2][0] - aCoord[0][0], + double aVector02[3] = { aCoord[2][0] - aCoord[0][0], aCoord[2][1] - aCoord[0][1], aCoord[2][2] - aCoord[0][2] }; @@ -319,34 +319,34 @@ VTKViewer_Triangulator vtkMath::Normalize(aVector02); // To calculate the normal for the triangle - vtkFloatingPointType aNormal[3]; + double aNormal[3]; vtkMath::Cross(aVector02,aVector01,aNormal); vtkMath::Normalize(aNormal); // To calculate what points belong to the plane // To calculate bounds of the point set - vtkFloatingPointType aCenter[3] = {0.0, 0.0, 0.0}; + double aCenter[3] = {0.0, 0.0, 0.0}; { TPointIds::const_iterator anIter = anInitialPointIds.begin(); TPointIds::const_iterator anEndIter = anInitialPointIds.end(); for(; anIter != anEndIter; anIter++){ - vtkFloatingPointType aPntCoord[3]; + double aPntCoord[3]; vtkIdType aPntId = *anIter; aPoints->GetPoint(aPntId,aPntCoord); - vtkFloatingPointType aVector0Pnt[3] = { aPntCoord[0] - aCoord[0][0], + double aVector0Pnt[3] = { aPntCoord[0] - aCoord[0][0], aPntCoord[1] - aCoord[0][1], aPntCoord[2] - aCoord[0][2] }; vtkMath::Normalize(aVector0Pnt); - vtkFloatingPointType aNormalPnt[3]; + double aNormalPnt[3]; // calculate aNormalPnt { - vtkFloatingPointType aCosPnt01 = vtkMath::Dot(aVector0Pnt,aVector01); - vtkFloatingPointType aCosPnt02 = vtkMath::Dot(aVector0Pnt,aVector02); + double aCosPnt01 = vtkMath::Dot(aVector0Pnt,aVector01); + double aCosPnt02 = vtkMath::Dot(aVector0Pnt,aVector02); if(aCosPnt01<-1) aCosPnt01 = -1; if(aCosPnt01>1) @@ -356,9 +356,9 @@ VTKViewer_Triangulator if(aCosPnt02>1) aCosPnt02 = 1; - vtkFloatingPointType aDist01,aDist02;// deflection from Pi/3 angle (equilateral triangle) - vtkFloatingPointType aAngPnt01 = fabs(acos(aCosPnt01)); - vtkFloatingPointType aAngPnt02 = fabs(acos(aCosPnt02)); + double aDist01,aDist02;// deflection from Pi/3 angle (equilateral triangle) + double aAngPnt01 = fabs(acos(aCosPnt01)); + double aAngPnt02 = fabs(acos(aCosPnt02)); /* check that triangle similar to equilateral triangle AOC or COB ? @@ -390,7 +390,7 @@ VTKViewer_Triangulator if(DEBUG_TRIA_EXECUTE) cout<<"\t\taPntId = "< TSortedPointIds; + typedef std::map TSortedPointIds; TSortedPointIds aSortedPointIds; TPointIds::const_iterator anIter = aPointIds.begin(); TPointIds::const_iterator anEndIter = aPointIds.end(); for(; anIter != anEndIter; anIter++){ - vtkFloatingPointType aPntCoord[3]; + double aPntCoord[3]; vtkIdType aPntId = *anIter; aPoints->GetPoint(aPntId,aPntCoord); - vtkFloatingPointType aVector[3] = { aPntCoord[0] - aCenter[0], + double aVector[3] = { aPntCoord[0] - aCenter[0], aPntCoord[1] - aCenter[1], aPntCoord[2] - aCenter[2] }; vtkMath::Normalize(aVector); - vtkFloatingPointType aCross[3]; + double aCross[3]; vtkMath::Cross(aVector,aVector0,aCross); - vtkFloatingPointType aCr = vtkMath::Dot(aCross,aNormal); + double aCr = vtkMath::Dot(aCross,aNormal); bool aGreaterThanPi = aCr < 0; - vtkFloatingPointType aCosinus = vtkMath::Dot(aVector,aVector0); - vtkFloatingPointType anAngle = 0.0; + double aCosinus = vtkMath::Dot(aVector,aVector0); + double anAngle = 0.0; if(aCosinus >= 1.0){ aCosinus = 1.0; } else if (aCosinus <= -1.0){ @@ -544,18 +544,18 @@ VTKViewer_Triangulator int aNbPolygons = aPolygons.size(); for (int aPolygonId = 0; aPolygonId < aNbPolygons; aPolygonId++) { ::TPolygon& aPolygon = aPolygons[aPolygonId]; - vtkFloatingPointType* aNormal = aPolygon.myNormal; - vtkFloatingPointType* anOrigin = aPolygon.myOrigin; + double* aNormal = aPolygon.myNormal; + double* anOrigin = aPolygon.myOrigin; if(DEBUG_TRIA_EXECUTE) { cout<<"\taPolygonId = "<GetPoint(anId,aPntCoord); - vtkFloatingPointType aDist = vtkPlane::Evaluate(aNormal,anOrigin,aPntCoord); + double aDist = vtkPlane::Evaluate(aNormal,anOrigin,aPntCoord); if(DEBUG_TRIA_EXECUTE) cout<<"\t\taPntId = "< 0 ) { myTriangulator->InitTriangulation(0.0, 1.0, 0.0, 1.0, 0.0, 1.0, aNumPts); - vtkFloatingPointType aBounds[6]; + double aBounds[6]; myPoints->GetBounds(aBounds); - vtkFloatingPointType xSize, ySize, zSize; + double xSize, ySize, zSize; xSize = aBounds[1] - aBounds[0]; ySize = aBounds[3] - aBounds[2]; zSize = aBounds[5] - aBounds[4]; - vtkFloatingPointType anAbsoluteCoord[3]; - vtkFloatingPointType aParamentrucCoord[3]; + double anAbsoluteCoord[3]; + double aParamentrucCoord[3]; for (int aPntId = 0; aPntId < aNumPts; aPntId++) { myPoints->GetPoint(aPntId, anAbsoluteCoord); aParamentrucCoord[0] = xSize==0. ? 0. : ((anAbsoluteCoord[0] - aBounds[0]) / xSize); diff --git a/src/VTKViewer/VTKViewer_ConvexTool.h b/src/VTKViewer/VTKViewer_ConvexTool.h index 017a0a700..11d45b99b 100644 --- a/src/VTKViewer/VTKViewer_ConvexTool.h +++ b/src/VTKViewer/VTKViewer_ConvexTool.h @@ -94,7 +94,7 @@ class VTKVIEWER_EXPORT VTKViewer_Triangulator vtkIdType GetPointId(vtkIdType thePointId); - vtkFloatingPointType + double GetCellLength(); void diff --git a/src/VTKViewer/VTKViewer_DataSetMapper.cxx b/src/VTKViewer/VTKViewer_DataSetMapper.cxx index 8394ed9f7..711a04ad0 100644 --- a/src/VTKViewer/VTKViewer_DataSetMapper.cxx +++ b/src/VTKViewer/VTKViewer_DataSetMapper.cxx @@ -23,7 +23,6 @@ #include #include -vtkCxxRevisionMacro(VTKViewer_DataSetMapper, "Revision$"); vtkStandardNewMacro(VTKViewer_DataSetMapper); //---------------------------------------------------------------------------- diff --git a/src/VTKViewer/VTKViewer_DataSetMapper.h b/src/VTKViewer/VTKViewer_DataSetMapper.h index cbdfbbbff..76ae91f7b 100644 --- a/src/VTKViewer/VTKViewer_DataSetMapper.h +++ b/src/VTKViewer/VTKViewer_DataSetMapper.h @@ -29,7 +29,7 @@ class VTKVIEWER_EXPORT VTKViewer_DataSetMapper : public vtkDataSetMapper { public: static VTKViewer_DataSetMapper *New(); - vtkTypeRevisionMacro(VTKViewer_DataSetMapper,vtkDataSetMapper); + vtkTypeMacro(VTKViewer_DataSetMapper,vtkDataSetMapper); //! Set point marker enabled void SetMarkerEnabled( bool ); diff --git a/src/VTKViewer/VTKViewer_FramedTextActor.cxx b/src/VTKViewer/VTKViewer_FramedTextActor.cxx index cf863eac7..406482997 100644 --- a/src/VTKViewer/VTKViewer_FramedTextActor.cxx +++ b/src/VTKViewer/VTKViewer_FramedTextActor.cxx @@ -39,7 +39,6 @@ #define OFFSET_SPACING 2 //================================================================== -vtkCxxRevisionMacro(VTKViewer_FramedTextActor, "$Revision$"); vtkStandardNewMacro(VTKViewer_FramedTextActor); //================================================================== @@ -160,9 +159,9 @@ void VTKViewer_FramedTextActor::GetSize(vtkRenderer* theRenderer, int theSize[2] // function : SetForegroundColor // purpose : //================================================================== -void VTKViewer_FramedTextActor::SetForegroundColor(const vtkFloatingPointType r, - const vtkFloatingPointType g, - const vtkFloatingPointType b) +void VTKViewer_FramedTextActor::SetForegroundColor(const double r, + const double g, + const double b) { myTextProperty->SetColor(r, g, b); myTextMapper->GetTextProperty()->ShallowCopy(myTextProperty); @@ -173,11 +172,11 @@ void VTKViewer_FramedTextActor::SetForegroundColor(const vtkFloatingPointType r, // function : GetForegroundColor // purpose : //================================================================== -void VTKViewer_FramedTextActor::GetForegroundColor(vtkFloatingPointType& r, - vtkFloatingPointType& g, - vtkFloatingPointType& b) +void VTKViewer_FramedTextActor::GetForegroundColor(double& r, + double& g, + double& b) { - vtkFloatingPointType aColor[3]; + double aColor[3]; myTextProperty->GetColor(aColor); r = aColor[0]; g = aColor[1]; @@ -188,9 +187,9 @@ void VTKViewer_FramedTextActor::GetForegroundColor(vtkFloatingPointType& r, // function : SetBackgroundColor // purpose : //================================================================== -void VTKViewer_FramedTextActor::SetBackgroundColor(const vtkFloatingPointType r, - const vtkFloatingPointType g, - const vtkFloatingPointType b) +void VTKViewer_FramedTextActor::SetBackgroundColor(const double r, + const double g, + const double b) { myBarActor->GetProperty()->SetColor(r, g, b); Modified(); @@ -200,11 +199,11 @@ void VTKViewer_FramedTextActor::SetBackgroundColor(const vtkFloatingPointType r, // function : GetBackgroundColor // purpose : //================================================================== -void VTKViewer_FramedTextActor::GetBackgroundColor(vtkFloatingPointType& r, - vtkFloatingPointType& g, - vtkFloatingPointType& b) +void VTKViewer_FramedTextActor::GetBackgroundColor(double& r, + double& g, + double& b) { - vtkFloatingPointType aColor[3]; + double aColor[3]; myBarActor->GetProperty()->GetColor(aColor); r = aColor[0]; g = aColor[1]; @@ -215,7 +214,7 @@ void VTKViewer_FramedTextActor::GetBackgroundColor(vtkFloatingPointType& r, // function : SetTransparency // purpose : //================================================================== -void VTKViewer_FramedTextActor::SetTransparency(const vtkFloatingPointType theTransparency) +void VTKViewer_FramedTextActor::SetTransparency(const double theTransparency) { if (theTransparency>=0. && theTransparency<=1.){ myTransparency=theTransparency; @@ -228,7 +227,7 @@ void VTKViewer_FramedTextActor::SetTransparency(const vtkFloatingPointType theTr // function : GetTransparency // purpose : //================================================================== -vtkFloatingPointType VTKViewer_FramedTextActor::GetTransparency()const +double VTKViewer_FramedTextActor::GetTransparency()const { return myTransparency; } @@ -336,7 +335,7 @@ int VTKViewer_FramedTextActor::GetLayoutType() const // function : SetWorldPoint // purpose : //================================================================== -void VTKViewer_FramedTextActor::SetWorldPoint(const vtkFloatingPointType theWorldPoint[4]) +void VTKViewer_FramedTextActor::SetWorldPoint(const double theWorldPoint[4]) { for(int i = 0; i<4; ++i) { myWorldPoint[i] = theWorldPoint[i]; @@ -348,7 +347,7 @@ void VTKViewer_FramedTextActor::SetWorldPoint(const vtkFloatingPointType theWorl // function : GetWorldPoint // purpose : //================================================================== -const vtkFloatingPointType* VTKViewer_FramedTextActor::GetWorldPoint()const +const double* VTKViewer_FramedTextActor::GetWorldPoint()const { return myWorldPoint; } @@ -357,7 +356,7 @@ const vtkFloatingPointType* VTKViewer_FramedTextActor::GetWorldPoint()const // function : SetDistance // purpose : //================================================================== -void VTKViewer_FramedTextActor::SetDistance(const vtkFloatingPointType theDistance) +void VTKViewer_FramedTextActor::SetDistance(const double theDistance) { myDistance=theDistance; } @@ -366,7 +365,7 @@ void VTKViewer_FramedTextActor::SetDistance(const vtkFloatingPointType theDistan // function : GetDistance // purpose : //================================================================== -vtkFloatingPointType VTKViewer_FramedTextActor::GetDistance()const +double VTKViewer_FramedTextActor::GetDistance()const { return myDistance; } @@ -457,10 +456,10 @@ VTKViewer_FramedTextActor int aTextMargin = GetTextMargin(); - vtkFloatingPointType xMin = 0.0; - vtkFloatingPointType xMax = 0.0; - vtkFloatingPointType yMin = -aBarHeight/2 - aTextMargin; - vtkFloatingPointType yMax = aBarHeight/2 + aTextMargin; + double xMin = 0.0; + double xMax = 0.0; + double yMin = -aBarHeight/2 - aTextMargin; + double yMax = aBarHeight/2 + aTextMargin; int aHorizontalOffset = GetLayoutType() == Horizontal ? myHorizontalOffset : 0; int aVerticalOffset = GetLayoutType() == Vertical ? myVerticalOffset : 0; @@ -470,10 +469,10 @@ VTKViewer_FramedTextActor theViewport->SetWorldPoint(myWorldPoint); theViewport->WorldToDisplay(); - vtkFloatingPointType aSelectionPoint[3]; + double aSelectionPoint[3]; theViewport->GetDisplayPoint(aSelectionPoint); - vtkFloatingPointType u = aSelectionPoint[0]; - vtkFloatingPointType v = aSelectionPoint[1] - myDistance; + double u = aSelectionPoint[0]; + double v = aSelectionPoint[1] - myDistance; if(myMoveFrameFlag) v -= aBarHeight/2.; theViewport->ViewportToNormalizedViewport(u, v); @@ -486,8 +485,8 @@ VTKViewer_FramedTextActor } else // except BelowPoint, only TopLeft and TopRight modes are supported at this moment { - vtkFloatingPointType x = 0, xOffset = aHorizontalOffset + aTextMargin + OFFSET_SPACING; - vtkFloatingPointType y = 0, yOffset = aVerticalOffset + aTextMargin + OFFSET_SPACING; + double x = 0, xOffset = aHorizontalOffset + aTextMargin + OFFSET_SPACING; + double y = 0, yOffset = aVerticalOffset + aTextMargin + OFFSET_SPACING; if( myModePosition == TopLeft ) { @@ -508,8 +507,8 @@ VTKViewer_FramedTextActor xMax = aTextMargin; } - PositionCoordinate->SetValue(x / (vtkFloatingPointType)aViewPortWidth, - y / (vtkFloatingPointType)aViewPortHeight); + PositionCoordinate->SetValue(x / (double)aViewPortWidth, + y / (double)aViewPortHeight); } aPoints->SetPoint(0, xMin, yMax, 0.0); diff --git a/src/VTKViewer/VTKViewer_FramedTextActor.h b/src/VTKViewer/VTKViewer_FramedTextActor.h index 0a3e95be3..5f2de984e 100644 --- a/src/VTKViewer/VTKViewer_FramedTextActor.h +++ b/src/VTKViewer/VTKViewer_FramedTextActor.h @@ -40,7 +40,7 @@ public: enum LayoutType { Vertical = 0, Horizontal }; public: - vtkTypeRevisionMacro(VTKViewer_FramedTextActor,vtkActor2D); + vtkTypeMacro(VTKViewer_FramedTextActor,vtkActor2D); static VTKViewer_FramedTextActor *New(); virtual int RenderOpaqueGeometry(vtkViewport*); @@ -64,31 +64,31 @@ public: void SetLayoutType(const int theType); int GetLayoutType() const; - void SetWorldPoint(const vtkFloatingPointType theWorldPoint[4]); - const vtkFloatingPointType* GetWorldPoint() const; + void SetWorldPoint(const double theWorldPoint[4]); + const double* GetWorldPoint() const; - void SetDistance(const vtkFloatingPointType theDistance); - vtkFloatingPointType GetDistance() const; + void SetDistance(const double theDistance); + double GetDistance() const; void SetMoveFrameFlag(const int flag); int GetMoveFrameFlag() const; - void SetForegroundColor(const vtkFloatingPointType r, - const vtkFloatingPointType g, - const vtkFloatingPointType b); - void GetForegroundColor(vtkFloatingPointType& r, - vtkFloatingPointType& g, - vtkFloatingPointType& b); + void SetForegroundColor(const double r, + const double g, + const double b); + void GetForegroundColor(double& r, + double& g, + double& b); - void SetBackgroundColor(const vtkFloatingPointType r, - const vtkFloatingPointType g, - const vtkFloatingPointType b); - void GetBackgroundColor(vtkFloatingPointType& r, - vtkFloatingPointType& g, - vtkFloatingPointType& b); + void SetBackgroundColor(const double r, + const double g, + const double b); + void GetBackgroundColor(double& r, + double& g, + double& b); - void SetTransparency(const vtkFloatingPointType theTransparency); - vtkFloatingPointType GetTransparency() const; + void SetTransparency(const double theTransparency); + double GetTransparency() const; void SetTextMargin(const int theMargin); int GetTextMargin() const; @@ -114,9 +114,9 @@ protected: int myLayoutType; int myMoveFrameFlag; - vtkFloatingPointType myWorldPoint[4]; - vtkFloatingPointType myDistance; - vtkFloatingPointType myTransparency; + double myWorldPoint[4]; + double myDistance; + double myTransparency; int myTextMargin; diff --git a/src/VTKViewer/VTKViewer_GeometryFilter.cxx b/src/VTKViewer/VTKViewer_GeometryFilter.cxx index 2501ee83d..e64645224 100755 --- a/src/VTKViewer/VTKViewer_GeometryFilter.cxx +++ b/src/VTKViewer/VTKViewer_GeometryFilter.cxx @@ -90,7 +90,6 @@ #endif /////////////////////////////////////////////////////////////////////////////////////////////// -vtkCxxRevisionMacro(VTKViewer_GeometryFilter, "$Revision$"); vtkStandardNewMacro(VTKViewer_GeometryFilter); VTKViewer_GeometryFilter @@ -184,7 +183,7 @@ VTKViewer_GeometryFilter char *cellVis; vtkIdType newCellId; int faceId, *faceVerts, numFacePts; - vtkFloatingPointType *x; + double *x; vtkIdType PixelConvert[4]; // Change the type from int to vtkIdType in order to avoid compilation errors while using VTK // from ParaView-3.4.0 compiled on 64-bit Debian platform with VTK_USE_64BIT_IDS = ON @@ -1525,7 +1524,7 @@ bool VTKViewer_GeometryFilter::GetQuadraticArcMode() const return myIsBuildArc; } -void VTKViewer_GeometryFilter::SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle) +void VTKViewer_GeometryFilter::SetQuadraticArcAngle(double theMaxAngle) { if(myMaxArcAngle != theMaxAngle) { myMaxArcAngle = theMaxAngle; @@ -1533,7 +1532,7 @@ void VTKViewer_GeometryFilter::SetQuadraticArcAngle(vtkFloatingPointType theMaxA } } -vtkFloatingPointType VTKViewer_GeometryFilter:: GetQuadraticArcAngle() const +double VTKViewer_GeometryFilter:: GetQuadraticArcAngle() const { return myMaxArcAngle; } diff --git a/src/VTKViewer/VTKViewer_GeometryFilter.h b/src/VTKViewer/VTKViewer_GeometryFilter.h index 53a36f4e8..e4ecab87d 100755 --- a/src/VTKViewer/VTKViewer_GeometryFilter.h +++ b/src/VTKViewer/VTKViewer_GeometryFilter.h @@ -45,10 +45,10 @@ public: */ static VTKViewer_GeometryFilter *New(); - /*! \fn vtkTypeRevisionMacro(VTKViewer_GeometryFilter, vtkGeometryFilter) + /*! \fn vtkTypeMacro(VTKViewer_GeometryFilter, vtkGeometryFilter) * \brief VTK type revision macros. */ - vtkTypeRevisionMacro(VTKViewer_GeometryFilter, vtkGeometryFilter); + vtkTypeMacro(VTKViewer_GeometryFilter, vtkGeometryFilter); /*! \fn void SetInside(int theShowInside) * \brief Sets \a myShowInside flag. \a myShowInside is changed, call this->Modified(). * \param theShowInside - used for changing value of \a myShowInside variable. @@ -106,8 +106,8 @@ public: virtual void SetQuadraticArcMode(bool theFlag); virtual bool GetQuadraticArcMode() const; - virtual void SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle); - virtual vtkFloatingPointType GetQuadraticArcAngle() const; + virtual void SetQuadraticArcAngle(double theMaxAngle); + virtual double GetQuadraticArcAngle() const; typedef std::vector TVectorId; typedef std::map TMapOfVectorId; @@ -150,7 +150,7 @@ private: int myIsWireframeMode; int myAppendCoincident3D; - vtkFloatingPointType myMaxArcAngle; // define max angle for mesh 2D quadratic element in the degrees + double myMaxArcAngle; // define max angle for mesh 2D quadratic element in the degrees bool myIsBuildArc; // flag for representation 2D quadratic element as arked polygon }; diff --git a/src/VTKViewer/VTKViewer_InteractorStyle.cxx b/src/VTKViewer/VTKViewer_InteractorStyle.cxx index bc5e342cf..b07eaf3ba 100644 --- a/src/VTKViewer/VTKViewer_InteractorStyle.cxx +++ b/src/VTKViewer/VTKViewer_InteractorStyle.cxx @@ -1347,17 +1347,17 @@ void VTKViewer_InteractorStyle::Place(const int theX, const int theY) void VTKViewer_InteractorStyle::TranslateView(int toX, int toY, int fromX, int fromY) { vtkCamera *cam = this->CurrentRenderer->GetActiveCamera(); - vtkFloatingPointType viewFocus[4], focalDepth, viewPoint[3]; - vtkFloatingPointType newPickPoint[4], oldPickPoint[4], motionVector[3]; + double viewFocus[4], focalDepth, viewPoint[3]; + double newPickPoint[4], oldPickPoint[4], motionVector[3]; cam->GetFocalPoint(viewFocus); this->ComputeWorldToDisplay(viewFocus[0], viewFocus[1], viewFocus[2], viewFocus); focalDepth = viewFocus[2]; - this->ComputeDisplayToWorld(vtkFloatingPointType(toX), vtkFloatingPointType(toY), + this->ComputeDisplayToWorld(double(toX), double(toY), focalDepth, newPickPoint); - this->ComputeDisplayToWorld(vtkFloatingPointType(fromX),vtkFloatingPointType(fromY), + this->ComputeDisplayToWorld(double(fromX),double(fromY), focalDepth, oldPickPoint); // camera motion is reversed @@ -1381,17 +1381,17 @@ bool VTKViewer_InteractorStyle::IsInRect(vtkActor* theActor, const int left, const int top, const int right, const int bottom) { - vtkFloatingPointType* aBounds = theActor->GetBounds(); - vtkFloatingPointType aMin[3], aMax[3]; + double* aBounds = theActor->GetBounds(); + double aMin[3], aMax[3]; ComputeWorldToDisplay(aBounds[0], aBounds[2], aBounds[4], aMin); ComputeWorldToDisplay(aBounds[1], aBounds[3], aBounds[5], aMax); if (aMin[0] > aMax[0]) { - vtkFloatingPointType aBuf = aMin[0]; + double aBuf = aMin[0]; aMin[0] = aMax[0]; aMax[0] = aBuf; } if (aMin[1] > aMax[1]) { - vtkFloatingPointType aBuf = aMin[1]; + double aBuf = aMin[1]; aMin[1] = aMax[1]; aMax[1] = aBuf; } @@ -1405,17 +1405,17 @@ bool VTKViewer_InteractorStyle::IsInRect(vtkCell* theCell, const int left, const int top, const int right, const int bottom) { - vtkFloatingPointType* aBounds = theCell->GetBounds(); - vtkFloatingPointType aMin[3], aMax[3]; + double* aBounds = theCell->GetBounds(); + double aMin[3], aMax[3]; ComputeWorldToDisplay(aBounds[0], aBounds[2], aBounds[4], aMin); ComputeWorldToDisplay(aBounds[1], aBounds[3], aBounds[5], aMax); if (aMin[0] > aMax[0]) { - vtkFloatingPointType aBuf = aMin[0]; + double aBuf = aMin[0]; aMin[0] = aMax[0]; aMax[0] = aBuf; } if (aMin[1] > aMax[1]) { - vtkFloatingPointType aBuf = aMin[1]; + double aBuf = aMin[1]; aMin[1] = aMax[1]; aMax[1] = aBuf; } @@ -1424,11 +1424,11 @@ bool VTKViewer_InteractorStyle::IsInRect(vtkCell* theCell, } /*!Checks: is given point \a thePoint in rectangle*/ -bool VTKViewer_InteractorStyle::IsInRect(vtkFloatingPointType* thePoint, +bool VTKViewer_InteractorStyle::IsInRect(double* thePoint, const int left, const int top, const int right, const int bottom) { - vtkFloatingPointType aPnt[3]; + double aPnt[3]; ComputeWorldToDisplay(thePoint[0], thePoint[1], thePoint[2], aPnt); return ((aPnt[0]>left) && (aPnt[0]bottom) && (aPnt[1]GetRenderers(); theRenderers->InitTraversal(); diff --git a/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx b/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx index a47647fda..10382acb4 100755 --- a/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx +++ b/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx @@ -708,7 +708,7 @@ void VTKViewer_RenderWindowInteractor::setActorData(const TColStd_IndexedMapOfIn TUpdateActor theFun) { (*theFun)(theMapIndex,theMapActor,theActor); - vtkFloatingPointType aPos[3]; + double aPos[3]; theMapActor->GetPosition(aPos); theActor->SetPosition(aPos); } diff --git a/src/VTKViewer/VTKViewer_ShrinkFilter.cxx b/src/VTKViewer/VTKViewer_ShrinkFilter.cxx index 7e551972d..38019350f 100755 --- a/src/VTKViewer/VTKViewer_ShrinkFilter.cxx +++ b/src/VTKViewer/VTKViewer_ShrinkFilter.cxx @@ -35,7 +35,6 @@ #include #include -vtkCxxRevisionMacro(VTKViewer_ShrinkFilter, "$Revision$"); vtkStandardNewMacro(VTKViewer_ShrinkFilter); /*!Constructor. Sets store mapping to zero.*/ @@ -68,11 +67,11 @@ int VTKViewer_ShrinkFilter::RequestData( int i, j, numIds, abort=0; vtkIdType cellId, numCells, numPts; vtkIdType oldId, newId; - vtkFloatingPointType center[3], *p, pt[3]; + double center[3], *p, pt[3]; vtkPointData *pd, *outPD;; vtkIdList *ptIds, *newPtIds; vtkIdType tenth; - vtkFloatingPointType decimal; + double decimal; vtkDebugMacro(<<"Shrinking cells"); diff --git a/src/VTKViewer/VTKViewer_ShrinkFilter.h b/src/VTKViewer/VTKViewer_ShrinkFilter.h index a628778c4..6bbfa7618 100755 --- a/src/VTKViewer/VTKViewer_ShrinkFilter.h +++ b/src/VTKViewer/VTKViewer_ShrinkFilter.h @@ -41,7 +41,7 @@ class VTKVIEWER_EXPORT VTKViewer_ShrinkFilter : public vtkShrinkFilter public: /*!Create new instance of VTKViewer_ShrinkFilter.*/ static VTKViewer_ShrinkFilter *New(); - vtkTypeRevisionMacro(VTKViewer_ShrinkFilter, vtkShrinkFilter); + vtkTypeMacro(VTKViewer_ShrinkFilter, vtkShrinkFilter); void SetStoreMapping(int theStoreMapping); /*!Gets store mapping flag.*/ diff --git a/src/VTKViewer/VTKViewer_Trihedron.cxx b/src/VTKViewer/VTKViewer_Trihedron.cxx index e5701d6f5..3818e59a2 100755 --- a/src/VTKViewer/VTKViewer_Trihedron.cxx +++ b/src/VTKViewer/VTKViewer_Trihedron.cxx @@ -59,7 +59,7 @@ VTKViewer_UnScaledActor::VTKViewer_UnScaledActor() /*! \return bounding box */ -vtkFloatingPointType* +double* VTKViewer_UnScaledActor ::GetBounds() { @@ -80,24 +80,24 @@ void VTKViewer_UnScaledActor::SetSize(int theSize) void VTKViewer_UnScaledActor::Render(vtkRenderer *theRenderer) { if(theRenderer){ - vtkFloatingPointType P[2][3] = {{-1.0, -1.0, 0.0},{+1.0, +1.0, 0.0}}; + double P[2][3] = {{-1.0, -1.0, 0.0},{+1.0, +1.0, 0.0}}; theRenderer->ViewToWorld(P[0][0],P[0][1],P[0][2]); theRenderer->ViewToWorld(P[1][0],P[1][1],P[1][2]); - vtkFloatingPointType aWorldDiag = sqrt((P[1][0]-P[0][0])*(P[1][0]-P[0][0])+ + double aWorldDiag = sqrt((P[1][0]-P[0][0])*(P[1][0]-P[0][0])+ (P[1][1]-P[0][1])*(P[1][1]-P[0][1])+ (P[1][2]-P[0][2])*(P[1][2]-P[0][2])); int* aSize = theRenderer->GetRenderWindow()->GetSize(); - vtkFloatingPointType aWinDiag = sqrt(vtkFloatingPointType(aSize[0]*aSize[0]+aSize[1]*aSize[1])); + double aWinDiag = sqrt(double(aSize[0]*aSize[0]+aSize[1]*aSize[1])); vtkDataSet* aDataSet = GetMapper()->GetInput(); GetMapper()->Update(); - vtkFloatingPointType aLength = aDataSet->GetLength(); - vtkFloatingPointType aPrecision = 1.0E-3; - vtkFloatingPointType aZeroTol = 1.0E-12; - vtkFloatingPointType anOldScale = GetScale()[0]; - vtkFloatingPointType aScale = anOldScale; - vtkFloatingPointType aMaxSize = (vtkFloatingPointType)qMax(aSize[1],aSize[0]); + double aLength = aDataSet->GetLength(); + double aPrecision = 1.0E-3; + double aZeroTol = 1.0E-12; + double anOldScale = GetScale()[0]; + double aScale = anOldScale; + double aMaxSize = (double)qMax(aSize[1],aSize[0]); if (qAbs(aWinDiag) > aZeroTol && qAbs(aLength) > aZeroTol && qAbs(aMaxSize) > aZeroTol) - aScale = mySize*aWorldDiag/aWinDiag/aLength*sqrt(vtkFloatingPointType(qMin(aSize[1],aSize[0]))/aMaxSize); + aScale = mySize*aWorldDiag/aWinDiag/aLength*sqrt(double(qMin(aSize[1],aSize[0]))/aMaxSize); if(qAbs(aScale) > aZeroTol && qAbs(aScale - anOldScale)/aScale > aPrecision){ SetScale(aScale); } @@ -169,7 +169,7 @@ VTKViewer_Axis::VTKViewer_Axis() myLabelActor = vtkTextActor::New(); myLabelActor->SetMapper(myTextMapper); - myLabelActor->ScaledTextOff(); + myLabelActor->SetTextScaleModeToNone(); myLabelActor->PickableOff(); vtkCoordinate* aCoord = vtkCoordinate::New(); @@ -308,12 +308,12 @@ void VTKViewer_Axis::SetColor(double theRed, double theGreen, double theBlue) /*! Set size of VTKViewer_Axis */ -void VTKViewer_Axis::SetSize(vtkFloatingPointType theSize) +void VTKViewer_Axis::SetSize(double theSize) { - vtkFloatingPointType aPosition[3] = {myDir[0]*theSize, myDir[1]*theSize, myDir[2]*theSize}; + double aPosition[3] = {myDir[0]*theSize, myDir[1]*theSize, myDir[2]*theSize}; - vtkFloatingPointType aCoef = 0.99; - vtkFloatingPointType aLinePosition[3] = {aPosition[0]*aCoef, aPosition[1]*aCoef, aPosition[2]*aCoef}; + double aCoef = 0.99; + double aLinePosition[3] = {aPosition[0]*aCoef, aPosition[1]*aCoef, aPosition[2]*aCoef}; myLineSource->SetPoint2(aLinePosition); myArrowActor->SetPosition(0.0,0.0,0.0); @@ -438,7 +438,7 @@ VTKViewer_Trihedron::VTKViewer_Trihedron() myAxis[0] = VTKViewer_XAxis::New(); myAxis[1] = VTKViewer_YAxis::New(); myAxis[2] = VTKViewer_ZAxis::New(); - static vtkFloatingPointType aSize = 100; + static double aSize = 100; SetSize(aSize); } @@ -455,7 +455,7 @@ VTKViewer_Trihedron::~VTKViewer_Trihedron() /*! Set size of axes */ -void VTKViewer_Trihedron::SetSize(vtkFloatingPointType theSize) +void VTKViewer_Trihedron::SetSize(double theSize) { mySize = theSize; for(int i = 0; i < 3; i++) diff --git a/src/VTKViewer/VTKViewer_Trihedron.h b/src/VTKViewer/VTKViewer_Trihedron.h index c07aa4df9..9f3d6136f 100755 --- a/src/VTKViewer/VTKViewer_Trihedron.h +++ b/src/VTKViewer/VTKViewer_Trihedron.h @@ -27,6 +27,7 @@ #include #include +#include class vtkRenderer; class vtkActorCollection; @@ -69,7 +70,7 @@ public: /*!Create new instance of VTKViewer_UnScaledActor.*/ static VTKViewer_UnScaledActor *New(); - virtual vtkFloatingPointType* GetBounds(); + virtual double* GetBounds(); virtual void SetSize(int theSize); virtual void Render(vtkRenderer *theRenderer); @@ -160,14 +161,14 @@ public: static VTKViewer_Trihedron *New(); /*!Sets size of trihedron. - * \param theSize - vtkFloatingPointType value + * \param theSize - double value */ - virtual void SetSize(vtkFloatingPointType theSize); + virtual void SetSize(double theSize); /*! Get size of trihedron. - * \retval mySize - vtkFloatingPointType value + * \retval mySize - double value */ - virtual vtkFloatingPointType GetSize() { return mySize;} + virtual double GetSize() { return mySize;} enum TVisibility{eOff, eOn, eOnlyLineOn}; @@ -215,7 +216,7 @@ protected: VTKViewer_Axis* myAxis[3]; /*! Common size for trihedron, for each axis.*/ - vtkFloatingPointType mySize; + double mySize; }; /*!The base class for concreate Axis. @@ -260,7 +261,7 @@ public: /*! Set size of VTKViewer_Axis */ - virtual void SetSize(vtkFloatingPointType theSize); + virtual void SetSize(double theSize); /*! Get label actor. * \retval Return myLabelActor. @@ -293,7 +294,7 @@ protected: /*! \var myRot[3] * Orientation vector */ - vtkFloatingPointType myDir[3], myRot[3]; + double myDir[3], myRot[3]; /*! VTKViewer_LineActor actor pointer */ diff --git a/src/VTKViewer/VTKViewer_Utilities.cxx b/src/VTKViewer/VTKViewer_Utilities.cxx index d8d7e0945..816684554 100755 --- a/src/VTKViewer/VTKViewer_Utilities.cxx +++ b/src/VTKViewer/VTKViewer_Utilities.cxx @@ -32,7 +32,7 @@ #include #include -/*!@see vtkRenderer::ResetCamera(vtkFloatingPointType bounds[6]) method*/ +/*!@see vtkRenderer::ResetCamera(double bounds[6]) method*/ void ResetCamera(vtkRenderer* theRenderer, int theUsingZeroFocalPoint) @@ -44,20 +44,20 @@ ResetCamera(vtkRenderer* theRenderer, if(!aCamera) return; - vtkFloatingPointType aBounds[6]; + double aBounds[6]; int aCount = ComputeVisiblePropBounds(theRenderer,aBounds); if(theUsingZeroFocalPoint || aCount){ - static vtkFloatingPointType MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT; + static double MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT; - vtkFloatingPointType aLength = aBounds[1]-aBounds[0]; + double aLength = aBounds[1]-aBounds[0]; aLength = std::max((aBounds[3]-aBounds[2]),aLength); aLength = std::max((aBounds[5]-aBounds[4]),aLength); if(aLength < MIN_DISTANCE) return; - vtkFloatingPointType aWidth = + double aWidth = sqrt((aBounds[1]-aBounds[0])*(aBounds[1]-aBounds[0]) + (aBounds[3]-aBounds[2])*(aBounds[3]-aBounds[2]) + (aBounds[5]-aBounds[4])*(aBounds[5]-aBounds[4])); @@ -65,10 +65,10 @@ ResetCamera(vtkRenderer* theRenderer, if(aWidth < MIN_DISTANCE) return; - vtkFloatingPointType aViewPlaneNormal[3]; + double aViewPlaneNormal[3]; aCamera->GetViewPlaneNormal(aViewPlaneNormal); - vtkFloatingPointType aCenter[3] = {0.0, 0.0, 0.0}; + double aCenter[3] = {0.0, 0.0, 0.0}; if(!theUsingZeroFocalPoint){ aCenter[0] = (aBounds[0] + aBounds[1])/2.0; aCenter[1] = (aBounds[2] + aBounds[3])/2.0; @@ -76,11 +76,11 @@ ResetCamera(vtkRenderer* theRenderer, } aCamera->SetFocalPoint(aCenter[0],aCenter[1],aCenter[2]); - vtkFloatingPointType aViewAngle = aCamera->GetViewAngle(); - vtkFloatingPointType aDistance = 2.0*aWidth/tan(aViewAngle*vtkMath::Pi()/360.0); + double aViewAngle = aCamera->GetViewAngle(); + double aDistance = 2.0*aWidth/tan(aViewAngle*vtkMath::Pi()/360.0); // check view-up vector against view plane normal - vtkFloatingPointType aViewUp[3]; + double aViewUp[3]; aCamera->GetViewUp(aViewUp); if(fabs(vtkMath::Dot(aViewUp,aViewPlaneNormal)) > 0.999) aCamera->SetViewUp(-aViewUp[2], aViewUp[0], aViewUp[1]); @@ -93,7 +93,7 @@ ResetCamera(vtkRenderer* theRenderer, // find size of the window int* aWinSize = theRenderer->GetSize(); if(aWinSize[0] < aWinSize[1]) - aWidth *= vtkFloatingPointType(aWinSize[1])/vtkFloatingPointType(aWinSize[0]); + aWidth *= double(aWinSize[1])/double(aWinSize[0]); if(theUsingZeroFocalPoint) aWidth *= sqrt(2.0); @@ -107,7 +107,7 @@ ResetCamera(vtkRenderer* theRenderer, /*! Compute the bounds of the visible props*/ int ComputeVisiblePropBounds(vtkRenderer* theRenderer, - vtkFloatingPointType theBounds[6]) + double theBounds[6]) { int aCount = 0; @@ -124,9 +124,9 @@ ComputeVisiblePropBounds(vtkRenderer* theRenderer, if(VTKViewer_Actor* anActor = VTKViewer_Actor::SafeDownCast(aProp)) if(anActor->IsInfinitive()) continue; - vtkFloatingPointType *aBounds = aProp->GetBounds(); - static vtkFloatingPointType MIN_DISTANCE = 1./VTK_LARGE_FLOAT; - static vtkFloatingPointType MAX_DISTANCE = 0.9*VTK_LARGE_FLOAT; + double *aBounds = aProp->GetBounds(); + static double MIN_DISTANCE = 1./VTK_LARGE_FLOAT; + static double MAX_DISTANCE = 0.9*VTK_LARGE_FLOAT; if(abs(aBounds[1] - aBounds[0]) < MIN_DISTANCE) { aBounds[0]-=0.001; @@ -165,7 +165,7 @@ ComputeVisiblePropBounds(vtkRenderer* theRenderer, return aCount; } -/*!@see vtkRenderer::ResetCameraClippingRange(vtkFloatingPointType bounds[6]) method*/ +/*!@see vtkRenderer::ResetCameraClippingRange(double bounds[6]) method*/ void ResetCameraClippingRange(vtkRenderer* theRenderer) { @@ -177,29 +177,29 @@ ResetCameraClippingRange(vtkRenderer* theRenderer) } // Find the plane equation for the camera view plane - vtkFloatingPointType vn[3]; + double vn[3]; anActiveCamera->GetViewPlaneNormal(vn); - vtkFloatingPointType position[3]; + double position[3]; anActiveCamera->GetPosition(position); - vtkFloatingPointType bounds[6]; + double bounds[6]; //theRenderer->ComputeVisiblePropBounds(bounds); ComputeVisiblePropBounds(theRenderer, bounds); - vtkFloatingPointType center[3]; + double center[3]; center[0] = (bounds[0] + bounds[1])/2.0; center[1] = (bounds[2] + bounds[3])/2.0; center[2] = (bounds[4] + bounds[5])/2.0; - vtkFloatingPointType width = sqrt((bounds[1]-bounds[0])*(bounds[1]-bounds[0]) + + double width = sqrt((bounds[1]-bounds[0])*(bounds[1]-bounds[0]) + (bounds[3]-bounds[2])*(bounds[3]-bounds[2]) + (bounds[5]-bounds[4])*(bounds[5]-bounds[4])); - vtkFloatingPointType distance = sqrt((position[0]-center[0])*(position[0]-center[0]) + + double distance = sqrt((position[0]-center[0])*(position[0]-center[0]) + (position[1]-center[1])*(position[1]-center[1]) + (position[2]-center[2])*(position[2]-center[2])); - vtkFloatingPointType range[2] = {distance - width/2.0, distance + width/2.0}; + double range[2] = {distance - width/2.0, distance + width/2.0}; // Do not let the range behind the camera throw off the calculation. if (range[0] < 0.0) range[0] = 0.0; @@ -210,24 +210,24 @@ ResetCameraClippingRange(vtkRenderer* theRenderer) /*!Compute trihedron size.*/ bool ComputeTrihedronSize( vtkRenderer* theRenderer, - vtkFloatingPointType& theNewSize, - const vtkFloatingPointType theSize, - const vtkFloatingPointType theSizeInPercents ) + double& theNewSize, + const double theSize, + const double theSizeInPercents ) { // calculating diagonal of visible props of the renderer - vtkFloatingPointType bnd[ 6 ]; + double bnd[ 6 ]; if ( ComputeVisiblePropBounds( theRenderer, bnd ) == 0 ) { bnd[ 1 ] = bnd[ 3 ] = bnd[ 5 ] = 100; bnd[ 0 ] = bnd[ 2 ] = bnd[ 4 ] = 0; } - vtkFloatingPointType aLength = 0; + double aLength = 0; aLength = bnd[ 1 ]-bnd[ 0 ]; aLength = std::max( ( bnd[ 3 ] - bnd[ 2 ] ),aLength ); aLength = std::max( ( bnd[ 5 ] - bnd[ 4 ] ),aLength ); - static vtkFloatingPointType EPS_SIZE = 5.0E-3; + static double EPS_SIZE = 5.0E-3; theNewSize = aLength * theSizeInPercents / 100.0; // if the new trihedron size have sufficient difference, then apply the value @@ -240,7 +240,7 @@ bool IsBBEmpty(vtkRenderer* theRenderer) if(!theRenderer) return false; - vtkFloatingPointType aNewBndBox[6]; + double aNewBndBox[6]; aNewBndBox[ 0 ] = aNewBndBox[ 2 ] = aNewBndBox[ 4 ] = VTK_LARGE_FLOAT; aNewBndBox[ 1 ] = aNewBndBox[ 3 ] = aNewBndBox[ 5 ] = -VTK_LARGE_FLOAT; @@ -254,7 +254,7 @@ bool IsBBEmpty(vtkRenderer* theRenderer) if(VTKViewer_Actor* anActor = VTKViewer_Actor::SafeDownCast(anAct)) if(anActor->GetVisibility() && !anActor->IsInfinitive()) { - vtkFloatingPointType *aBounds = anActor->GetBounds(); + double *aBounds = anActor->GetBounds(); if(aBounds[0] > -VTK_LARGE_FLOAT && aBounds[1] < VTK_LARGE_FLOAT && aBounds[2] > -VTK_LARGE_FLOAT && aBounds[3] < VTK_LARGE_FLOAT && aBounds[4] > -VTK_LARGE_FLOAT && aBounds[5] < VTK_LARGE_FLOAT) @@ -264,14 +264,14 @@ bool IsBBEmpty(vtkRenderer* theRenderer) return !isAny; } -bool ComputeBBCenter(vtkRenderer* theRenderer, vtkFloatingPointType theCenter[3]) +bool ComputeBBCenter(vtkRenderer* theRenderer, double theCenter[3]) { theCenter[0] = theCenter[1] = theCenter[2] = 0.0; if(!theRenderer) return false; - vtkFloatingPointType aNewBndBox[6]; + double aNewBndBox[6]; aNewBndBox[ 0 ] = aNewBndBox[ 2 ] = aNewBndBox[ 4 ] = VTK_LARGE_FLOAT; aNewBndBox[ 1 ] = aNewBndBox[ 3 ] = aNewBndBox[ 5 ] = -VTK_LARGE_FLOAT; @@ -287,7 +287,7 @@ bool ComputeBBCenter(vtkRenderer* theRenderer, vtkFloatingPointType theCenter[3] { if(anActor->GetVisibility() && !anActor->IsInfinitive()) { - vtkFloatingPointType *aBounds = anActor->GetBounds(); + double *aBounds = anActor->GetBounds(); if(aBounds[0] > -VTK_LARGE_FLOAT && aBounds[1] < VTK_LARGE_FLOAT && aBounds[2] > -VTK_LARGE_FLOAT && aBounds[3] < VTK_LARGE_FLOAT && aBounds[4] > -VTK_LARGE_FLOAT && aBounds[5] < VTK_LARGE_FLOAT) @@ -314,16 +314,16 @@ bool ComputeBBCenter(vtkRenderer* theRenderer, vtkFloatingPointType theCenter[3] aNewBndBox[2] > -VTK_LARGE_FLOAT && aNewBndBox[3] < VTK_LARGE_FLOAT && aNewBndBox[4] > -VTK_LARGE_FLOAT && aNewBndBox[5] < VTK_LARGE_FLOAT) { - static vtkFloatingPointType MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT; + static double MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT; - vtkFloatingPointType aLength = aNewBndBox[1]-aNewBndBox[0]; + double aLength = aNewBndBox[1]-aNewBndBox[0]; aLength = std::max((aNewBndBox[3]-aNewBndBox[2]),aLength); aLength = std::max((aNewBndBox[5]-aNewBndBox[4]),aLength); if(aLength < MIN_DISTANCE) return false; - vtkFloatingPointType aWidth = + double aWidth = sqrt((aNewBndBox[1]-aNewBndBox[0])*(aNewBndBox[1]-aNewBndBox[0]) + (aNewBndBox[3]-aNewBndBox[2])*(aNewBndBox[3]-aNewBndBox[2]) + (aNewBndBox[5]-aNewBndBox[4])*(aNewBndBox[5]-aNewBndBox[4])); @@ -340,23 +340,23 @@ bool ComputeBBCenter(vtkRenderer* theRenderer, vtkFloatingPointType theCenter[3] return false; /* - vtkFloatingPointType aBounds[6]; + double aBounds[6]; int aCount = ComputeVisiblePropBounds(theRenderer,aBounds); printf("aNewBndBox[0] = %f, aNewBndBox[1] = %f,\naNewBndBox[2] = %f, aNewBndBox[3] = %f,\naNewBndBox[4] = %f, aNewBndBox[5] = %f\n", aBounds[0],aBounds[1],aBounds[2],aBounds[3],aBounds[4],aBounds[5]); printf("aCount = %d\n",aCount); if(aCount){ - static vtkFloatingPointType MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT; + static double MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT; - vtkFloatingPointType aLength = aBounds[1]-aBounds[0]; + double aLength = aBounds[1]-aBounds[0]; aLength = max((aBounds[3]-aBounds[2]),aLength); aLength = max((aBounds[5]-aBounds[4]),aLength); if(aLength < MIN_DISTANCE) return false; - vtkFloatingPointType aWidth = + double aWidth = sqrt((aBounds[1]-aBounds[0])*(aBounds[1]-aBounds[0]) + (aBounds[3]-aBounds[2])*(aBounds[3]-aBounds[2]) + (aBounds[5]-aBounds[4])*(aBounds[5]-aBounds[4])); diff --git a/src/VTKViewer/VTKViewer_Utilities.h b/src/VTKViewer/VTKViewer_Utilities.h index 1ddf940bf..87db690d5 100755 --- a/src/VTKViewer/VTKViewer_Utilities.h +++ b/src/VTKViewer/VTKViewer_Utilities.h @@ -37,7 +37,7 @@ VTKVIEWER_EXPORT extern int ComputeVisiblePropBounds(vtkRenderer* theRenderer, - vtkFloatingPointType theBounds[6]); + double theBounds[6]); VTKVIEWER_EXPORT extern @@ -47,9 +47,9 @@ VTKVIEWER_EXPORT extern bool ComputeTrihedronSize(vtkRenderer* theRenderer, - vtkFloatingPointType& theNewSize, - const vtkFloatingPointType theSize, - const vtkFloatingPointType theSizeInPercents); + double& theNewSize, + const double theSize, + const double theSizeInPercents); VTKVIEWER_EXPORT extern @@ -57,5 +57,5 @@ bool IsBBEmpty(vtkRenderer* theRenderer); VTKVIEWER_EXPORT extern bool ComputeBBCenter(vtkRenderer* theRenderer, - vtkFloatingPointType theCenter[3]); + double theCenter[3]); #endif diff --git a/src/VTKViewer/VTKViewer_ViewWindow.cxx b/src/VTKViewer/VTKViewer_ViewWindow.cxx index fcafdae31..d72b4643d 100755 --- a/src/VTKViewer/VTKViewer_ViewWindow.cxx +++ b/src/VTKViewer/VTKViewer_ViewWindow.cxx @@ -434,7 +434,7 @@ void VTKViewer_ViewWindow::onResetView() ::ResetCamera(myRenderer,true); if(aTriedronIsVisible) myTrihedron->VisibilityOn(); else myTrihedron->VisibilityOff(); - static vtkFloatingPointType aCoeff = 3.0; + static double aCoeff = 3.0; aCamera->SetParallelScale(aCoeff*aCamera->GetParallelScale()); Repaint(); } @@ -634,11 +634,11 @@ void VTKViewer_ViewWindow::onAdjustTrihedron(){ int aVisibleNum = myTrihedron->GetVisibleActorCount(myRenderer); if(aVisibleNum){ // calculating diagonal of visible props of the renderer - vtkFloatingPointType bnd[6]; + double bnd[6]; myTrihedron->VisibilityOff(); ::ComputeVisiblePropBounds(myRenderer,bnd); myTrihedron->VisibilityOn(); - vtkFloatingPointType aLength = 0; + double aLength = 0; static bool CalcByDiag = false; if(CalcByDiag){ aLength = sqrt((bnd[1]-bnd[0])*(bnd[1]-bnd[0])+ @@ -650,13 +650,13 @@ void VTKViewer_ViewWindow::onAdjustTrihedron(){ aLength = qMax((bnd[5]-bnd[4]),aLength); } - static vtkFloatingPointType aSizeInPercents = 105; + static double aSizeInPercents = 105; QString aSetting;// = SUIT_CONFIG->getSetting("Viewer:TrihedronSize"); if(!aSetting.isEmpty()) aSizeInPercents = aSetting.toFloat(); - static vtkFloatingPointType EPS_SIZE = 5.0E-3; - vtkFloatingPointType aSize = myTrihedron->GetSize(); - vtkFloatingPointType aNewSize = aLength*aSizeInPercents/100.0; + static double EPS_SIZE = 5.0E-3; + double aSize = myTrihedron->GetSize(); + double aNewSize = aLength*aSizeInPercents/100.0; // if the new trihedron size have sufficient difference, then apply the value if(fabs(aNewSize-aSize) > aSize*EPS_SIZE || fabs(aNewSize-aSize) > aNewSize*EPS_SIZE){ myTrihedron->SetSize(aNewSize); diff --git a/tools/vtkEDFOverloads/vtkEDFCutter.cxx b/tools/vtkEDFOverloads/vtkEDFCutter.cxx index 3de2a04f8..cafe013e9 100755 --- a/tools/vtkEDFOverloads/vtkEDFCutter.cxx +++ b/tools/vtkEDFOverloads/vtkEDFCutter.cxx @@ -88,7 +88,6 @@ bool operator < (const vtkEDFEdge& e0, const vtkEDFEdge& e1) } vtkStandardNewMacro(vtkEDFCutter); -vtkCxxRevisionMacro(vtkEDFCutter, "0.0"); vtkEDFCutter::vtkEDFCutter() { diff --git a/tools/vtkEDFOverloads/vtkEDFCutter.h b/tools/vtkEDFOverloads/vtkEDFCutter.h index 66cc6a9b6..559354e1b 100755 --- a/tools/vtkEDFOverloads/vtkEDFCutter.h +++ b/tools/vtkEDFOverloads/vtkEDFCutter.h @@ -27,7 +27,7 @@ class VTKTOOLS_EXPORT vtkEDFCutter : public vtkCutter { public : static vtkEDFCutter* New(); - vtkTypeRevisionMacro(vtkEDFCutter, vtkCutter); + vtkTypeMacro(vtkEDFCutter, vtkCutter); void PrintSelf(ostream& os, vtkIndent indent); // Description: