|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.miv.pherd.ntree.CellSpace
public abstract class CellSpace
Cell space.
The cell space defines a rectangular region of a Cartesian 2D or 3D space. This region is defined by two extreme points "lo" and "hi" that represent the bottom-left-front point and the top-right-back point respectively.
The cell space defines also the number of sub-cells to create when subdividing a cell, and how to distribute the particles of a cell to these sub-cells. It allows generally to know where to put a particle in any space or subspace.
| Field Summary | |
|---|---|
protected double |
diag
Largest diagonal length. |
protected Anchor |
hi
The bounding box hi point. |
protected Anchor |
lo
The bounding box low point. |
| Constructor Summary | |
|---|---|
CellSpace(Anchor lo,
Anchor hi)
|
|
| Method Summary | |
|---|---|
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?. |
boolean |
contains2(double x,
double y,
double z)
|
abstract int |
getDivisions()
Number of sub-cells to create to divide a cell. |
Anchor |
getHiAnchor()
Top-righ-back point defining the bounding box of this cell. |
Anchor |
getLoAnchor()
Bottom-left-from point defining the bounding box of this cell. |
double |
getSize()
The cell size estimation, often the length of the cell space largest diagonal. |
abstract 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Anchor lo
protected Anchor hi
protected double diag
| Constructor Detail |
|---|
public CellSpace(Anchor lo,
Anchor hi)
| Method Detail |
|---|
public Anchor getLoAnchor()
getHiAnchor()public Anchor getHiAnchor()
getLoAnchor()public abstract int getDivisions()
public abstract CellSpace newSubCellSpace(int i)
i - The sub-cell index, must be equal or larger than zero and less
than getDivisions().
public boolean contains(Particle particle)
particle - The particle to classify.
public boolean contains(double x,
double y,
double z)
x - The abscissa.y - The ordinate.z - The depth.
public boolean contains2(double x,
double y,
double z)
public double getSize()
public void resize(Point3 min,
Point3 max)
min - The lowest point (bottom-left-front).max - The highest point (top-right-back).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||