I've got a translucent polygon that defines a "space". There are other entities that might be inside and overlap the space. I'd like to be able to pick the objects that are inside the translucent polygon, but all I can ever pick is the translucent polygon.
How can I can pick the entity that is inside the polygon and ignore the polygon entity.
var viewer = new Cesium.Viewer('cesiumContainer');
var orangePolygon = viewer.entities.add({
name : 'Orange polygon with per-position heights and outline',
polygon : {
hierarchy : Cesium.Cartesian3.fromDegreesArrayHeights([-108.0, 25.0, 100000,
-100.0, 25.0, 100000,
-100.0, 30.0, 100000,
-108.0, 30.0, 300000]),
extrudedHeight: 0,
perPositionHeight : true,
material : Cesium.Color.ORANGE.withAlpha(0.1),
outline : true,
outlineColor : Cesium.Color.BLACK
}
});
var bluePoint = viewer.entities.add({
name: 'Point #1',
position : Cesium.Cartesian3.fromDegrees(-105.0, 28.0, 50000),
point : {
pixelSize : 10,
color : Cesium.Color.BLUE
}
});
viewer.zoomTo(viewer.entities);
Explained above. The translucent container identifies a boundary for which actions can be performed on the entities within. I need to be able to select the entities so that the user the user can then apply an action upon the entity.