groimp-platform:pointcloudtools
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
groimp-platform:pointcloudtools [2024/11/11 18:16] – [Merge] gaetan | groimp-platform:pointcloudtools [2024/12/06 12:04] (current) – [Point cloud tools] gaetan | ||
---|---|---|---|
Line 26: | Line 26: | ||
To use the tools in RGG you should import the following packages: | To use the tools in RGG you should import the following packages: | ||
<code java> | <code java> | ||
- | import de.grogra.pointcloud.groimp.*; | ||
- | import de.grogra.pointcloud.groimp.PointCloud; | ||
import de.grogra.pointcloud.objects.impl.*; | import de.grogra.pointcloud.objects.impl.*; | ||
import de.grogra.pointcloud.tools.Tools; | import de.grogra.pointcloud.tools.Tools; | ||
Line 33: | Line 31: | ||
+ | ===== Local transformation ===== | ||
+ | |||
+ | It is key to understand that in GroIMP each node have a local transformation, | ||
+ | |||
+ | For point clouds nodes, it means that two point clouds with points that have the SAME coordinates, | ||
+ | |||
+ | {{: | ||
+ | |||
+ | The first image results from // | ||
+ | |||
+ | It is possible to force a point cloud to have global coordinates by moving it to the root of the graph and transforming it with its globalTransformation with : | ||
+ | |||
+ | <code java> | ||
+ | PointCloud myPC = ...; | ||
+ | Matrix34d transfo = de.grogra.pointcloud.utils.Utils.getGlobalTransform( myPC); | ||
+ | Matrix4d localT = myPC.getLocalTransformation(); | ||
+ | myPC.setTransform( transfo.transform( localT ) ); | ||
+ | [c: | ||
+ | </ | ||
===== Split by plane ===== | ===== Split by plane ===== | ||
Line 132: | Line 149: | ||
<code java> | <code java> | ||
Axiom ==> F PC1 F PC2 ; | Axiom ==> F PC1 F PC2 ; | ||
- | <code/> | + | </code> |
In that example, the points of PC1 are translated by the //F// Node, but their local coordinates do not include this translation. Similarly, the points of PC2 are translated twice, once per F. | In that example, the points of PC1 are translated by the //F// Node, but their local coordinates do not include this translation. Similarly, the points of PC2 are translated twice, once per F. | ||
Line 138: | Line 155: | ||
If we merge the //RED// point cloud (PC2) into the //BLACK// one we have the following result (the points of PC2 are translated only by the first F): | If we merge the //RED// point cloud (PC2) into the //BLACK// one we have the following result (the points of PC2 are translated only by the first F): | ||
- | {{: | + | {{: |
==== Cluster ==== | ==== Cluster ==== |
groimp-platform/pointcloudtools.1731345375.txt.gz · Last modified: 2024/11/11 18:16 by gaetan