Class PoissonDiskSubSampling.ActiveNode

java.lang.Object
cz.fidentis.analyst.engines.sampling.impl.PoissonDiskSubSampling.ActiveNode
Enclosing class:
PoissonDiskSubSampling

public static class PoissonDiskSubSampling.ActiveNode extends Object
Represents uncovered region of plane, octree node
  • Constructor Details

    • ActiveNode

      public ActiveNode(int x, int y, int depth)
      Creates new active node.
      Parameters:
      x - x coordinate
      y - y coordinate
      depth - defining size of region represented by node
  • Method Details

    • getParentX

      public int getParentX()
      Calculates X cord of parent node from base grid (with depth 0).
      Returns:
      X cord of parent in a base grid
    • getParentY

      public int getParentY()
      Calculates Y cord of parent node from base grid (with depth 0).
      Returns:
      Y cord of parent in a base grid
    • getCornerPoints

      public javax.vecmath.Point2d[] getCornerPoints(double a)
      Calculates corner points of area represented by node
      Returns:
      corner points [(minX, minY),(minX, maxY),(maxX, minY),(maxX, maxY)]
    • getChildren

      public PoissonDiskSubSampling.ActiveNode[] getChildren()
      Creates 4 children nodes in depth +1, each covering 1/4 of this node
      Returns:
      array of children nodes
    • getSideLength

      public double getSideLength(double a)
      Calculates node side length
      Returns:
      side length
    • isCoveredByDisk

      public boolean isCoveredByDisk(javax.vecmath.Point2d point, double d, double a)
      Checks if area represented by node is fully covered by disk of a given point
      Parameters:
      point - point to check
      Returns:
      true if fully covered