1 |
< |
### PATCH soqt |
2 |
< |
--- src/Inventor/Qt/common/viewers/SoGuiViewer.cpp.in.orig Fri Oct 17 12:17:45 2003 |
3 |
< |
+++ src/Inventor/Qt/common/viewers/SoGuiViewer.cpp.in Fri Oct 17 12:20:48 2003 |
4 |
< |
@@ -1011,8 +1011,10 @@ |
5 |
< |
// rotated. |
6 |
< |
const float SLACK = 0.001f; |
1 |
> |
--- src/Inventor/Qt/common/viewers/SoGuiViewer.cpp.in-orig 2005-11-25 09:32:30.000000000 +0100 |
2 |
> |
+++ src/Inventor/Qt/common/viewers/SoGuiViewer.cpp.in 2005-11-25 09:34:09.000000000 +0100 |
3 |
> |
@@ -1055,11 +1055,11 @@ |
4 |
> |
farval = nearfar[1]; |
5 |
> |
} |
6 |
|
|
7 |
< |
- this->camera->nearDistance = nearval * (1.0f - SLACK); |
8 |
< |
- this->camera->farDistance = farval * (1.0f + SLACK); |
9 |
< |
+ if (fabs (this->camera->nearDistance.getValue () - nearval * (1.0f - SLACK)) < 0.00001) |
7 |
> |
- if (nearval != this->camera->nearDistance.getValue()) { |
8 |
> |
- this->camera->nearDistance = nearval; |
9 |
> |
+ if (fabs (this->camera->nearDistance.getValue () - nearval * (1.0f - SLACK)) < 0.00001) { |
10 |
|
+ this->camera->nearDistance = nearval * (1.0f - SLACK); |
11 |
< |
+ if (fabs (this->camera->farDistance.getValue () - farval * (1.0f + SLACK)) < 0.00001) |
11 |
> |
} |
12 |
> |
- if (farval != this->camera->farDistance.getValue()) { |
13 |
> |
- this->camera->farDistance = farval; |
14 |
> |
+ if (fabs (this->camera->farDistance.getValue () - farval * (1.0f + SLACK)) < 0.00001) { |
15 |
|
+ this->camera->farDistance = farval * (1.0f + SLACK); |
16 |
< |
|
16 |
> |
} |
17 |
|
|
18 |
|
// FIXME: there's a possible optimization to take advantage of here, |
17 |
– |
|