Commit 04d04637 authored by Sean McBride's avatar Sean McBride
Browse files

Big find-replace of VTK_LARGE_FLOAT -> VTK_FLOAT_MAX

vtkType.h says that VTK_LARGE_FLOAT is a
'compatibility name'.  There were many uses of the
old name, which I updated.  The find-replace should
be quite safe as it's basically what the preprocessor
does anyway.

Change-Id: I66ecb51cd2f21ee3cdf9289d8a65d39fc4519a83
parent 1ff4b0ee
......@@ -866,7 +866,7 @@ double vtkMath::EstimateMatrixCondition(double **A, int size)
{
int i;
int j;
double min=VTK_LARGE_FLOAT, max=(-VTK_LARGE_FLOAT);
double min=VTK_FLOAT_MAX, max=(-VTK_FLOAT_MAX);
// find the maximum value
for (i=0; i < size; i++)
......@@ -891,7 +891,7 @@ double vtkMath::EstimateMatrixCondition(double **A, int size)
if ( min == 0.0 )
{
return VTK_LARGE_FLOAT;
return VTK_FLOAT_MAX;
}
else
{
......
......@@ -361,7 +361,7 @@ double vtkKdNode::_GetDistance2ToBoundary(
else
{
int first = 1;
minDistance = VTK_LARGE_FLOAT; // Suppresses warning message.
minDistance = VTK_FLOAT_MAX; // Suppresses warning message.
if ((xmin != outerBoundaryMin[0]) &&
(((dist = x - xmin) < minDistance) || first))
......@@ -407,7 +407,7 @@ double vtkKdNode::_GetDistance2ToBoundary(
}
// if there are no inner boundaries we dont want to square.
if(minDistance != VTK_LARGE_FLOAT)
if(minDistance != VTK_FLOAT_MAX)
{
minDistance *= minDistance;
}
......
......@@ -107,7 +107,7 @@ namespace
{
this->NumDesiredPoints = N;
this->NumPoints = 0;
this->LargestDist2 = VTK_LARGE_FLOAT;
this->LargestDist2 = VTK_FLOAT_MAX;
}
void InsertPoint(float dist2, vtkIdType id)
......
......@@ -52,7 +52,7 @@ namespace
{
this->NumDesiredPoints = numDesiredPoints;
this->NumPoints = 0;
this->LargestDist2 = VTK_LARGE_FLOAT;
this->LargestDist2 = VTK_FLOAT_MAX;
}
void InsertPoint(float dist2, vtkIdType id)
......
......@@ -364,7 +364,7 @@ double vtkOctreePointLocatorNode::_GetDistance2ToBoundary(
else
{
int first = 1;
minDistance = VTK_LARGE_FLOAT; // Suppresses warning message.
minDistance = VTK_FLOAT_MAX; // Suppresses warning message.
if ((xmin != outerBoundaryMin[0]) &&
(((dist = x - xmin) < minDistance) || first))
......@@ -410,7 +410,7 @@ double vtkOctreePointLocatorNode::_GetDistance2ToBoundary(
}
// if there are no inner boundaries we dont want to square.
if(minDistance != VTK_LARGE_FLOAT)
if(minDistance != VTK_FLOAT_MAX)
{
minDistance *= minDistance;
}
......
......@@ -1909,7 +1909,7 @@ double vtkPolygon::DistanceToPolygon(double x[3], int numPts, double *pts,
}
// Not inside, compute the distance of the point to the edges.
double minDist2=VTK_LARGE_FLOAT;
double minDist2=VTK_FLOAT_MAX;
double *p0, *p1, dist2, t, c[3];
for (int i=0; i<numPts; i++)
{
......
......@@ -1748,10 +1748,10 @@ int vtkPolyhedron::IntersectWithLine(double p1[3], double p2[3], double tol,
vtkIdType *face = this->Faces->GetPointer(0);
vtkIdType nfaces = *face++;
vtkIdType npts, i, fid, numHits=0;
double t=VTK_LARGE_FLOAT;
double t=VTK_FLOAT_MAX;
double x[3];
tMin=VTK_LARGE_FLOAT;
tMin=VTK_FLOAT_MAX;
for (fid=0; fid < nfaces; ++fid)
{
npts = face[0];
......
......@@ -79,12 +79,12 @@ void vtkSphereComputeBoundingSphere(T *pts, vtkIdType numPts, T sphere[4],
else //no hints provided, compute an initial guess
{
T xMin[3], xMax[3], yMin[3], yMax[3], zMin[3], zMax[3];
xMin[0] = xMin[1] = xMin[2] = VTK_LARGE_FLOAT;
yMin[0] = yMin[1] = yMin[2] = VTK_LARGE_FLOAT;
zMin[0] = zMin[1] = zMin[2] = VTK_LARGE_FLOAT;
xMax[0] = xMax[1] = xMax[2] = -VTK_LARGE_FLOAT;
yMax[0] = yMax[1] = yMax[2] = -VTK_LARGE_FLOAT;
zMax[0] = zMax[1] = zMax[2] = -VTK_LARGE_FLOAT;
xMin[0] = xMin[1] = xMin[2] = VTK_FLOAT_MAX;
yMin[0] = yMin[1] = yMin[2] = VTK_FLOAT_MAX;
zMin[0] = zMin[1] = zMin[2] = VTK_FLOAT_MAX;
xMax[0] = xMax[1] = xMax[2] = -VTK_FLOAT_MAX;
yMax[0] = yMax[1] = yMax[2] = -VTK_FLOAT_MAX;
zMax[0] = zMax[1] = zMax[2] = -VTK_FLOAT_MAX;
// First part: Estimate the points furthest apart to define the largest sphere.
// Find the points that span the greatest distance on the x-y-z axes. Use these
......@@ -197,12 +197,12 @@ void vtkSphereComputeBoundingSphere(T **spheres, vtkIdType numSpheres, T sphere[
else //no hints provided, compute an initial guess
{
T xMin[4], xMax[4], yMin[4], yMax[4], zMin[4], zMax[4];
xMin[0] = xMin[1] = xMin[2] = xMin[3] = VTK_LARGE_FLOAT;
yMin[0] = yMin[1] = yMin[2] = yMin[3] = VTK_LARGE_FLOAT;
zMin[0] = zMin[1] = zMin[2] = zMin[3] = VTK_LARGE_FLOAT;
xMax[0] = xMax[1] = xMax[2] = xMax[3] = -VTK_LARGE_FLOAT;
yMax[0] = yMax[1] = yMax[2] = yMax[3] = -VTK_LARGE_FLOAT;
zMax[0] = zMax[1] = zMax[2] = zMax[3] = -VTK_LARGE_FLOAT;
xMin[0] = xMin[1] = xMin[2] = xMin[3] = VTK_FLOAT_MAX;
yMin[0] = yMin[1] = yMin[2] = yMin[3] = VTK_FLOAT_MAX;
zMin[0] = zMin[1] = zMin[2] = zMin[3] = VTK_FLOAT_MAX;
xMax[0] = xMax[1] = xMax[2] = xMax[3] = -VTK_FLOAT_MAX;
yMax[0] = yMax[1] = yMax[2] = yMax[3] = -VTK_FLOAT_MAX;
zMax[0] = zMax[1] = zMax[2] = zMax[3] = -VTK_FLOAT_MAX;
// First part: Estimate the points furthest apart to define the largest sphere.
// Find the points that span the greatest distance on the x-y-z axes. Use these
......
......@@ -118,7 +118,7 @@
#define VTK_PARSER_BEGIN_VARIABLES 48
// the value that is retuned as a result if there is an error
#define VTK_PARSER_ERROR_RESULT VTK_LARGE_FLOAT
#define VTK_PARSER_ERROR_RESULT VTK_FLOAT_MAX
class VTKCOMMONMISC_EXPORT vtkFunctionParser : public vtkObject
{
......
......@@ -217,8 +217,8 @@ static int ParseFile(FILE *file, const char *label, float *data)
{
char tag[80];
int i, npts, readData=0;
float min=VTK_LARGE_FLOAT;
float max=(-VTK_LARGE_FLOAT);
float min=VTK_FLOAT_MAX;
float max=(-VTK_FLOAT_MAX);
if ( file == NULL || label == NULL ) return 0;
......
......@@ -1005,8 +1005,8 @@ int vtkFieldDataToAttributeDataFilter::ConstructArray(vtkDataArray *da,
int normalize)
{
vtkIdType i, n=max-min+1;
float minValue=VTK_LARGE_FLOAT;
float maxValue= -VTK_LARGE_FLOAT;
float minValue=VTK_FLOAT_MAX;
float maxValue= -VTK_FLOAT_MAX;
float compRange, compValue;
if ( fieldComp >= fieldArray->GetNumberOfComponents() )
......
......@@ -692,7 +692,7 @@ int vtkModifiedBSPTree::IntersectWithLine(double p1[3], double p2[3], double tol
}
// Ok, setup a stack and various params
nodestack ns;
double closest_intersection = VTK_LARGE_FLOAT;
double closest_intersection = VTK_FLOAT_MAX;
bool HIT = false;
// setup our axis optimized ray box edge stuff
int axis = BSPNode::getDominantAxis(ray_vec);
......@@ -831,7 +831,7 @@ int vtkModifiedBSPTree::IntersectWithLine(
}
// Ok, setup a stack and various params
nodestack ns;
double closest_intersection = VTK_LARGE_FLOAT;
double closest_intersection = VTK_FLOAT_MAX;
bool HIT = false;
// setup our axis optimized ray box edge stuff
int axis = BSPNode::getDominantAxis(ray_vec);
......@@ -1141,7 +1141,7 @@ void BSPNode::Classify(const double origin[3],
Near = mChild[2];
}
}
rDist = (tDivDirection) ? tOriginToDivPlane / tDivDirection : VTK_LARGE_FLOAT;
rDist = (tDivDirection) ? tOriginToDivPlane / tDivDirection : VTK_FLOAT_MAX;
}
//---------------------------------------------------------------------------
// Update the two t values for the ray against the box, return false if misses
......
......@@ -300,7 +300,7 @@ class BSPNode {
BSPNode(void) {
mChild[0] = mChild[1] = mChild[2] = NULL;
for (int i=0; i<6; i++) sorted_cell_lists[i] = NULL;
for (int i=0; i<3; i++) { bounds[i*2] = VTK_LARGE_FLOAT; bounds[i*2+1] = -VTK_LARGE_FLOAT; }
for (int i=0; i<3; i++) { bounds[i*2] = VTK_FLOAT_MAX; bounds[i*2+1] = -VTK_FLOAT_MAX; }
}
// Destructor
~BSPNode(void) {
......
......@@ -27,8 +27,8 @@ vtkStandardNewMacro(vtkBlankStructuredGrid);
// Construct object to extract all of the input data.
vtkBlankStructuredGrid::vtkBlankStructuredGrid()
{
this->MinBlankingValue = VTK_LARGE_FLOAT;
this->MaxBlankingValue = VTK_LARGE_FLOAT;
this->MinBlankingValue = VTK_FLOAT_MAX;
this->MaxBlankingValue = VTK_FLOAT_MAX;
this->ArrayName = NULL;
this->ArrayId = -1;
this->Component = 0;
......
......@@ -747,7 +747,7 @@ int vtkCellTreeLocator::IntersectWithLine(double p1[3], double p2[3], double tol
}
// Ok, setup a stack and various params
nodeStack ns;
double closest_intersection = VTK_LARGE_FLOAT;
double closest_intersection = VTK_FLOAT_MAX;
bool HIT = false;
// setup our axis optimized ray box edge stuff
int axis = getDominantAxis(ray_vec);
......@@ -1206,13 +1206,13 @@ void vtkCellTreeLocator::Classify(const double origin[3],
{
near = &this->Tree->Nodes.at(parent->GetLeftChildIndex());
far = &this->Tree->Nodes.at(parent->GetLeftChildIndex()+1);
rDist = (tDivDirection) ? tOriginToDivPlane2 / tDivDirection : VTK_LARGE_FLOAT;
rDist = (tDivDirection) ? tOriginToDivPlane2 / tDivDirection : VTK_FLOAT_MAX;
}
else if (tOriginToDivPlane < 0) // origin is left of the lm
{
far = &this->Tree->Nodes.at(parent->GetLeftChildIndex());
near = &this->Tree->Nodes.at(parent->GetLeftChildIndex()+1);
rDist = (tDivDirection) ? tOriginToDivPlane / tDivDirection : VTK_LARGE_FLOAT;
rDist = (tDivDirection) ? tOriginToDivPlane / tDivDirection : VTK_FLOAT_MAX;
}
......@@ -1231,7 +1231,7 @@ void vtkCellTreeLocator::Classify(const double origin[3],
{
mustCheck=1; // Ray was exactly on edge left max box.
}
rDist = (tDivDirection) ? 0 / tDivDirection : VTK_LARGE_FLOAT;
rDist = (tDivDirection) ? 0 / tDivDirection : VTK_FLOAT_MAX;
}
else
{
......@@ -1241,7 +1241,7 @@ void vtkCellTreeLocator::Classify(const double origin[3],
{
mustCheck=1; // Ray was exactly on edge right min box.
}
rDist = (tDivDirection) ? 0 / tDivDirection : VTK_LARGE_FLOAT;
rDist = (tDivDirection) ? 0 / tDivDirection : VTK_FLOAT_MAX;
}
}
......
......@@ -81,7 +81,7 @@ public:
// Description:
// Specify a radius for a circle. This erases the cursor
// lines around the focal point.
vtkSetClampMacro(Radius,double,0.0,VTK_LARGE_FLOAT);
vtkSetClampMacro(Radius,double,0.0,VTK_FLOAT_MAX);
vtkGetMacro(Radius,double);
// Description:
......
......@@ -99,7 +99,7 @@ public:
// set a tolerance for that locator here. The default tolerance
// is 10e-4.
vtkSetClampMacro(PointMergeTolerance, float, 0.0, VTK_LARGE_FLOAT);
vtkSetClampMacro(PointMergeTolerance, float, 0.0, VTK_FLOAT_MAX);
vtkGetMacro(PointMergeTolerance, float);
// Description:
......
......@@ -50,7 +50,7 @@ public:
// Description:
// Specify quantization grain size. Default is 0.25
vtkSetClampMacro(QFactor,double,1E-5,VTK_LARGE_FLOAT);
vtkSetClampMacro(QFactor,double,1E-5,VTK_FLOAT_MAX);
vtkGetMacro(QFactor,double);
// Description:
......
......@@ -35,7 +35,7 @@ public:
// Description:
// Set radius of earth.
vtkSetClampMacro(Radius,double,0.0,VTK_LARGE_FLOAT);
vtkSetClampMacro(Radius,double,0.0,VTK_FLOAT_MAX);
vtkGetMacro(Radius,double);
// Description:
......
......@@ -407,8 +407,8 @@ void vtkProjectedTerrainPath::ComputeError(vtkIdType edgeId)
// interpolation functions are such that the maximum values have to
// take place on the boundary of the cell. We process the cell edges in
// two passes: first the x-edges, then the y-edges.
double negError = VTK_LARGE_FLOAT;
double posError = -VTK_LARGE_FLOAT;
double negError = VTK_FLOAT_MAX;
double posError = -VTK_FLOAT_MAX;
double x[3], loc[2], t, zMap, loc1[2], loc2[2], *x1, *x2, error;
int ij[2], ij1[2], ij2[2], numInt, i, flip;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment