my method of detecting if a cartographic point is in the view


I’m using SceneTransforms.wgs84ToWindowCoordinates and pointInsideTriangle to detect a cartographic point in the view,

but when the point is in the back hemisphere of the earth, this method can also return a windowposition,

Such result will influence the detection, I want to know if there is a solution or a better way to detect if a point is in the view.


You can check if a point is hidden on the other side of the earth using the EllipsoidalOccluder. Note occluder.isPointVisible takes Cartesian3 not cartographic:

var occluder = new Cesium.EllipsoidalOccluder(Cesium.Ellipsoid.WGS84, camera.position);


Here is some previous post that maybe helpful:!searchin/cesium-dev/How$20to$20get$20the$20extent$20of$20the$20current$20camera$20position/cesium-dev/e2H7EefikAk/OhEXBtn5yc0J!searchin/cesium-dev/ComputerVisibility$20/cesium-dev/dmp2hjU9zBs/L-E3cq3oAWoJ

Thanks, Tim

That helps a lot. I will try this method.


在 2015年11月28日星期六 UTC+8上午7:02:35,TimH写道:

Hi Tim

I have try your method and it works perfectly.

Thanks a lot !


在 2015年11月28日星期六 UTC+8上午7:02:35,TimH写道: