Commit 7461b5d4 authored by Sean McBride's avatar Sean McBride

Converted ContainsPoint() API from int to vtkTypeBool

parent 6d1636ce
......@@ -189,8 +189,8 @@ public:
/**
* Returns 1 if the point is contained in the box else 0.
*/
int ContainsPoint(double p[3]) const;
int ContainsPoint(double px, double py, double pz) const;
vtkTypeBool ContainsPoint(double p[3]) const;
vtkTypeBool ContainsPoint(double px, double py, double pz) const;
//@}
/**
......@@ -452,7 +452,7 @@ inline void vtkBoundingBox::GetMaxPoint(double &x, double &y, double &z) const
z = this->MaxPnt[2];
}
inline int vtkBoundingBox::ContainsPoint(double px, double py,
inline vtkTypeBool vtkBoundingBox::ContainsPoint(double px, double py,
double pz) const
{
if ((px < this->MinPnt[0]) || (px > this->MaxPnt[0]))
......@@ -470,7 +470,7 @@ inline int vtkBoundingBox::ContainsPoint(double px, double py,
return 1;
}
inline int vtkBoundingBox::ContainsPoint(double p[3]) const
inline vtkTypeBool vtkBoundingBox::ContainsPoint(double p[3]) const
{
return this->ContainsPoint(p[0], p[1], p[2]);
}
......
......@@ -155,13 +155,13 @@ public:
* A point is in a node if and only if MinBounds[i] < p[i] <= MaxBounds[i],
* which allows a node to be divided into eight non-overlapping children.
*/
int ContainsPoint( const double pnt[3] );
vtkTypeBool ContainsPoint( const double pnt[3] );
/**
* A point is in a node, in terms of data, if and only if MinDataBounds[i]
* <= p[i] <= MaxDataBounds[i].
*/
int ContainsPointByData( const double pnt[3] );
vtkTypeBool ContainsPointByData( const double pnt[3] );
/**
* This function is called after a successful point-insertion check and
......@@ -392,7 +392,7 @@ inline int vtkIncrementalOctreeNode::GetChildIndex( const double point[3] )
}
// In-lined for performance
inline int vtkIncrementalOctreeNode::ContainsPoint( const double pnt[3] )
inline vtkTypeBool vtkIncrementalOctreeNode::ContainsPoint( const double pnt[3] )
{
return (
( this->MinBounds[0] < pnt[0] && pnt[0] <= this->MaxBounds[0] &&
......@@ -403,7 +403,7 @@ inline int vtkIncrementalOctreeNode::ContainsPoint( const double pnt[3] )
}
// In-lined for performance
inline int vtkIncrementalOctreeNode::ContainsPointByData( const double pnt[3] )
inline vtkTypeBool vtkIncrementalOctreeNode::ContainsPointByData( const double pnt[3] )
{
return
(
......
......@@ -586,7 +586,7 @@ int vtkKdNode::IntersectsBox(double x0, double x1, double y0, double y1,
int vtkKdNode::IntersectsSphere2(double x, double y, double z, double rSquared,
int useDataBounds=0)
{
int center = this->ContainsPoint(x, y, z, useDataBounds);
vtkTypeBool center = this->ContainsPoint(x, y, z, useDataBounds);
if (center)
{
......@@ -636,7 +636,7 @@ int vtkKdNode::ContainsBox(double x0, double x1, double y0, double y1,
}
// ----------------------------------------------------------------------------
int vtkKdNode::ContainsPoint(double x, double y, double z, int useDataBounds=0)
vtkTypeBool vtkKdNode::ContainsPoint(double x, double y, double z, int useDataBounds=0)
{
double *min, *max;
......
......@@ -244,7 +244,7 @@ public:
* Use the possibly smaller bounds of the points within the region
* if useDataBounds is non-zero.
*/
int ContainsPoint(double x, double y, double z, int useDataBounds);
vtkTypeBool ContainsPoint(double x, double y, double z, int useDataBounds);
/**
* Calculate the distance squared from any point to the boundary of this
......
......@@ -520,7 +520,7 @@ double vtkOctreePointLocatorNode::_GetDistance2ToBoundary(
}
//----------------------------------------------------------------------------
int vtkOctreePointLocatorNode::ContainsPoint(double x, double y, double z,
vtkTypeBool vtkOctreePointLocatorNode::ContainsPoint(double x, double y, double z,
int useDataBounds=0)
{
double *min, *max;
......
......@@ -203,7 +203,7 @@ public:
* Use the possibly smaller bounds of the points within the region
* if useDataBounds is non-zero.
*/
int ContainsPoint(double x, double y, double z, int useDataBounds);
vtkTypeBool ContainsPoint(double x, double y, double z, int useDataBounds);
/**
* Calculate the distance squared from any point to the boundary of this
......
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