Page 1 of 1

point to triangle registration

Posted: Thu Jul 07, 2022 8:47 am
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.

Re: point to triangle registration

Posted: Thu Jul 07, 2022 5:57 pm
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..