草庐IT

depthTestAgainstTerrain

全部标签

Cesium 中depthTestAgainstTerrain的作用

在Cesium中我们可以通过depthTestAgainstTerrain开启或者关闭深度检测,默认是关闭的。viewer.scene.globe.depthTestAgainstTerrain=true;(开启)viewer.scene.globe.depthTestAgainstTerrain=false;(关闭)具体来讲depthTestAgainstTerrain是一个Boolean类型的属性,它的作用是让3D对象深度测试(Z-buffer)考虑到地形。当这个属性被设置为true时,Cesium会使用地形数据来遮挡三维模型以及其他可视化元素。如果将这个属性设置为false,那么地形不再