]> SALOME platform Git repositories - modules/visu.git/blobdiff - src/VISUGUI/VisuGUI_ClippingDlg.cxx
Salome HOME
Porting to VTK 6.
[modules/visu.git] / src / VISUGUI / VisuGUI_ClippingDlg.cxx
index a9786c3c072497d8f76b2f4248276762d0f6148a..57c864c31c1c033d154c2d20432280252d3a469d 100644 (file)
@@ -891,18 +891,18 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneParam()
 
   OrientedPlane* aPlane = myPlanes[aCurPlaneIndex].GetPointer();
 
-  vtkFloatingPointType aNormal[3];
+  double aNormal[3];
   VISU::Orientation anOrientation;
-  vtkFloatingPointType aDir[3][3] = {{0, 0, 0}, {0, 0, 0}};
+  double aDir[3][3] = {{0, 0, 0}, {0, 0, 0}};
   {
     static double aCoeff = vtkMath::Pi()/180.0;
 
-    vtkFloatingPointType aRot[2] = {getRotation1(), getRotation2()};
+    double aRot[2] = {getRotation1(), getRotation2()};
     aPlane->myAngle[0] = aRot[0];
     aPlane->myAngle[1] = aRot[1];
 
-    vtkFloatingPointType anU[2] = {cos(aCoeff*aRot[0]), cos(aCoeff*aRot[1])};
-    vtkFloatingPointType aV[2] = {sqrt(1.0-anU[0]*anU[0]), sqrt(1.0-anU[1]*anU[1])};
+    double anU[2] = {cos(aCoeff*aRot[0]), cos(aCoeff*aRot[1])};
+    double aV[2] = {sqrt(1.0-anU[0]*anU[0]), sqrt(1.0-anU[1]*anU[1])};
     aV[0] = aRot[0] > 0? aV[0]: -aV[0];
     aV[1] = aRot[1] > 0? aV[1]: -aV[1];
 
@@ -950,42 +950,42 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneParam()
   myPrs3d->SetPlaneParam(aNormal, 1. - getDistance(), aPlane);
 
   //Get bounds of the visible part of the dataset
-  vtkFloatingPointType aBounds[6];
+  double aBounds[6];
   myPrs3d->GetPipeLine()->GetVisibleBounds(aBounds);
 
   //Get center 
-  vtkFloatingPointType aPnt[3];
+  double aPnt[3];
   VISU::ComputeBoxCenter(aBounds,aPnt);
 
-  vtkFloatingPointType* anOrigin = aPlane->GetOrigin();
+  double* anOrigin = aPlane->GetOrigin();
   
   //Get Length of the diagonal
-  vtkFloatingPointType aDel = VISU::ComputeBoxDiagonal(aBounds)/2.0;
+  double aDel = VISU::ComputeBoxDiagonal(aBounds)/2.0;
   
-  vtkFloatingPointType aDelta[2][3] = {{aDir[0][0]*aDel, aDir[0][1]*aDel, aDir[0][2]*aDel},
+  double aDelta[2][3] = {{aDir[0][0]*aDel, aDir[0][1]*aDel, aDir[0][2]*aDel},
                                        {aDir[1][0]*aDel, aDir[1][1]*aDel, aDir[1][2]*aDel}};
-  vtkFloatingPointType aParam, aPnt0[3], aPnt1[3], aPnt2[3];
+  double aParam, aPnt0[3], aPnt1[3], aPnt2[3];
   
-  vtkFloatingPointType aPnt01[3] = {aPnt[0] - aDelta[0][0] - aDelta[1][0],
+  double aPnt01[3] = {aPnt[0] - aDelta[0][0] - aDelta[1][0],
                                     aPnt[1] - aDelta[0][1] - aDelta[1][1],
                                     aPnt[2] - aDelta[0][2] - aDelta[1][2]};
-  vtkFloatingPointType aPnt02[3] = {aPnt01[0] + aNormal[0],
+  double aPnt02[3] = {aPnt01[0] + aNormal[0],
                                     aPnt01[1] + aNormal[1],
                                     aPnt01[2] + aNormal[2]};
   vtkPlane::IntersectWithLine(aPnt01,aPnt02,aNormal,anOrigin,aParam,aPnt0);
 
-  vtkFloatingPointType aPnt11[3] = {aPnt[0] - aDelta[0][0] + aDelta[1][0],
+  double aPnt11[3] = {aPnt[0] - aDelta[0][0] + aDelta[1][0],
                                     aPnt[1] - aDelta[0][1] + aDelta[1][1],
                                     aPnt[2] - aDelta[0][2] + aDelta[1][2]};
-  vtkFloatingPointType aPnt12[3] = {aPnt11[0] + aNormal[0],
+  double aPnt12[3] = {aPnt11[0] + aNormal[0],
                                     aPnt11[1] + aNormal[1],
                                     aPnt11[2] + aNormal[2]};
   vtkPlane::IntersectWithLine(aPnt11,aPnt12,aNormal,anOrigin,aParam,aPnt1);
 
-  vtkFloatingPointType aPnt21[3] = {aPnt[0] + aDelta[0][0] - aDelta[1][0],
+  double aPnt21[3] = {aPnt[0] + aDelta[0][0] - aDelta[1][0],
                                     aPnt[1] + aDelta[0][1] - aDelta[1][1],
                                     aPnt[2] + aDelta[0][2] - aDelta[1][2]};
-  vtkFloatingPointType aPnt22[3] = {aPnt21[0] + aNormal[0],
+  double aPnt22[3] = {aPnt21[0] + aNormal[0],
                                     aPnt21[1] + aNormal[1],
                                     aPnt21[2] + aNormal[2]};
   vtkPlane::IntersectWithLine(aPnt21,aPnt22,aNormal,anOrigin,aParam,aPnt2);
@@ -1035,14 +1035,14 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneIJKParam()
   VISU::Result_i::TAxis axis = (VISU::Result_i::TAxis) axId;
   gp_Dir dir;
   CORBA::String_var aMeshName = myPrs3d->GetMeshName();
-  const vector<vtkFloatingPointType> * values =
+  const vector<double> * values =
     result->GetAxisInfo(aMeshName.in(), axis, dir);
   if (!values)
     return;
 
   // find distance;
   int index = SpinBoxIJKIndex->value();
-  vtkFloatingPointType distance = 0;
+  double distance = 0;
   if (index < values->size())
     distance = (*values)[ index ];
 
@@ -1059,14 +1059,14 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneIJKParam()
     }
   }
   // find rotation angles
-  vtkFloatingPointType angle[2];
+  double angle[2];
   int rotId[2] = {
     (axId == 0) ? 2 : axId - 1,
     (axId == 2) ? 0 : axId + 1
     };
   static double aCoeff = 180.0/vtkMath::Pi();
   for (i = 0; i < 2; ++i) {
-    vtkFloatingPointType cosin = cos[ rotId[ i ]];
+    double cosin = cos[ rotId[ i ]];
 //     if (maxCos < 0)
 //       cosin = -cosin;
     angle[ i ] = asin(cosin) * aCoeff;
@@ -1103,7 +1103,7 @@ void VisuGUI_ClippingDlg::setIJKByNonStructured()
   int planeIndex = ComboBoxPlanes->currentIndex();
   OrientedPlane* plane = myPlanes[ planeIndex ].GetPointer();
   vtkPlaneSource* planeSource = plane->myPlaneSource;
-  vtkFloatingPointType * planeNormal = planeSource->GetNormal();
+  double * planeNormal = planeSource->GetNormal();
   gp_Dir normal(planeNormal[0], planeNormal[1], planeNormal[2]);
 
   // find a grid axis most co-directed with plane normal
@@ -1111,7 +1111,7 @@ void VisuGUI_ClippingDlg::setIJKByNonStructured()
   int i, maxAx = 0, gridAxId = 0;
   gp_Dir dir, gridDir;
   double maxDot = 0;
-  const vector<vtkFloatingPointType> *curValues, *values = 0;
+  const vector<double> *curValues, *values = 0;
   VISU::Result_i* result = myPrs3d->GetCResult();
   int aNbAxes = 3;
   VISU_PipeLine* aPipeLine = myPrs3d->GetPipeLine();
@@ -1200,7 +1200,7 @@ void VisuGUI_ClippingDlg::onIJKAxisChanged(int axisId)
     VISU::Result_i::TAxis axis = (VISU::Result_i::TAxis) axisId;
     gp_Dir dir;
     CORBA::String_var aMeshName = myPrs3d->GetMeshName();
-    const vector<vtkFloatingPointType> * indices = result->GetAxisInfo(aMeshName.in(),
+    const vector<double> * indices = result->GetAxisInfo(aMeshName.in(),
                                                                        axis, dir);
     if (indices)
       maxIndex = indices->size() - 1;