#include <vtkImplicitSum.h>
#include <vtkImplicitFunction.h>
-vtkCxxRevisionMacro(VISU_SphereWidget, "$Revision$");
vtkStandardNewMacro(VISU_SphereWidget);
//====================================================================
// function:
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];
// function: SetRadius
// purpose :
//====================================================================
-void VISU_SphereWidget::SetRadius(vtkFloatingPointType theRadius)
+void VISU_SphereWidget::SetRadius(double theRadius)
{
if ( theRadius <= myRmin ) {
theRadius = myRmin;
// function: GetRadius
// purpose :
//====================================================================
-vtkFloatingPointType VISU_SphereWidget::GetRadius()
+double VISU_SphereWidget::GetRadius()
{
return mySphereSource->GetRadius();
}
// function: SetCenter
// purpose :
//====================================================================
-void VISU_SphereWidget::SetCenter(vtkFloatingPointType theCenter[3])
+void VISU_SphereWidget::SetCenter(double theCenter[3])
{
mySphereSource->SetCenter(theCenter);
mySphere->SetCenter(theCenter);
// 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);
}
// function: GetCenter
// purpose :
//====================================================================
-vtkFloatingPointType* VISU_SphereWidget::GetCenter()
+double* VISU_SphereWidget::GetCenter()
{
return mySphereSource->GetCenter();
}
// function: GetCenter
// purpose :
//====================================================================
-void VISU_SphereWidget::GetCenter(vtkFloatingPointType theCenter[3])
+void VISU_SphereWidget::GetCenter(double theCenter[3])
{
mySphereSource->GetCenter(theCenter);
}
//====================================================================
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];
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;
// 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];
(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;
}