java.lang.Object
simpa.core.api.utils.OcTree
Implementation of the OcTree algorithm for SurfacePoints, with methods for
finding SurfacePoints and finding neighbors of a SurfacePoint in a given
radius.
-
Constructor Summary
ConstructorsConstructorDescriptionOcTree(double x1, double y1, double z1, double x2, double y2, double z2) Sets up an Octree with the given boundary. -
Method Summary
Modifier and TypeMethodDescriptionfindInRange(org.apache.commons.math3.geometry.euclidean.threed.Vector3D center, double radius) Finds a list of SurfacePoints that are in the given radius of a given point.voidinsert(OcTreeEntry entry) Inserts a new SurfacePoint in the Octree and creates new branches where necessary.
-
Constructor Details
-
OcTree
public OcTree(double x1, double y1, double z1, double x2, double y2, double z2) Sets up an Octree with the given boundary.- Parameters:
x1- x value of left most pointy1- y value of left most pointz1- z value of left most pointx2- x value of right most pointy2- y value of right most pointz2- z value of right most point
-
-
Method Details
-
insert
Inserts a new SurfacePoint in the Octree and creates new branches where necessary.- Parameters:
entry- point to add
-
findInRange
public List<OcTreeEntry> findInRange(org.apache.commons.math3.geometry.euclidean.threed.Vector3D center, double radius) Finds a list of SurfacePoints that are in the given radius of a given point.- Parameters:
center- the origin to search fromradius- the search radius- Returns:
- a list of SurfacePoint inside the radius
-