Commit 181138fb authored by Ken Martin's avatar Ken Martin

double changes

parent 25d38506
......@@ -86,7 +86,7 @@ public:
// Description:
// Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
// in world coordinates. NULL means that the bounds are not defined.
virtual float *GetBounds() {return NULL;}
virtual double *GetBounds() {return NULL;}
// Description:
// Shallow copy of this vtkProp.
......@@ -150,9 +150,9 @@ public:
// the time. We need the viewport for viewing parameters that affect timing.
// The no-arguments version simply returns the value of the variable with
// no estimation.
virtual float GetEstimatedRenderTime( vtkViewport * )
virtual double GetEstimatedRenderTime( vtkViewport * )
{ return this->EstimatedRenderTime; }
virtual float GetEstimatedRenderTime(){ return this->EstimatedRenderTime; }
virtual double GetEstimatedRenderTime(){ return this->EstimatedRenderTime; }
// Description:
// WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE
......@@ -160,7 +160,7 @@ public:
// This method is used by, for example, the vtkLODProp3D in order to
// initialize the estimated render time at start-up to some user defined
// value.
virtual void SetEstimatedRenderTime(float t)
virtual void SetEstimatedRenderTime(double t)
{this->EstimatedRenderTime = t; this->SavedEstimatedRenderTime = t;}
// Description:
......@@ -186,7 +186,7 @@ public:
// really a modification to the object. (For example, we don't want
// to rebuild matrices at every render because the estimated render time
// is changing)
virtual void AddEstimatedRenderTime(float t, vtkViewport *vtkNotUsed(vp))
virtual void AddEstimatedRenderTime(double t, vtkViewport *vtkNotUsed(vp))
{this->EstimatedRenderTime+=t;}
// Description:
......@@ -198,7 +198,7 @@ public:
// A side effect of this method is to reset the EstimatedRenderTime to
// 0.0. This way, each of the ways that this prop may be rendered can
// be timed and added together into this value.
virtual void SetAllocatedRenderTime(float t, vtkViewport *vtkNotUsed(v))
virtual void SetAllocatedRenderTime(double t, vtkViewport *vtkNotUsed(v))
{
this->AllocatedRenderTime = t;
this->SavedEstimatedRenderTime = this->EstimatedRenderTime;
......@@ -208,7 +208,7 @@ public:
// Description:
// WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE
// DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS
vtkGetMacro(AllocatedRenderTime, float);
vtkGetMacro(AllocatedRenderTime, double);
// Description:
// WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE
......@@ -216,8 +216,8 @@ public:
// Get/Set the multiplier for the render time. This is used
// for culling and is a number between 0 and 1. It is used
// to create the allocated render time value.
void SetRenderTimeMultiplier( float t ) { this->RenderTimeMultiplier = t; }
vtkGetMacro(RenderTimeMultiplier, float);
void SetRenderTimeMultiplier( double t ) { this->RenderTimeMultiplier = t; }
vtkGetMacro(RenderTimeMultiplier, double);
// Description:
// WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE
......@@ -246,10 +246,10 @@ protected:
int Pickable;
int Dragable;
float AllocatedRenderTime;
float EstimatedRenderTime;
float SavedEstimatedRenderTime;
float RenderTimeMultiplier;
double AllocatedRenderTime;
double EstimatedRenderTime;
double SavedEstimatedRenderTime;
double RenderTimeMultiplier;
// how many consumers does this object have
int NumberOfConsumers;
......
......@@ -17,20 +17,20 @@
#include "vtkAssemblyNode.h"
#include "vtkAssemblyPath.h"
#include "vtkAssemblyPaths.h"
#include "vtkMath.h"
#include "vtkObjectFactory.h"
#include "vtkProp.h"
#include "vtkPropCollection.h"
#include "vtkViewport.h"
vtkCxxRevisionMacro(vtkPropAssembly, "1.22");
vtkCxxRevisionMacro(vtkPropAssembly, "1.23");
vtkStandardNewMacro(vtkPropAssembly);
// Construct object with no children.
vtkPropAssembly::vtkPropAssembly()
{
this->Parts = vtkPropCollection::New();
this->Bounds[0] = this->Bounds[2] = this->Bounds[4] = VTK_LARGE_FLOAT;
this->Bounds[1] = this->Bounds[3] = this->Bounds[5] = -VTK_LARGE_FLOAT;
vtkMath::UninitializeBounds(this->Bounds);
}
vtkPropAssembly::~vtkPropAssembly()
......@@ -70,11 +70,11 @@ int vtkPropAssembly::RenderTranslucentGeometry(vtkViewport *ren)
{
vtkProp *prop;
vtkAssemblyPath *path;
float fraction;
double fraction;
int renderedSomething=0;
fraction = this->AllocatedRenderTime /
(float)this->Parts->GetNumberOfItems();
(double)this->Parts->GetNumberOfItems();
// render the Paths
for ( this->Paths->InitTraversal(); (path = this->Paths->GetNextItem()); )
......@@ -97,14 +97,14 @@ int vtkPropAssembly::RenderOpaqueGeometry(vtkViewport *ren)
{
vtkProp *prop;
vtkAssemblyPath *path;
float fraction;
double fraction;
int renderedSomething=0;
// Make sure the paths are up-to-date
this->UpdatePaths();
fraction = this->AllocatedRenderTime /
(float)this->Parts->GetNumberOfItems();
(double)this->Parts->GetNumberOfItems();
// render the Paths
for ( this->Paths->InitTraversal(); (path = this->Paths->GetNextItem()); )
......@@ -127,14 +127,14 @@ int vtkPropAssembly::RenderOverlay(vtkViewport *ren)
{
vtkProp *prop;
vtkAssemblyPath *path;
float fraction;
double fraction;
int renderedSomething=0;
// Make sure the paths are up-to-date
this->UpdatePaths();
fraction = this->AllocatedRenderTime /
(float)this->Parts->GetNumberOfItems();
(double)this->Parts->GetNumberOfItems();
for ( this->Paths->InitTraversal(); (path = this->Paths->GetNextItem()); )
{
......@@ -166,28 +166,32 @@ void vtkPropAssembly::ReleaseGraphicsResources(vtkWindow *renWin)
}
// Get the bounds for the assembly as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
float *vtkPropAssembly::GetBounds()
double *vtkPropAssembly::GetBounds()
{
vtkProp *part;
int i, n;
float *bounds, bbox[24];
double *bounds, bbox[24];
int partVisible=0;
this->Bounds[0] = this->Bounds[2] = this->Bounds[4] = VTK_LARGE_FLOAT;
this->Bounds[1] = this->Bounds[3] = this->Bounds[5] = -VTK_LARGE_FLOAT;
// carefully compute the bounds
for ( this->Parts->InitTraversal(); (part=this->Parts->GetNextProp()); )
{
if ( part->GetVisibility() )
{
bounds = part->GetBounds();
if ( bounds != NULL )
{
// For the purposes of GetBounds, an object is visisble only if
// its visibility is on and it has visible parts.
partVisible = 1;
if (!partVisible)
{
// initialize the bounds
this->Bounds[0] =this->Bounds[2] =this->Bounds[4] = VTK_DOUBLE_MAX;
this->Bounds[1] =this->Bounds[3] =this->Bounds[5] = -VTK_DOUBLE_MAX;
partVisible = 1;
}
// fill out vertices of a bounding box
bbox[ 0] = bounds[1]; bbox[ 1] = bounds[3]; bbox[ 2] = bounds[5];
bbox[ 3] = bounds[1]; bbox[ 4] = bounds[2]; bbox[ 5] = bounds[5];
......@@ -197,7 +201,7 @@ float *vtkPropAssembly::GetBounds()
bbox[15] = bounds[1]; bbox[16] = bounds[2]; bbox[17] = bounds[4];
bbox[18] = bounds[0]; bbox[19] = bounds[2]; bbox[20] = bounds[4];
bbox[21] = bounds[0]; bbox[22] = bounds[3]; bbox[23] = bounds[4];
for (i = 0; i < 8; i++)
{
for (n = 0; n < 3; n++)
......@@ -215,7 +219,7 @@ float *vtkPropAssembly::GetBounds()
}//if bounds
}//for each part
}//for each part
if ( ! partVisible )
{
return NULL;
......
......@@ -82,7 +82,7 @@ public:
// Description:
// Get the bounds for this prop assembly as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
// May return NULL in some cases (meaning the bounds is undefined).
float *GetBounds();
double *GetBounds();
// Description:
// Shallow copy of this vtkPropAssembly.
......@@ -119,7 +119,7 @@ protected:
~vtkPropAssembly();
vtkPropCollection *Parts;
float Bounds[6];
double Bounds[6];
// Support the BuildPaths() method,
vtkTimeStamp PathTime;
......
......@@ -40,6 +40,12 @@
# include "vtkIOStream.h" // Include the real C++ streams.
#endif
// define the type of floating point interface used for old and new versions
// of VTK VTK42 and older use float and VTK 44 and newer use double for most
// of the API calls
#define vtkFloatingPointType vtkFloatingPointType
typedef double vtkFloatingPointType;
#define __VTK_SYSTEM_INCLUDES__INSIDE
#include "vtkIdType.h" // Define vtkIdType and its stream operators.
#include "vtkOStreamWrapper.h" // Include the ostream wrapper.
......
......@@ -181,7 +181,7 @@ class VTK_COMMON_EXPORT vtkTransform : public vtkLinearTransform
orient[0] = static_cast<float>(temp[0]);
orient[1] = static_cast<float>(temp[1]);
orient[2] = static_cast<float>(temp[2]); };
float *GetOrientation() {
double *GetOrientation() {
this->GetOrientation(this->ReturnValue); return this->ReturnValue; };
// Description:
......@@ -193,7 +193,7 @@ class VTK_COMMON_EXPORT vtkTransform : public vtkLinearTransform
wxyz[1]=static_cast<float>(temp[1]);
wxyz[2]=static_cast<float>(temp[2]);
wxyz[3]=static_cast<float>(temp[3]);};
float *GetOrientationWXYZ() {
double *GetOrientationWXYZ() {
this->GetOrientationWXYZ(this->ReturnValue); return this->ReturnValue; };
// Description:
......@@ -206,7 +206,7 @@ class VTK_COMMON_EXPORT vtkTransform : public vtkLinearTransform
pos[0] = static_cast<float>(temp[0]);
pos[1] = static_cast<float>(temp[1]);
pos[2] = static_cast<float>(temp[2]); };
float *GetPosition() {
double *GetPosition() {
this->GetPosition(this->ReturnValue); return this->ReturnValue; };
// Description:
......@@ -220,7 +220,7 @@ class VTK_COMMON_EXPORT vtkTransform : public vtkLinearTransform
scale[0] = static_cast<float>(temp[0]);
scale[1] = static_cast<float>(temp[1]);
scale[2] = static_cast<float>(temp[2]); };
float *GetScale() {
double *GetScale() {
this->GetScale(this->ReturnValue); return this->ReturnValue; };
// Description:
......@@ -316,7 +316,7 @@ protected:
float Point[4];
double DoublePoint[4];
float ReturnValue[4];
double ReturnValue[4];
private:
vtkTransform (const vtkTransform&); // Not implemented
void operator=(const vtkTransform&); // Not implemented
......
......@@ -23,7 +23,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkConeSource, "1.64");
vtkCxxRevisionMacro(vtkConeSource, "1.65");
vtkStandardNewMacro(vtkConeSource);
//----------------------------------------------------------------------------
......@@ -49,9 +49,9 @@ vtkConeSource::vtkConeSource(int res)
//----------------------------------------------------------------------------
void vtkConeSource::Execute()
{
float angle;
double angle;
int numLines, numPolys, numPts;
float x[3], xbot;
double x[3], xbot;
int i;
vtkIdType pts[VTK_CELL_SIZE];
vtkPoints *newPoints;
......@@ -230,8 +230,8 @@ void vtkConeSource::Execute()
{
vtkTransform *t = vtkTransform::New();
t->Translate(this->Center[0], this->Center[1], this->Center[2]);
float vMag = vtkMath::Norm(this->Direction);
t->RotateWXYZ((float)180.0, (this->Direction[0]+vMag)/2.0,
double vMag = vtkMath::Norm(this->Direction);
t->RotateWXYZ((double)180.0, (this->Direction[0]+vMag)/2.0,
this->Direction[1]/2.0, this->Direction[2]/2.0);
float *ipts = ((vtkFloatArray *)newPoints->GetData())->GetPointer(0);
for (i=0; i<numPts; i++, ipts+=3)
......@@ -268,13 +268,13 @@ void vtkConeSource::ExecuteInformation()
//----------------------------------------------------------------------------
void vtkConeSource::SetAngle(float angle)
void vtkConeSource::SetAngle(double angle)
{
this->SetRadius (this->Height * tan ((double) angle*vtkMath::DegreesToRadians()));
}
//----------------------------------------------------------------------------
float vtkConeSource::GetAngle()
double vtkConeSource::GetAngle()
{
return atan2 (this->Radius, this->Height) / vtkMath::DegreesToRadians();
}
......
......@@ -46,13 +46,13 @@ public:
// Description:
// Set the height of the cone. This is the height along the cone in
// its specified direction.
vtkSetClampMacro(Height,float,0.0,VTK_LARGE_FLOAT)
vtkGetMacro(Height,float);
vtkSetClampMacro(Height,double,0.0,VTK_DOUBLE_MAX)
vtkGetMacro(Height,double);
// Description:
// Set the base radius of the cone.
vtkSetClampMacro(Radius,float,0.0,VTK_LARGE_FLOAT)
vtkGetMacro(Radius,float);
vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX)
vtkGetMacro(Radius,double);
// Description:
// Set the number of facets used to represent the cone.
......@@ -61,21 +61,21 @@ public:
// Description:
// Set the center of the cone. The default is 0,0,0.
vtkSetVector3Macro(Center,float);
vtkGetVectorMacro(Center,float,3);
vtkSetVector3Macro(Center,double);
vtkGetVectorMacro(Center,double,3);
// Description:
// Set the orientation vector of the cone. The vector does not have
// to be normalized. The cone will point in the Direction specified.
// The default is (1,0,0).
vtkSetVector3Macro(Direction,float);
vtkGetVectorMacro(Direction,float,3);
vtkSetVector3Macro(Direction,double);
vtkGetVectorMacro(Direction,double,3);
// Description:
// Set the angle of the cone. As a side effect, the angle plus height sets
// the base radius of the cone.
void SetAngle (float angle);
float GetAngle ();
void SetAngle (double angle);
double GetAngle ();
// Description:
// Turn on/off whether to cap the base of the cone with a polygon.
......@@ -90,12 +90,12 @@ protected:
void Execute();
void ExecuteInformation();
float Height;
float Radius;
double Height;
double Radius;
int Resolution;
int Capping;
float Center[3];
float Direction[3];
double Center[3];
double Direction[3];
private:
vtkConeSource(const vtkConeSource&); // Not implemented.
......
......@@ -20,7 +20,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkCursor3D, "1.42");
vtkCxxRevisionMacro(vtkCursor3D, "1.43");
vtkStandardNewMacro(vtkCursor3D);
// Construct with model bounds = (-1,1,-1,1,-1,1), focal point = (0,0,0),
......@@ -67,7 +67,7 @@ void vtkCursor3D::Execute()
int numPts=0, numLines=0;
vtkPoints *newPts;
vtkCellArray *newLines;
float x[3];
double x[3];
vtkIdType ptIds[2];
vtkPolyData *output = this->GetOutput();
......@@ -389,9 +389,9 @@ void vtkCursor3D::Execute()
}
// Set the boundary of the 3D cursor.
void vtkCursor3D::SetModelBounds(float xmin, float xmax,
float ymin, float ymax,
float zmin, float zmax)
void vtkCursor3D::SetModelBounds(double xmin, double xmax,
double ymin, double ymax,
double zmin, double zmax)
{
if ( xmin != this->ModelBounds[0] || xmax != this->ModelBounds[1] ||
ymin != this->ModelBounds[2] || ymax != this->ModelBounds[3] ||
......@@ -413,7 +413,7 @@ void vtkCursor3D::SetModelBounds(float xmin, float xmax,
}
}
void vtkCursor3D::SetFocalPoint(float x[3])
void vtkCursor3D::SetFocalPoint(double x[3])
{
if ( x[0] == this->FocalPoint[0] && x[1] == this->FocalPoint[1] &&
x[2] == this->FocalPoint[2] )
......@@ -423,7 +423,7 @@ void vtkCursor3D::SetFocalPoint(float x[3])
this->Modified();
float v[3];
double v[3];
for (int i=0; i<3; i++)
{
v[i] = x[i] - this->FocalPoint[i];
......@@ -454,7 +454,7 @@ void vtkCursor3D::SetFocalPoint(float x[3])
}
}
void vtkCursor3D::SetModelBounds(float bounds[6])
void vtkCursor3D::SetModelBounds(double bounds[6])
{
this->SetModelBounds(bounds[0], bounds[1], bounds[2], bounds[3], bounds[4],
bounds[5]);
......
......@@ -42,10 +42,10 @@ public:
// Description:
// Set / get the boundary of the 3D cursor.
void SetModelBounds(float xmin, float xmax, float ymin, float ymax,
float zmin, float zmax);
void SetModelBounds(float bounds[6]);
vtkGetVectorMacro(ModelBounds,float,6);
void SetModelBounds(double xmin, double xmax, double ymin, double ymax,
double zmin, double zmax);
void SetModelBounds(double bounds[6]);
vtkGetVectorMacro(ModelBounds,double,6);
// Description:
// Set/Get the position of cursor focus. If translation mode is on,
......@@ -53,14 +53,14 @@ public:
// is translated. Otherwise, the focal point will either be clamped to the
// bounding box, or wrapped, if Wrap is on. (Note: this behavior requires
// that the bounding box is set prior to the focal point.)
void SetFocalPoint(float x[3]);
void SetFocalPoint(float x, float y, float z)
void SetFocalPoint(double x[3]);
void SetFocalPoint(double x, double y, double z)
{
float xyz[3];
double xyz[3];
xyz[0] = x; xyz[1] = y; xyz[2] = z;
this->SetFocalPoint(xyz);
}
vtkGetVectorMacro(FocalPoint,float,3);
vtkGetVectorMacro(FocalPoint,double,3);
// Description:
// Turn on/off the wireframe bounding box.
......@@ -124,8 +124,8 @@ protected:
void Execute();
vtkPolyData *Focus;
float ModelBounds[6];
float FocalPoint[3];
double ModelBounds[6];
double FocalPoint[3];
int Outline;
int Axes;
int XShadows;
......
......@@ -22,7 +22,7 @@
#include "vtkPolyData.h"
#include <math.h>
vtkCxxRevisionMacro(vtkLineSource, "1.43");
vtkCxxRevisionMacro(vtkLineSource, "1.44");
vtkStandardNewMacro(vtkLineSource);
vtkLineSource::vtkLineSource(int res)
......@@ -42,7 +42,7 @@ void vtkLineSource::Execute()
{
int numLines=this->Resolution;
int numPts=this->Resolution+1;
float x[3], tc[3], v[3];
double x[3], tc[3], v[3];
int i, j;
vtkPoints *newPoints;
vtkFloatArray *newTCoords;
......@@ -71,7 +71,7 @@ void vtkLineSource::Execute()
tc[2] = 0.0;
for (i=0; i<numPts; i++)
{
tc[0] = ((float)i/this->Resolution);
tc[0] = ((double)i/this->Resolution);
for (j=0; j<3; j++)
{
x[j] = this->Point1[j] + tc[0]*v[j];
......
......@@ -32,13 +32,13 @@ public:
// Description:
// Set position of first end point.
vtkSetVector3Macro(Point1,float);
vtkGetVectorMacro(Point1,float,3);
vtkSetVector3Macro(Point1,double);
vtkGetVectorMacro(Point1,double,3);
// Description:
// Set position of other end point.
vtkSetVector3Macro(Point2,float);
vtkGetVectorMacro(Point2,float,3);
vtkSetVector3Macro(Point2,double);
vtkGetVectorMacro(Point2,double,3);
// Description:
// Divide line into resolution number of pieces.
......@@ -50,8 +50,8 @@ protected:
~vtkLineSource() {};
void Execute();
float Point1[3];
float Point2[3];
double Point1[3];
double Point2[3];
int Resolution;
private:
vtkLineSource(const vtkLineSource&); // Not implemented.
......
......@@ -23,7 +23,7 @@
#include "vtkPolyData.h"
#include "vtkTransform.h"
vtkCxxRevisionMacro(vtkPlaneSource, "1.60");
vtkCxxRevisionMacro(vtkPlaneSource, "1.61");
vtkStandardNewMacro(vtkPlaneSource);
// Construct plane perpendicular to z-axis, resolution 1x1, width and height
......@@ -67,7 +67,7 @@ void vtkPlaneSource::SetResolution(const int xR, const int yR)
void vtkPlaneSource::Execute()
{
float x[3], tc[2], v1[3], v2[3];
double x[3], tc[2], v1[3], v2[3];
vtkIdType pts[4];
int i, j, ii;
int numPts;
......@@ -110,10 +110,10 @@ void vtkPlaneSource::Execute()
//
for (numPts=0, i=0; i<(this->YResolution+1); i++)
{
tc[1] = (float) i / this->YResolution;
tc[1] = (double) i / this->YResolution;
for (j=0; j<(this->XResolution+1); j++)
{
tc[0] = (float) j / this->XResolution;
tc[0] = (double) j / this->XResolution;
for ( ii=0; ii < 3; ii++)
{
......@@ -157,9 +157,9 @@ void vtkPlaneSource::Execute()
// Set the normal to the plane. Will modify the Origin, Point1, and Point2
// instance variables as necessary (i.e., rotate the plane around its center).
void vtkPlaneSource::SetNormal(float N[3])
void vtkPlaneSource::SetNormal(double N[3])
{
float n[3], rotVector[3], theta;
double n[3], rotVector[3], theta;
//make sure input is decent
n[0] = N[0];
......@@ -174,7 +174,7 @@ void vtkPlaneSource::SetNormal(float N[3])
// Compute rotation vector using a transformation matrix.
// Note that if normals are parallel then the rotation is either
// 0 or 180 degrees.
float dp = vtkMath::Dot(this->Normal,n);
double dp = vtkMath::Dot(this->Normal,n);
if ( dp >= 1.0 )
{
return; //zero rotation
......@@ -213,9 +213,9 @@ void vtkPlaneSource::SetNormal(float N[3])
// Set the normal to the plane. Will modify the Origin, Point1, and Point2
// instance variables as necessary (i.e., rotate the plane around its center).
void vtkPlaneSource::SetNormal(float nx, float ny, float nz)
void vtkPlaneSource::SetNormal(double nx, double ny, double nz)
{
float n[3];
double n[3];
n[0] = nx; n[1] = ny; n[2] = nz;
this->SetNormal(n);
......@@ -223,7 +223,7 @@ void vtkPlaneSource::SetNormal(float nx, float ny, float nz)
// Set the center of the plane. Will modify the Origin, Point1, and Point2
// instance variables as necessary (i.e., translate the plane).
void vtkPlaneSource::SetCenter(float center[3])
void vtkPlaneSource::SetCenter(double center[3])
{
if ( this->Center[0] == center[0] && this->Center[1] == center[1] &&
this->Center[2] == center[2] )
......@@ -233,7 +233,7 @@ void vtkPlaneSource::SetCenter(float center[3])
else
{
int i;
float v1[3], v2[3];
double v1[3], v2[3];
for ( i=0; i < 3; i++ )
{
......@@ -254,9 +254,9 @@ void vtkPlaneSource::SetCenter(float center[3])
// Set the center of the plane. Will modify the Origin, Point1, and Point2
// instance variables as necessary (i.e., translate the plane).
void vtkPlaneSource::SetCenter(float x, float y, float z)
void vtkPlaneSource::SetCenter(double x, double y, double z)
{
float center[3];
double center[3];
center[0] = x; center[1] = y; center[2] = z;
this->SetCenter(center);
......@@ -264,7 +264,7 @@ void vtkPlaneSource::SetCenter(float x, float y, float z)
// modifies the normal and origin
void vtkPlaneSource::SetPoint1(float pnt[3])
void vtkPlaneSource::SetPoint1(double pnt[3])
{
if ( this->Point1[0] == pnt[0] && this->Point1[1] == pnt[1] &&
this->Point1[2] == pnt[2] )
......@@ -274,7 +274,7 @@ void vtkPlaneSource::SetPoint1(float pnt[3])
else
{
int i;
float v1[3], v2[3];
double v1[3], v2[3];
for ( i=0; i < 3; i++ )
{
......@@ -290,7 +290,7 @@ void vtkPlaneSource::SetPoint1(float pnt[3])
}
// modifies the normal and origin
void vtkPlaneSource::SetPoint2(float pnt[3])
void vtkPlaneSource::SetPoint2(double pnt[3])
{
if ( this->Point2[0] == pnt[0] && this->Point2[1] == pnt[1] &&
this->Point2[2] == pnt[2] )
......@@ -300,7 +300,7 @@ void vtkPlaneSource::SetPoint2(float pnt[3])
else
{
int i;
float v1[3], v2[3];
double v1[3], v2[3];
for ( i=0; i < 3; i++ )
{
......@@ -314,16 +314,16 @@ void vtkPlaneSource::SetPoint2(float pnt[3])
}
}
void vtkPlaneSource::SetPoint1(float x, float y, float z)
void vtkPlaneSource::SetPoint1(double x, double y, double z)
{
float pnt[3];
double pnt[3];
pnt[0] = x; pnt[1] = y; pnt[2] = z;
this->SetPoint1(pnt);
}
void vtkPlaneSource::SetPoint2(float x, float y, float z)
void vtkPlaneSource::SetPoint2(double x, double y, double z)
{
float pnt[3];
double pnt[3];
pnt[0] = x; pnt[1] = y; pnt[2] = z;
this->SetPoint2(pnt);
......@@ -331,7 +331,7 @@ void vtkPlaneSource::SetPoint2(float x, float y, float z)