java.lang.Object
de.grogra.pointcloud.utils.Utils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Node[]
Return the PointCloudBase that are one depth bellow the given root.static Node[]
fromSourceName
(Graph g, String name) Return the PointCloudBase that have the given source name (i.e. the pointcloud created from a file).Returns all leaf nodes as list of nodesstatic boolean
isLeafOverPlane
(Null leaf, Plane plane) Determine whether a leaf node is above or under a given planestatic void
setAsOrigin
(Node[] pcs, PointCloudLeaf newOrigin, Tuple3d coordinate) static void
setAsOrigin
(PointCloudBase pc, PointCloudLeaf newOrigin, Tuple3d coordinate) Translate the pointcloud base to use the coordinate as new origin based on the newOrigin leaf provided.static void
static void
translate
(PointCloudBase pc, Tuple3d translation) translate the pointcloud with the translation vector.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
translate
translate the pointcloud with the translation vector.- Parameters:
pc
-coordinate
- the new origin (a node that is going to be pushed to the (0,0,0)
-
translate
-
setAsOrigin
Translate the pointcloud base to use the coordinate as new origin based on the newOrigin leaf provided.- Parameters:
pc
-newOrigin
-coordinate
-
-
setAsOrigin
-
fromSourceName
Return the PointCloudBase that have the given source name (i.e. the pointcloud created from a file). One file usually create several pointcloudbase objects (one for the points, one for the faces, one for the edges).- Parameters:
name
-- Returns:
-
fromRoot
Return the PointCloudBase that are one depth bellow the given root. When imported pointclouds file create several PointCloudBase that are linked to a node before being added to the main graph. That node is the one expected here.- Parameters:
root
-
-
isLeafOverPlane
Determine whether a leaf node is above or under a given plane- Parameters:
leaf
- The leaf to be checkedplane
- The plane to check against- Returns:
- true if the leaf is over the given plane else false
-
getLeafNodes
Returns all leaf nodes as list of nodes- Parameters:
pc
- the point cloud containing the leaf nodes- Returns:
- list of nodes
-