Frustrum is NaN

30 views
Skip to first unread message

xavier lhomme

unread,
Dec 11, 2014, 3:51:03 AM12/11/14
to cesiu...@googlegroups.com
Hi 

(Cesium 1.3) 

 sometimes , I've got a Nan value for "far". And thenthe folloxing function return a  numFrustums as NaN.
 and   updateFrustums failed due to the line frustumCommandsList.length.

var numFrustums = Math.ceil(Math.log(far / near) / Math.log(farToNearRatio));
        if (near !== Number.MAX_VALUE && (numFrustums !== numberOfFrustums || (frustumCommandsList.length !== 0 &&
                (near < frustumCommandsList[0].near || far > frustumCommandsList[numberOfFrustums - 1].far)))) {
            updateFrustums(near, far, farToNearRatio, numFrustums, frustumCommandsList);
            createPotentiallyVisibleSet(scene);

Best Regards 

Patrick Cozzi

unread,
Dec 11, 2014, 8:35:38 PM12/11/14
to cesiu...@googlegroups.com
Can you consistently reproduce it like https://github.com/AnalyticalGraphicsInc/cesium/issues/2317

Patrick

xavier lhomme

unread,
Dec 12, 2014, 2:56:17 AM12/12/14
to cesiu...@googlegroups.com
No, I had this issue with my terrain provider , when I forget todefine the levelZeroMaximumGeometricError. 
Once I added the Cesium.TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap in order to define my variable.I don't have this problem anymore.

But perhaps you should detect such issue in the code (NaN .) and reset properly the camera...
Reply all
Reply to author
Forward
0 new messages