Class PoissonDiskSubSampling.ActiveNode
java.lang.Object
cz.fidentis.analyst.engines.sampling.impl.PoissonDiskSubSampling.ActiveNode
- Enclosing class:
PoissonDiskSubSampling
Represents uncovered region of plane, octree node
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.vecmath.Point2d[]
getCornerPoints
(double a) Calculates corner points of area represented by nodeCreates 4 children nodes in depth +1, each covering 1/4 of this nodeint
Calculates X cord of parent node from base grid (with depth 0).int
Calculates Y cord of parent node from base grid (with depth 0).double
getSideLength
(double a) Calculates node side lengthboolean
isCoveredByDisk
(javax.vecmath.Point2d point, double d, double a) Checks if area represented by node is fully covered by disk of a given point
-
Constructor Details
-
ActiveNode
public ActiveNode(int x, int y, int depth) Creates new active node.- Parameters:
x
- x coordinatey
- y coordinatedepth
- 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
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
-