point to triangle registration

Feel free to ask any question here
Post Reply
Alexmer12345
Posts: 1
Joined: Thu Jul 07, 2022 8:40 am

point to triangle registration

Post by Alexmer12345 »

I am a newbie of cc,can you tell me in point to triangle registration,how to find the nearest triangle of each point?I have read the source code but I can not understand.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: point to triangle registration

Post by daniel »

Well, that's a bit tricky, but the brute force code is to test all triangles and take the one that gives the smallest distance. Then, in CC, we use a kind of grid structure in which we remember, which triangle(s) intersect each cell. Then it helps to reduce the number of comparisons a lot.

This structure is here: https://github.com/CloudCompare/CCCoreL ... rsection.h

But you would have to mimic the way it's used by the C2M algorithm to find the nearest triangle for each point..
Daniel, CloudCompare admin
Post Reply