Salome HOME
projects
/
modules
/
gui.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade to paraview 5.4
[modules/gui.git]
/
src
/
VTKViewer
/
VTKViewer_Utilities.cxx
diff --git
a/src/VTKViewer/VTKViewer_Utilities.cxx
b/src/VTKViewer/VTKViewer_Utilities.cxx
index 235f5f9a1cad5ea9f75022b7cee5c1ff3aea3d27..8088afa3af8aebd4ba4214999b055c2b8d97a719 100755
(executable)
--- a/
src/VTKViewer/VTKViewer_Utilities.cxx
+++ b/
src/VTKViewer/VTKViewer_Utilities.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
5
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
6
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-48,7
+48,7
@@
ResetCamera(vtkRenderer* theRenderer,
int aCount = ComputeVisiblePropBounds(theRenderer,aBounds);
if(theUsingZeroFocalPoint || aCount){
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);
double aLength = aBounds[1]-aBounds[0];
aLength = std::max((aBounds[3]-aBounds[2]),aLength);
@@
-120,8
+120,8
@@
ComputeBounds(vtkActorCollection* theCollection, double theBounds[6])
{
int aCount = 0;
{
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();
// loop through all props
theCollection->InitTraversal();
@@
-132,8
+132,8
@@
ComputeBounds(vtkActorCollection* theCollection, double theBounds[6])
if(anActor->IsInfinitive())
continue;
double *aBounds = aProp->GetBounds();
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;
if(fabs(aBounds[1] - aBounds[0]) < MIN_DISTANCE) {
aBounds[0]-=0.001;
@@
-248,8
+248,8
@@
bool IsBBEmpty(vtkRenderer* theRenderer)
return false;
double aNewBndBox[6];
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());
// iterate through displayed objects and set size if necessary
VTK::ActorCollectionCopy aCopy(theRenderer->GetActors());
@@
-262,9
+262,9
@@
bool IsBBEmpty(vtkRenderer* theRenderer)
if(anActor->GetVisibility() && !anActor->IsInfinitive())
{
double *aBounds = anActor->GetBounds();
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;
}
isAny = true;
}
@@
-292,8
+292,8
@@
bool ComputeBBCenter(vtkRenderer* theRenderer, double theCenter[3])
return false;
double aNewBndBox[6];
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());
// iterate through displayed objects and set size if necessary
VTK::ActorCollectionCopy aCopy(theRenderer->GetActors());
@@
-312,9
+312,9
@@
bool ComputeBBCenter(vtkRenderer* theRenderer, double theCenter[3])
//Ignore invalid bounds
if(!isBoundValid(aBounds)) continue;
//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])
{
for(int i = 0; i < 5; i = i + 2){
if(aBounds[i] < aNewBndBox[i])
@@
-334,11
+334,11
@@
bool ComputeBBCenter(vtkRenderer* theRenderer, double theCenter[3])
return true;
}
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);
double aLength = aNewBndBox[1]-aNewBndBox[0];
aLength = std::max((aNewBndBox[3]-aNewBndBox[2]),aLength);
@@
-371,7
+371,7
@@
bool ComputeBBCenter(vtkRenderer* theRenderer, double theCenter[3])
printf("aCount = %d\n",aCount);
if(aCount){
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);
double aLength = aBounds[1]-aBounds[0];
aLength = max((aBounds[3]-aBounds[2]),aLength);