org.miv.pherd.ntree
Class QuadtreeCellSpace

java.lang.Object
  extended by org.miv.pherd.ntree.CellSpace
      extended by org.miv.pherd.ntree.QuadtreeCellSpace

public class QuadtreeCellSpace
extends CellSpace

Cell space for a quadtree.

This cell space defines four subcells for each cell subdivision.

Since:
2007
Author:
Antoine Dutot

Field Summary
protected  Anchor C
           
 
Fields inherited from class org.miv.pherd.ntree.CellSpace
diag, hi, lo
 
Constructor Summary
QuadtreeCellSpace(Anchor lo, Anchor hi)
           
 
Method Summary
 boolean contains(double x, double y)
           
 boolean contains(double x, double y, double z)
          Does this space contains the given position.
 boolean contains(Particle particle)
          Does this space contains the given particle?.
 int getDivisions()
          Number of sub-cells to create to divide a cell.
 CellSpace newSubCellSpace(int i)
          Create the appropriate cell space for the given sub-cell index.
 void resize(Point3 min, Point3 max)
          Resize this space to the given bounding box.
 String toString()
           
 
Methods inherited from class org.miv.pherd.ntree.CellSpace
contains2, getHiAnchor, getLoAnchor, getSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

C

protected Anchor C
Constructor Detail

QuadtreeCellSpace

public QuadtreeCellSpace(Anchor lo,
                         Anchor hi)
Method Detail

getDivisions

public int getDivisions()
Description copied from class: CellSpace
Number of sub-cells to create to divide a cell.

Specified by:
getDivisions in class CellSpace
Returns:
The number of sub-cells obtained for a cell mitosis.

contains

public boolean contains(Particle particle)
Does this space contains the given particle?.

Overrides:
contains in class CellSpace
Parameters:
particle - The particle to classify.
Returns:
True if this space contains the given particle.

contains

public boolean contains(double x,
                        double y,
                        double z)
Description copied from class: CellSpace
Does this space contains the given position.

Overrides:
contains in class CellSpace
Parameters:
x - The abscissa.
y - The ordinate.
z - The depth.
Returns:
True if this space contains the given position.

contains

public boolean contains(double x,
                        double y)

newSubCellSpace

public CellSpace newSubCellSpace(int i)
Description copied from class: CellSpace
Create the appropriate cell space for the given sub-cell index. This method role is to create a sub-cell space when subdividing a cell.

Specified by:
newSubCellSpace in class CellSpace
Parameters:
i - The sub-cell index, must be equal or larger than zero and less than CellSpace.getDivisions().
Returns:
A new cell space.

toString

public String toString()
Overrides:
toString in class Object

resize

public void resize(Point3 min,
                   Point3 max)
Description copied from class: CellSpace
Resize this space to the given bounding box. This operation is valid only if this CellSpace has no child spaces.

Overrides:
resize in class CellSpace
Parameters:
min - The lowest point (bottom-left-front).
max - The highest point (top-right-back).


Copyright © 2011. All Rights Reserved.