Closed agGitHub closed 3 years ago
It's not possible to construct your own PointCloud and fill it in with your own points. You could adjust PointCloudRenderer.update()
to accept your list of Vector3f instead, but a discussion on how this is done is probably better suited as a StackOverflow question.
You can create your own Java class (MyPointCloud, for example) with a method that returns a FloatBuffer in the same format that ARCore's PointCloud.getPoints() uses for its FloatBuffer output, and use that in a modified PointCloudRenderer.update() method
Thanks. If anybody has the code to create the FloatBuffer, would be great to mention it here or on Stackoverflow: https://stackoverflow.com/questions/64061348/arcore-how-to-create-a-pointcloud-from-a-list-of-vector3f Thanks !!!
It's pretty easy. The FloatBuffer just needs to contain a sequence of floats representing the points in format: X Y Z Confidence X Y Z Confidence X Y Z Confidence ...
@agGitHub this might help you https://stackoverflow.com/questions/51966132/collouring-android-sceneform-pointcloud-by-confidence-value
Hi,
I have a list of Vector3f representing points in world space coordinates. Now, I would like to render these points thanks to the hello_ar_java PointCloudRenderer. So, I need to create a PointCloud object from my list of Vector3f.
Would it be possible to have the code for this ?
Thanks.