- use Float.isInfinite in ShadowUtil
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8826 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
2c0fe5e938
commit
3b1ab69223
@ -177,7 +177,7 @@ public class ShadowUtil {
|
|||||||
BoundingVolume vol = list.get(i).getWorldBound();
|
BoundingVolume vol = list.get(i).getWorldBound();
|
||||||
BoundingVolume newVol = vol.transform(transform);
|
BoundingVolume newVol = vol.transform(transform);
|
||||||
//Nehon : prevent NaN and infinity values to screw the final bounding box
|
//Nehon : prevent NaN and infinity values to screw the final bounding box
|
||||||
if (!Float.isNaN(newVol.getCenter().x) && newVol.getCenter().x != Float.POSITIVE_INFINITY && newVol.getCenter().x != Float.NEGATIVE_INFINITY) {
|
if (!Float.isNaN(newVol.getCenter().x) && !Float.isInfinite(newVol.getCenter().x)) {
|
||||||
bbox.mergeLocal(newVol);
|
bbox.mergeLocal(newVol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user