if ( this->FlyMode == VTK_FLY_CLOSEST_TRIAD )
{
// Loop over points and find the closest point to the camera
- min = VTK_LARGE_FLOAT;
+ min = VTK_FLOAT_MAX;
for (i=0; i < 8; i++)
{
if ( pts[i][2] < min )
double e1[2], e2[2], e3[2];
// Find distance to origin
- d2Min = VTK_LARGE_FLOAT;
+ d2Min = VTK_FLOAT_MAX;
for (i=0; i < 8; i++)
{
d2 = pts[i][0]*pts[i][0] + pts[i][1]*pts[i][1];
// find minimum slope point connected to closest point and on
// right side (in projected coordinates). This is the first edge.
- minSlope = VTK_LARGE_FLOAT;
+ minSlope = VTK_FLOAT_MAX;
for (xIdx=0, i=0; i<3; i++)
{
num = (pts[Conn[idx][i]][1] - pts[idx][1]);
QLabel* TextLabelX = new QLabel (tr("LBL_X"), aGroupBox);
TextLabelX->setObjectName("TextLabelX");
TextLabelX->setFixedWidth(15);
- m_sbXcoeff = new QtxDoubleSpinBox(-VTK_LARGE_FLOAT, VTK_LARGE_FLOAT, 0.1, aGroupBox);
+ m_sbXcoeff = new QtxDoubleSpinBox(-VTK_FLOAT_MAX, VTK_FLOAT_MAX, 0.1, aGroupBox);
m_sbXcoeff->setMinimumWidth(80);
m_sbXcoeff->setValue(1.0);
QLabel* TextLabelY = new QLabel (tr("LBL_Y"), aGroupBox);
TextLabelY->setObjectName("TextLabelY");
TextLabelY->setFixedWidth(15);
- m_sbYcoeff = new QtxDoubleSpinBox(-VTK_LARGE_FLOAT, VTK_LARGE_FLOAT, 0.1, aGroupBox);
+ m_sbYcoeff = new QtxDoubleSpinBox(-VTK_FLOAT_MAX, VTK_FLOAT_MAX, 0.1, aGroupBox);
m_sbYcoeff->setMinimumWidth(80);
m_sbYcoeff->setValue(1.0);
QLabel* TextLabelZ = new QLabel (tr("LBL_Z"), aGroupBox);
TextLabelZ->setObjectName("TextLabelZ");
TextLabelZ->setFixedWidth(15);
- m_sbZcoeff = new QtxDoubleSpinBox(-VTK_LARGE_FLOAT, VTK_LARGE_FLOAT, 0.1, aGroupBox);
+ m_sbZcoeff = new QtxDoubleSpinBox(-VTK_FLOAT_MAX, VTK_FLOAT_MAX, 0.1, aGroupBox);
m_sbZcoeff->setMinimumWidth(80);
m_sbZcoeff->setValue(1.0);
bool
CheckBndBox(const double theBounds[6])
{
- if(theBounds[0] > -VTK_LARGE_FLOAT && theBounds[1] < VTK_LARGE_FLOAT &&
- theBounds[2] > -VTK_LARGE_FLOAT && theBounds[3] < VTK_LARGE_FLOAT &&
- theBounds[4] > -VTK_LARGE_FLOAT && theBounds[5] < VTK_LARGE_FLOAT)
+ if(theBounds[0] > -VTK_FLOAT_MAX && theBounds[1] < VTK_FLOAT_MAX &&
+ theBounds[2] > -VTK_FLOAT_MAX && theBounds[3] < VTK_FLOAT_MAX &&
+ theBounds[4] > -VTK_FLOAT_MAX && theBounds[5] < VTK_FLOAT_MAX)
return true;
return false;
}
bool aCDisplayed = IsCubeAxesDisplayed();
double aNewBndBox[6];
- aNewBndBox[ 0 ] = aNewBndBox[ 2 ] = aNewBndBox[ 4 ] = VTK_LARGE_FLOAT;
- aNewBndBox[ 1 ] = aNewBndBox[ 3 ] = aNewBndBox[ 5 ] = -VTK_LARGE_FLOAT;
+ aNewBndBox[ 0 ] = aNewBndBox[ 2 ] = aNewBndBox[ 4 ] = VTK_FLOAT_MAX;
+ aNewBndBox[ 1 ] = aNewBndBox[ 3 ] = aNewBndBox[ 5 ] = -VTK_FLOAT_MAX;
int aVisibleNum = myTrihedron->GetVisibleActorCount(GetDevice());
if(aVisibleNum){
#include <vtkDataSet.h>
static double OFF_UPDATE_RATE = 0.00001;
-static double FLOAT_TOLERANCE = 1.0 / VTK_LARGE_FLOAT;
+static double FLOAT_TOLERANCE = 1.0 / VTK_FLOAT_MAX;
namespace
{
aLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
aGridLayout->addWidget(aLabel, 0, 0);
- QtxDoubleSpinBox* aDblSpinBox = new QtxDoubleSpinBox(OFF_UPDATE_RATE, VTK_LARGE_FLOAT, 2, aGroupBox);
+ QtxDoubleSpinBox* aDblSpinBox = new QtxDoubleSpinBox(OFF_UPDATE_RATE, VTK_FLOAT_MAX, 2, aGroupBox);
aDblSpinBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
aGridLayout->addWidget(aDblSpinBox, 0, 1);
aLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
aGridLayout->addWidget(aLabel, 1, 0);
- QtxDoubleSpinBox* aDblSpinBox = new QtxDoubleSpinBox(OFF_UPDATE_RATE, VTK_LARGE_FLOAT, 2, aGroupBox);
+ QtxDoubleSpinBox* aDblSpinBox = new QtxDoubleSpinBox(OFF_UPDATE_RATE, VTK_FLOAT_MAX, 2, aGroupBox);
aDblSpinBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
aGridLayout->addWidget(aDblSpinBox, 1, 1);
// Description:
// Set/get the radius of the pieces of the axes actor
- vtkSetClampMacro(ConeRadius, float, 0, VTK_LARGE_FLOAT);
+ vtkSetClampMacro(ConeRadius, float, 0, VTK_FLOAT_MAX);
vtkGetMacro(ConeRadius, float);
- vtkSetClampMacro(SphereRadius, float, 0, VTK_LARGE_FLOAT);
+ vtkSetClampMacro(SphereRadius, float, 0, VTK_FLOAT_MAX);
vtkGetMacro(SphereRadius, float);
- vtkSetClampMacro(CylinderRadius, float, 0, VTK_LARGE_FLOAT);
+ vtkSetClampMacro(CylinderRadius, float, 0, VTK_FLOAT_MAX);
vtkGetMacro(CylinderRadius, float);
// Description:
if(myIsInfinite)
return true;
- static double MAX_DISTANCE = 0.9*VTK_LARGE_FLOAT;
+ static double MAX_DISTANCE = 0.9*VTK_FLOAT_MAX;
double aBounds[6];
GetBounds(aBounds);
for(int i = 0; i < 6; i++)
if(fabs(aBounds[i]) > MAX_DISTANCE)
return true;
- static double MIN_DISTANCE = 1.0/VTK_LARGE_FLOAT;
+ static double MIN_DISTANCE = 1.0/VTK_FLOAT_MAX;
if(GetLength() < MIN_DISTANCE)
return true;
/*!Constructor*/
VTKViewer_UnScaledActor::VTKViewer_UnScaledActor()
{
- Bounds[0] = Bounds[2] = Bounds[4] = VTK_LARGE_FLOAT;
- Bounds[1] = Bounds[3] = Bounds[5] = -VTK_LARGE_FLOAT;
+ Bounds[0] = Bounds[2] = Bounds[4] = VTK_FLOAT_MAX;
+ Bounds[1] = Bounds[3] = Bounds[5] = -VTK_FLOAT_MAX;
}
/*!
int aCount = ComputeVisiblePropBounds(theRenderer,aBounds);
if(theUsingZeroFocalPoint || aCount){
- static double MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT;
+ static double MIN_DISTANCE = 1.0 / VTK_FLOAT_MAX;
double aLength = aBounds[1]-aBounds[0];
aLength = std::max((aBounds[3]-aBounds[2]),aLength);
{
int aCount = 0;
- theBounds[0] = theBounds[2] = theBounds[4] = VTK_LARGE_FLOAT;
- theBounds[1] = theBounds[3] = theBounds[5] = -VTK_LARGE_FLOAT;
+ theBounds[0] = theBounds[2] = theBounds[4] = VTK_FLOAT_MAX;
+ theBounds[1] = theBounds[3] = theBounds[5] = -VTK_FLOAT_MAX;
// loop through all props
theCollection->InitTraversal();
if(anActor->IsInfinitive())
continue;
double *aBounds = aProp->GetBounds();
- static double MIN_DISTANCE = 1./VTK_LARGE_FLOAT;
- static double MAX_DISTANCE = 0.9*VTK_LARGE_FLOAT;
+ static double MIN_DISTANCE = 1./VTK_FLOAT_MAX;
+ static double MAX_DISTANCE = 0.9*VTK_FLOAT_MAX;
if(fabs(aBounds[1] - aBounds[0]) < MIN_DISTANCE) {
aBounds[0]-=0.001;
return false;
double aNewBndBox[6];
- aNewBndBox[ 0 ] = aNewBndBox[ 2 ] = aNewBndBox[ 4 ] = VTK_LARGE_FLOAT;
- aNewBndBox[ 1 ] = aNewBndBox[ 3 ] = aNewBndBox[ 5 ] = -VTK_LARGE_FLOAT;
+ aNewBndBox[ 0 ] = aNewBndBox[ 2 ] = aNewBndBox[ 4 ] = VTK_FLOAT_MAX;
+ aNewBndBox[ 1 ] = aNewBndBox[ 3 ] = aNewBndBox[ 5 ] = -VTK_FLOAT_MAX;
// iterate through displayed objects and set size if necessary
VTK::ActorCollectionCopy aCopy(theRenderer->GetActors());
if(anActor->GetVisibility() && !anActor->IsInfinitive())
{
double *aBounds = anActor->GetBounds();
- if(aBounds[0] > -VTK_LARGE_FLOAT && aBounds[1] < VTK_LARGE_FLOAT &&
- aBounds[2] > -VTK_LARGE_FLOAT && aBounds[3] < VTK_LARGE_FLOAT &&
- aBounds[4] > -VTK_LARGE_FLOAT && aBounds[5] < VTK_LARGE_FLOAT)
+ if(aBounds[0] > -VTK_FLOAT_MAX && aBounds[1] < VTK_FLOAT_MAX &&
+ aBounds[2] > -VTK_FLOAT_MAX && aBounds[3] < VTK_FLOAT_MAX &&
+ aBounds[4] > -VTK_FLOAT_MAX && aBounds[5] < VTK_FLOAT_MAX)
isAny = true;
}
return false;
double aNewBndBox[6];
- aNewBndBox[ 0 ] = aNewBndBox[ 2 ] = aNewBndBox[ 4 ] = VTK_LARGE_FLOAT;
- aNewBndBox[ 1 ] = aNewBndBox[ 3 ] = aNewBndBox[ 5 ] = -VTK_LARGE_FLOAT;
+ aNewBndBox[ 0 ] = aNewBndBox[ 2 ] = aNewBndBox[ 4 ] = VTK_FLOAT_MAX;
+ aNewBndBox[ 1 ] = aNewBndBox[ 3 ] = aNewBndBox[ 5 ] = -VTK_FLOAT_MAX;
// iterate through displayed objects and set size if necessary
VTK::ActorCollectionCopy aCopy(theRenderer->GetActors());
//Ignore invalid bounds
if(!isBoundValid(aBounds)) continue;
- if(aBounds[0] > -VTK_LARGE_FLOAT && aBounds[1] < VTK_LARGE_FLOAT &&
- aBounds[2] > -VTK_LARGE_FLOAT && aBounds[3] < VTK_LARGE_FLOAT &&
- aBounds[4] > -VTK_LARGE_FLOAT && aBounds[5] < VTK_LARGE_FLOAT)
+ if(aBounds[0] > -VTK_FLOAT_MAX && aBounds[1] < VTK_FLOAT_MAX &&
+ aBounds[2] > -VTK_FLOAT_MAX && aBounds[3] < VTK_FLOAT_MAX &&
+ aBounds[4] > -VTK_FLOAT_MAX && aBounds[5] < VTK_FLOAT_MAX)
{
for(int i = 0; i < 5; i = i + 2){
if(aBounds[i] < aNewBndBox[i])
return true;
}
- if(aNewBndBox[0] > -VTK_LARGE_FLOAT && aNewBndBox[1] < VTK_LARGE_FLOAT &&
- aNewBndBox[2] > -VTK_LARGE_FLOAT && aNewBndBox[3] < VTK_LARGE_FLOAT &&
- aNewBndBox[4] > -VTK_LARGE_FLOAT && aNewBndBox[5] < VTK_LARGE_FLOAT)
+ if(aNewBndBox[0] > -VTK_FLOAT_MAX && aNewBndBox[1] < VTK_FLOAT_MAX &&
+ aNewBndBox[2] > -VTK_FLOAT_MAX && aNewBndBox[3] < VTK_FLOAT_MAX &&
+ aNewBndBox[4] > -VTK_FLOAT_MAX && aNewBndBox[5] < VTK_FLOAT_MAX)
{
- static double MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT;
+ static double MIN_DISTANCE = 1.0 / VTK_FLOAT_MAX;
double aLength = aNewBndBox[1]-aNewBndBox[0];
aLength = std::max((aNewBndBox[3]-aNewBndBox[2]),aLength);
printf("aCount = %d\n",aCount);
if(aCount){
- static double MIN_DISTANCE = 1.0 / VTK_LARGE_FLOAT;
+ static double MIN_DISTANCE = 1.0 / VTK_FLOAT_MAX;
double aLength = aBounds[1]-aBounds[0];
aLength = max((aBounds[3]-aBounds[2]),aLength);