Hi
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.
Chris
TimH1
November 27, 2015, 11:02pm
2
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);
occluder.isPointVisible(positionInCartesian3)
Here is some previous post that maybe helpful:
https://groups.google.com/forum/#!searchin/cesium-dev/How$20to$20get$20the$20extent$20of$20the$20current$20camera$20position/cesium-dev/e2H7EefikAk/OhEXBtn5yc0J
https://groups.google.com/forum/#!searchin/cesium-dev/ComputerVisibility$20/cesium-dev/dmp2hjU9zBs/L-E3cq3oAWoJ
Thanks, Tim
That helps a lot. I will try this method.
Chris
在 2015年11月28日星期六 UTC+8上午7:02:35,TimH写道:
Hi Tim
I have try your method and it works perfectly.
Thanks a lot !
Chris
在 2015年11月28日星期六 UTC+8上午7:02:35,TimH写道: