User Tools

Site Tools


groimp-platform:pointcloud

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
groimp-platform:pointcloud [2024/11/06 12:40] – [Point Cloud visualization] gaetangroimp-platform:pointcloud [2024/12/02 16:37] (current) – [Point Cloud] gaetan
Line 1: Line 1:
 ====== Point Cloud ====== ====== Point Cloud ======
  
-The objects and tools presented in this wiki mostly comes from the plugin [[https://gitlab.com/grogra/groimp-plugins/Pointcloud|Pointcloud]]. See [[dev-guide:plugins|here]] to see how install plugins in GroIMP. The wiki is up to date with the version 1.of the plugin.+The objects and tools presented in this wiki mostly comes from the plugin [[https://gitlab.com/grogra/groimp-plugins/Pointcloud|Pointcloud]]. See [[dev-guide:plugins|here]] to see how install plugins in GroIMP. The wiki is up to date with the version 1.of the plugin.
  
 Tools: Tools:
Line 12: Line 12:
   * [[tutorials:using-mesh-clouds-as-organ|Using point clouds with meshes as organs]]   * [[tutorials:using-mesh-clouds-as-organ|Using point clouds with meshes as organs]]
  
-===== Point Cloud object design =====+===== Object design =====
  
 In GroIMP point cloud are implemented following the design: In GroIMP point cloud are implemented following the design:
  
-{{ :groimp-platform:complete_design1.svg }} +<uml> 
 +scale 700 width 
 +Class Node 
 +Interface CollectionDisplayable { 
 +getDisplayHandler() 
 +setDisplayHandler() 
 +
 +Class PointCloud { 
 +setCloud() 
 +} 
 +Interface CloudContext { 
 +Cloud getCloud 
 +} 
 +Interface Cloud { 
 +setPoints(Point[]) 
 +addPoints(Point[]) 
 +getPoints() 
 +remove(Object[]) 
 +removeAll() 
 +float[] pointsToFloat() 
 +Point[] floatsToPoints(float[]) 
 +
 +Interface Point { 
 +float[] toFloat() 
 +
 +Class PointCloudD 
 +Class CloudGraph 
 +Class CloudList 
 +Class CloudArray 
 +Class ArrayPoint 
 +Class PointCloudLeaf 
 + 
 +Node <|-- PointCloud 
 +CloudContext <|.. PointCloud 
 +CloudContext <|-- Cloud 
 +CloudContext <|-- Point 
 +CollectionDisplayable <|.. PointCloudD 
 +PointCloud <|-- PointCloudD 
 +Cloud <|.. CloudGraph 
 +Cloud <|.. CloudArray 
 +CloudArray <|-- CloudList 
 +Point <|.. ArrayPoint 
 +Point <|.. PointCloudLeaf 
 +Point --* Cloud 
 +ArrayPoint --* CloudArray 
 +Cloud --o PointCloud 
 +PointCloudLeaf --* CloudGraph 
 + 
 +</uml> 
  
 The main Objects are:  The main Objects are: 
-  * **PointCloud** : A **Node**, i.e. an object that can be inserted in a GroIMP graph. The PointCloud is responsible for the display of the points by implementing **CollectionDisplayable**. +  * **PointCloud** : A **Node**, i.e. an object that can be inserted in a GroIMP graph. The PointCloud is responsible for the display of the points. In the case of **PointCloudD** the display is managed by implementing **CollectionDisplayable**. 
   * **Cloud** : The representation of the data structure through which the point cloud data is accessed.    * **Cloud** : The representation of the data structure through which the point cloud data is accessed. 
   * **Point** : The base interface that an object must implements to be part of a Cloud. In GroIMP, points are not limited to 3 dimensions.   * **Point** : The base interface that an object must implements to be part of a Cloud. In GroIMP, points are not limited to 3 dimensions.
Line 28: Line 77:
  
  
-===== Point Cloud visualization =====+===== GUI Visualization & Interactions =====
  
 The PointCloud visualization in the 3d scene of GroIMP follows the classic GroIMP display scene creation (see [[groimp-platform:3d:visualization|here]] for more detail on how GroIMP build the 3d scene).  The PointCloud visualization in the 3d scene of GroIMP follows the classic GroIMP display scene creation (see [[groimp-platform:3d:visualization|here]] for more detail on how GroIMP build the 3d scene). 
Line 41: Line 90:
 The management of the display is push to a **CollectionDisplayHandler**. There are currently three implementations of the interface:  The management of the display is push to a **CollectionDisplayHandler**. There are currently three implementations of the interface: 
   * **FloatArrayHandler** : Simply handle float arrays which is the data representation of **CloudArray** and **CloudList**. It can however be used on any type of **Cloud** as they implements //pointsToFloat()//. This DisplayHandler takes a float array of length divisible by three, each point coordinates are in the array stored as: [x0, y0, z0, x1, y1, z1, ...].   * **FloatArrayHandler** : Simply handle float arrays which is the data representation of **CloudArray** and **CloudList**. It can however be used on any type of **Cloud** as they implements //pointsToFloat()//. This DisplayHandler takes a float array of length divisible by three, each point coordinates are in the array stored as: [x0, y0, z0, x1, y1, z1, ...].
-  * **CollectionPointHandler** : Takes a collection of Points as input (either a List or a graph). The collection is visited and each Point display data is stored in the CollectionDisplayHandler. It requires that Points have at least three dimensions and will only includes the three first dimensions to the display. +  * **CollectionPointHandler** : Used to handle a collection of Point that do not have 3d geometry (e.g. imp3d points). It takes a collection of Points as input (either a List or a graph). The collection is visited and each Point display data is stored in the CollectionDisplayHandler. It requires that Points have at least three dimensions and will only includes the three first dimensions as coordinate to display a point in the 3d scene
-  * **CollectionMeshHandler** : Similarly to the CollectionPointHandler, it visits the given collection, but it require each points to have at least nine dimensions (a.k.a. to represent at least three 3d points). The set of coordinates of each Point is turned into a Mesh surface. All the Meshes are aggregated into the CollectionMeshHandler.+  * **CollectionMeshHandler** : Similarly to the CollectionPointHandler, it visits the given collection, but it uses the 3d geometry of each Point, create a Mesh out of it, and aggregate them into the CollectionMeshHandler. The aggregated Mesh is the displayed object.
  
 DisplayHandler require to be pinged to update their data. This can be done manually through the PointCloud using the attribute editor, or automatically when some tools are applied on the PointCloud. DisplayHandler require to be pinged to update their data. This can be done manually through the PointCloud using the attribute editor, or automatically when some tools are applied on the PointCloud.
  
-{{ :groimp-platform:visualization.svg |}}+{{ :groimp-platform:visualization2.svg |}}
  
-The picking is also managed by the PointCloud through the DisplayHandler. By default, the Points are picked on the 3d scene, but a [[groimp-platform:3d:navigation|navigation mode]] enables to pick the DisplayHandler.+The picking is also managed by the PointCloud through the DisplayHandler. By default, the Points are picked on the 3d scene, but a [[3d-guide:view_manipulations#navigate_in_the_scene|navigation mode]] enables to pick the DisplayHandler.
  
 ===== Point Cloud as a graph ===== ===== Point Cloud as a graph =====
 +
 +Cloud object can be represented as graph in GroIMP, where both the PointCloud and each Point objects are GroIMP Nodes. This structure enables to leverage the power of XL queries onto the point cloud data both for querying and rewriting. 
 +
 +The main objects of a PointCloud as graph are:
 +  * **PointCloud**: the Node that is part of the project graph. 
 +  * **CloudGraph** : the object that extends Cloud. It implements the methods to access/modify the Points. Because the Points of a CloudGraph are Nodes, they can also be accessed and modified through XL queries.
 +  * **IntermediateCloudNode** : intermediate nodes used to balance the load of the graph.
 +  * **PointCloudLeaf** ; the implementation of Point of the Cloud. PointCloudLeaf extends Node (or subclasses of Node), thus are part of the project graph.
 +
 +GroIMP struggle handling Nodes with huge number of edges. It slows down the graph visiting and the queries processing. Thus, the Cloud data is spread over several layers using IntermediateCloudNode. IntermediateCloudNode are used in order to enables the Points of a PointCloud to be rewritten with minimum modifications in the project graph. Modifications that add/remove/change edges, on Points only affect the leaves of the PointCloud graph.
 +
 +The PointCloudLeaf can extends imp3d objects to have a 3d geometry. The PointCloudLeaf objects are not limited to "point" as they can have any 3d implemented in GroIMP. However, within one Cloud all Points needs to extends the same Class. That class is defined on the Cloud creation and cannot be modified. To replace a Point of a specific class to another, a new Cloud is required.
 +
 +Three base implementation of PointCloudLeaf are available:
 +  * **LeafPointImpl** : extends imp3d Point (not to be confused with Point from pointcloud - objects from imp3d are GroIMP objects for the 3d scene see [[3d-guide:3d-manipulations#3d_objects|here]] for more details).
 +  * **LeafLineImpl** : extends imp3d Axis. 
 +  * **LeafMeshImpl** : extends imp3d MeshNode.
 +
 +{{ :groimp-platform:cloudgraph.svg |}}
groimp-platform/pointcloud.1730893204.txt.gz · Last modified: 2024/11/06 12:40 by gaetan