I have the Point-Cloud object on the scene, generated from *.Ply.
By leftClick I can create a Polygon from the points on the object, by Right.Click my Polygon becoming closed shape. For example, if I drew by mouse on cloud the green polygons.
BUT the program should have also changed color all of the points, which is inside the green shapes. How to do that? I divided the Polygon on triangle, I know the vertices of the figure, but can’t check which points is inside the Polygon. I have 10 mln point to check, and if to use Triangle method for checking it takes a long time, and the Ply file are not sorting the coordinates by any order.
I haven’t found any useful sample there. Only rabbit might be useful, but it is mesh object, not point cloud. And sample with point Cloud only intersects with one point, i’ve already done that. I need maybe Polygon intersection or raycast not by rays, by triangles, I can divide the polygon on triangles.
Between the lasso example and the point cloud intersection example there should be enough information to implement a lasso-like query mechanism for point clouds. There’s unlikely to be a prebuilt example that does this out of the box already, especially efficiently, I’d think.
I appreciate your piece of advice. I checked the examples, and have tried to intercorporate to my program. But unfortunately the lasso example just building triangles by dividing the defined area. Other functions just returns whether there is intersection or not, and just vertex coordinates.
Like I said you’ll have to understand and adapt the code to get it to work for points. Fundamentally the lasso code is using the ray crossing algorithm to determine whether a vertex / polygon is inside of the lasso. You can look into that algorithm to get started:
Hello.I have tried to get points through that plugin, but unfortunately, it is just dividing the chosen area on equal triangles without giving back the coordinates of points inside the polygon :’(