How to interact with point cloud data in cesium.

1,245 views
Skip to first unread message

Ruchi Chaurasia

unread,
Aug 28, 2018, 6:46:06 AM8/28/18
to cesium-dev

Hi,

I am new to cesium and still exploring this.
I want to find out how do i capture a single point in point cloud data and modify it by zooming and rotating. I am using cesium version 1.48.0.
I will appreciate if anyone can help me with this.


Basic code from cesium demo for point cloud data:

var viewer = new Cesium.Viewer('cesiumContainer');

var tileset = new Cesium.Cesium3DTileset({ url: Cesium.IonResource.fromAssetId(5714) });
viewer.scene.primitives.add(tileset);
viewer.zoomTo(tileset);


I aim to enable user to add primitive objects like like cubes, spheres to the 3D scene rendered in cesium





Omar Shehata

unread,
Aug 30, 2018, 10:44:57 AM8/30/18
to cesium-dev
If you just want to enable the user to add objects, you can listen for an input action and create objects, like in this drawing example:


If you want to edit the point cloud itself, the easiest way I can think of is to use the 3D Tiles Styling language, where you can change color/hide points by certain attributes as in this example:


So for example, you could hide points with styling and create new ones that the user can manipulate. You should be able to use the viewer.scene.pick (https://cesiumjs.org/Cesium/Build/Documentation/Scene.html#pick) function to get what's under the mouse, like in this example:


Let me know if this helps. Feel free to share more about what you're building here, it sounds like an interesting application!
Reply all
Reply to author
Forward
0 new messages