Pointcloud type casting question

Feel free to ask any question here
Post Reply
PhilipK
Posts: 6
Joined: Tue Apr 14, 2020 12:02 pm

Pointcloud type casting question

Post 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
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Pointcloud type casting question

Post 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.
Daniel, CloudCompare admin
PhilipK
Posts: 6
Joined: Tue Apr 14, 2020 12:02 pm

Re: Pointcloud type casting question

Post 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
Post Reply