Module simpa.core

Class OcTree

java.lang.Object
simpa.core.api.utils.OcTree

public class OcTree extends Object
Implementation of the OcTree algorithm for SurfacePoints, with methods for finding SurfacePoints and finding neighbors of a SurfacePoint in a given radius.
  • Constructor Summary

    Constructors
    Constructor
    Description
    OcTree(double x1, double y1, double z1, double x2, double y2, double z2)
    Sets up an Octree with the given boundary.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    void
    Inserts a new SurfacePoint in the Octree and creates new branches where necessary.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 point
      y1 - y value of left most point
      z1 - z value of left most point
      x2 - x value of right most point
      y2 - y value of right most point
      z2 - z value of right most point
  • Method Details

    • insert

      public void insert(OcTreeEntry entry)
      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 from
      radius - the search radius
      Returns:
      a list of SurfacePoint inside the radius