|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cad.simcad.maps.Cell
Describe a Cell units relative to a map See CellPath for Pathing attributes
Field Summary | |
protected java.lang.String |
_sig
|
Constructor Summary | |
Cell(CellMap cellMap,
Filler fil,
int i,
int j)
|
|
Cell(CellMap cellMap,
Filler fil,
int x,
int y,
int z)
Create a new Cell with The CellMap as parent The first Filler as Fil x as the x-coordinate y as the y-coordinate z as the z-coordinate The default size of fillers is 3 |
Method Summary | |
void |
addFiller(Filler fil)
|
void |
clearCell()
|
int |
compare(java.lang.Object cellOne,
java.lang.Object cellTwo)
Compare two Cells. |
boolean |
contained(PathPlace pp)
|
boolean |
contains(PathPlace pp)
|
boolean |
containsMapUnit(MapUnit mu)
Returns true if the PathPlace contains the MapUnit given in argument |
boolean |
equals(PathPlace pp)
|
PathPlace[] |
getAdjacentPathPlaces()
Returns the array of adjacent PathPlace to this one. |
Filler[] |
getAllFillers()
Returns all non null fillers as an array |
int |
getBiggestXLength()
|
int |
getBiggestYLength()
|
double |
getCostToReachFrom(MapUnit mu,
PathUser pu)
Returns the cost associated with originating cell and path user WE add to the basic cost of the cell, the cost due to the difference of altitude from the previous cell. |
double |
getCostToReachFrom(PathPlace pp,
PathUser pu)
|
MapUnit[] |
getDifference(PathPlace pp)
Return the MapUnits of the PathPlace that are not contained in the given PathPlace |
int |
getEastX()
|
double |
getElevation()
|
int |
getFillersSize()
|
Filler |
getFirstFiller()
|
MapUnit[] |
getInnerMapUnitBoundary()
Returns an Array of MapUnits that make the inner boundary of the PathPlace This method applied to a MapUnit PathPlace returns itself |
MapUnit[] |
getIntersection(PathPlace pp)
Return the MapUnit contained in both PathPlaces( argument and object) |
AbstractMap |
getMap()
|
MapUnit[] |
getMyAdjacentMapUnits(PathPlace pp)
Returns the MapUnits of this PathPlace adjacent to the PathPlace given in argument |
int |
getNorthY()
|
MapUnit[] |
getNotMyAdjacentMapUnits(PathPlace pp)
Returns the MapUnits of the PathPlace given in argument adjacent to this PathPlace If the PathPlace in argument contains |
int |
getNumberOfUnits()
Returns the number of units contained in the PathPlace |
MapUnit[] |
getOuterMapUnitBoundary()
Returns an Array of MapUnits that make the outer boundary of the PathPlace This method applied to a MapUnit PathPlace returns the same MapUnits |
java.lang.String |
getSignature()
|
int |
getSouthY()
|
MapUnit[] |
getUnits()
Returns an array of the MapUnit making up the PathPlace |
double |
getValue()
|
int |
getWestX()
|
int |
getX()
|
int |
getY()
|
int |
getZ()
|
boolean |
isAdjacent(PathPlace pp)
Returns true if the PathPlace given in argument is adjacent returns false otherwise |
void |
removeLastFiller()
|
void |
resetAllCells()
Reset all Cell attributes |
void |
resetCell()
Reset all Cell value. |
void |
setFiller(Filler fil,
int layer)
|
void |
setFirstFiller(Filler fil)
|
void |
setValue(double value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
Field Detail |
protected java.lang.String _sig
Constructor Detail |
public Cell(CellMap cellMap, Filler fil, int x, int y, int z)
public Cell(CellMap cellMap, Filler fil, int i, int j)
Method Detail |
public void addFiller(Filler fil)
public void removeLastFiller()
public int getFillersSize()
public Filler[] getAllFillers()
public void setFiller(Filler fil, int layer)
public void setFirstFiller(Filler fil)
setFirstFiller
in interface MapUnit
public Filler getFirstFiller()
getFirstFiller
in interface MapUnit
public int getX()
getX
in interface PathPlace
public int getY()
getY
in interface PathPlace
public int getZ()
getZ
in interface MapUnit
public int getNorthY()
getNorthY
in interface PathPlace
public int getSouthY()
getSouthY
in interface PathPlace
public int getWestX()
getWestX
in interface PathPlace
public int getEastX()
getEastX
in interface PathPlace
public void setValue(double value)
setValue
in interface PathPlace
public double getValue()
getValue
in interface MapUnit
public double getElevation()
public void resetCell()
public void resetAllCells()
public void clearCell()
public int compare(java.lang.Object cellOne, java.lang.Object cellTwo)
compare
in interface java.util.Comparator
public double getCostToReachFrom(MapUnit mu, PathUser pu)
public double getCostToReachFrom(PathPlace pp, PathUser pu)
getCostToReachFrom
in interface PathPlace
public boolean isAdjacent(PathPlace pp)
PathPlace
isAdjacent
in interface PathPlace
public PathPlace[] getAdjacentPathPlaces()
PathPlace
getAdjacentPathPlaces
in interface PathPlace
public MapUnit[] getNotMyAdjacentMapUnits(PathPlace pp)
getNotMyAdjacentMapUnits
in interface PathPlace
public MapUnit[] getMyAdjacentMapUnits(PathPlace pp)
getMyAdjacentMapUnits
in interface PathPlace
public MapUnit[] getUnits()
getUnits
in interface PathPlace
public MapUnit[] getInnerMapUnitBoundary()
getInnerMapUnitBoundary
in interface PathPlace
public AbstractMap getMap()
getMap
in interface PathPlace
public MapUnit[] getOuterMapUnitBoundary()
getOuterMapUnitBoundary
in interface PathPlace
public int getBiggestXLength()
getBiggestXLength
in interface PathPlace
public int getBiggestYLength()
getBiggestYLength
in interface PathPlace
public boolean contains(PathPlace pp)
contains
in interface PathPlace
public boolean contained(PathPlace pp)
contained
in interface PathPlace
public boolean containsMapUnit(MapUnit mu)
containsMapUnit
in interface PathPlace
public MapUnit[] getDifference(PathPlace pp)
getDifference
in interface PathPlace
public MapUnit[] getIntersection(PathPlace pp)
getIntersection
in interface PathPlace
public boolean equals(PathPlace pp)
equals
in interface PathPlace
public int getNumberOfUnits()
getNumberOfUnits
in interface PathPlace
public java.lang.String getSignature()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |