Salome HOME
Porting to VTK 6.
[modules/visu.git] / src / PIPELINE / VISU_SphereWidget.cxx
index 27681762ff9b5fed4f2b5cecb6d0536c52081de0..93a440b933d74fc941fa6ca620fb2170a6a2317e 100755 (executable)
@@ -43,7 +43,6 @@
 #include <vtkImplicitSum.h>
 #include <vtkImplicitFunction.h>
 
-vtkCxxRevisionMacro(VISU_SphereWidget, "$Revision$");
 vtkStandardNewMacro(VISU_SphereWidget);
 //====================================================================
 // function:
@@ -65,7 +64,7 @@ VISU_SphereWidget::VISU_SphereWidget()
   mySphereActor->SetMapper(mySphereMapper);
   //
   // Define the point coordinates
-  vtkFloatingPointType bounds[6];
+  double bounds[6];
   for(int i = 0; i < 6; i += 2){
     bounds[i]=-.5;
     bounds[i+1]=-bounds[i];
@@ -148,7 +147,7 @@ int VISU_SphereWidget::GetPhiResolution()
 // function: SetRadius
 // purpose :
 //====================================================================
-void VISU_SphereWidget::SetRadius(vtkFloatingPointType theRadius) 
+void VISU_SphereWidget::SetRadius(double theRadius) 
 {
   if ( theRadius <= myRmin ) {
     theRadius = myRmin;
@@ -160,7 +159,7 @@ void VISU_SphereWidget::SetRadius(vtkFloatingPointType theRadius)
 // function: GetRadius
 // purpose :
 //====================================================================
-vtkFloatingPointType VISU_SphereWidget::GetRadius()
+double VISU_SphereWidget::GetRadius()
 { 
   return mySphereSource->GetRadius(); 
 }
@@ -168,7 +167,7 @@ vtkFloatingPointType VISU_SphereWidget::GetRadius()
 // function: SetCenter
 // purpose :
 //====================================================================
-void VISU_SphereWidget::SetCenter(vtkFloatingPointType theCenter[3]) 
+void VISU_SphereWidget::SetCenter(double theCenter[3]) 
 {
   mySphereSource->SetCenter(theCenter);
   mySphere->SetCenter(theCenter);
@@ -177,9 +176,9 @@ void VISU_SphereWidget::SetCenter(vtkFloatingPointType theCenter[3])
 // function: SetCenter
 // purpose :
 //====================================================================
-void VISU_SphereWidget::SetCenter(vtkFloatingPointType theX, vtkFloatingPointType theY, vtkFloatingPointType theZ) 
+void VISU_SphereWidget::SetCenter(double theX, double theY, double theZ) 
 {
-  vtkFloatingPointType aCenter[3] = {theX, theY, theZ};
+  double aCenter[3] = {theX, theY, theZ};
   SetCenter(aCenter);
 }
 
@@ -187,7 +186,7 @@ void VISU_SphereWidget::SetCenter(vtkFloatingPointType theX, vtkFloatingPointTyp
 // function: GetCenter
 // purpose :
 //====================================================================
-vtkFloatingPointType*  VISU_SphereWidget::GetCenter() 
+double*  VISU_SphereWidget::GetCenter() 
 {
   return mySphereSource->GetCenter();
 }
@@ -195,7 +194,7 @@ vtkFloatingPointType*  VISU_SphereWidget::GetCenter()
 // function: GetCenter
 // purpose :
 //====================================================================
-void  VISU_SphereWidget::GetCenter(vtkFloatingPointType theCenter[3]) 
+void  VISU_SphereWidget::GetCenter(double theCenter[3]) 
 {
   mySphereSource->GetCenter(theCenter);
 }
@@ -491,7 +490,7 @@ void VISU_SphereWidget::OnMiddleButtonUp()
 //====================================================================
 void VISU_SphereWidget::Translate(double *p1, double *p2)
 {
-  vtkFloatingPointType v[3], aC[3], aC1[3];
+  double v[3], aC[3], aC1[3];
   //
   v[0] = p2[0] - p1[0];
   v[1] = p2[1] - p1[1];
@@ -517,7 +516,7 @@ void VISU_SphereWidget::Scale(double *p1, double *p2,
   v[1] = p2[1] - p1[1];
   v[2] = p2[2] - p1[2];
   //
-  vtkFloatingPointType aC[3], aR, sf, aR1;
+  double aC[3], aR, sf, aR1;
   aR=mySphereSource->GetRadius();
   mySphereSource->GetCenter(aC);
   sf=vtkMath::Norm(v)/aR;
@@ -583,12 +582,12 @@ void VISU_SphereWidget::CreateDefaultProperties()
 // function:PlaceWidget
 // purpose:
 //====================================================================
-void VISU_SphereWidget::PlaceWidget(vtkFloatingPointType bds[6])
+void VISU_SphereWidget::PlaceWidget(double bds[6])
 {
-  vtkFloatingPointType bounds[6], center[3], radius;
+  double bounds[6], center[3], radius;
 
   this->AdjustBounds(bds, bounds, center);
-  vtkFloatingPointType dX, dY, dZ;
+  double dX, dY, dZ;
   //
   dX=bounds[1]-bounds[0];
   dY=bounds[3]-bounds[2];
@@ -613,7 +612,7 @@ void VISU_SphereWidget::PlaceWidget(vtkFloatingPointType bds[6])
                        (bounds[3]-bounds[2])*(bounds[3]-bounds[2]) +
                        (bounds[5]-bounds[4])*(bounds[5]-bounds[4]));
 
-  static vtkFloatingPointType EPS = 1.0E-1;
+  static double EPS = 1.0E-1;
   myRmin = EPS*InitialLength;
 
 }