1. A concise explanation of the problem you’re experiencing.
I am implementing a measurement system for 3D point clouds. After some research, I’m trying to decide the best approach.
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
There isn’t really a single piece of code that describes my problem. More in the following section.
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
Take a look at Potree measurements: http://potree.org/potree/examples/measurements.html
I’m trying to implement the same functionality in Cesium. Requirements are:
-
Drawing of points, polylines and polygons on the point cloud
-
Smooth updates when changing positions quickly (mouse move)
-
Constant lines and points sizes
-
Always drawn on top of the point cloud (depth fail)
-
Use documented Cesium API
I’ve done some research, and came to the following conclusions: -
Drawing an entity with dynamic positions (via CallbackProperty) doesn’t fulfil requirement #4 due to an open issue.
-
Drawing an entity with static positions and changing them on mouse move doesn’t fulfil requirement #2: the shape flickers
-
Drawing a primitive using PolylineGeometry (removing and re-adding it on mouse move) doesn’t fulfil requirement #3: the line “flattens” when viewed from an angle, as it’s a 3D shape
-
Drawing a primitive using SimplePolylineGeometry (removing and re-adding it on mouse move) doesn’t fulfil requirement #2: the shape flickers
-
Drawing a primitive using PolylineVolumeGeometry (removing and re-adding it on mouse move) doesn’t fulfil requirement #3: the volume is set in meters, and thus zooming in and out makes the shape change its size
-
Drawing a primitive using SimplePolylineGeometry (removing and re-adding it on mouse move, and calling Primitive.update manually to prevent flickering) doesn’t fulfil requirement #5 , as update should not be called manually. An example of this is shown here , you can try drawing on the dark globe in the middle of the screen.
-
Drawing an entity with dynamic positions (via CallbackProperty) and overriding PolylineCollection.update manually doesn’t fulfil requirement #5, as it requires overwriting Cesium code in runtime.
I am currently leaning towards implementing using either 6 or 7 above. I would appreciate your feedback.
4. The Cesium version you’re using, your operating system and browser.
1.61, Mac Mojave, Chrome latest.