Page 1 of 1

Pointcloud type casting question

Posted: Mon Jul 11, 2022 2:29 pm
by PhilipK
Hello,

I want to adapt the distance-function in

Code: Select all

DgmOctree::findTheNearestNeighborStartingFromCell
to include different features (scalar fields). For this, I have to get access to all available scalar fields in the cloud but m_theAssociatedCloud is of type GenericIndexedCloudPersist. Is it save to cast m_theAssociatedCloud into a ccPointCloud? Or is there another way of getting access to the cloud's scalar fields?

I thank you in advance for your answers!

Best regads,
Philip

Re: Pointcloud type casting question

Posted: Mon Jul 11, 2022 6:07 pm
by daniel
Hum, sadly, CCCoreLib cannot handle multiple scalar fields per cloud. The best way to do that would be to copy the code in a different part of CloudCompare (e.g. the CloudCompare project itself, or a plugin). Then, update it there, and replace the generic clouds by ccPointClouds, etc.

Re: Pointcloud type casting question

Posted: Thu Jul 14, 2022 6:50 am
by PhilipK
Hi Daniel!

Okay I understand - than I will move / copy the necessary code parts into a plugin!
Thanks for your answer!

Best regards,
Philip