|
|||||||||||
| 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 MapUnitpublic Filler getFirstFiller()
getFirstFiller in interface MapUnitpublic int getX()
getX in interface PathPlacepublic int getY()
getY in interface PathPlacepublic int getZ()
getZ in interface MapUnitpublic int getNorthY()
getNorthY in interface PathPlacepublic int getSouthY()
getSouthY in interface PathPlacepublic int getWestX()
getWestX in interface PathPlacepublic int getEastX()
getEastX in interface PathPlacepublic void setValue(double value)
setValue in interface PathPlacepublic double getValue()
getValue in interface MapUnitpublic 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 PathPlacepublic boolean isAdjacent(PathPlace pp)
PathPlace
isAdjacent in interface PathPlacepublic PathPlace[] getAdjacentPathPlaces()
PathPlace
getAdjacentPathPlaces in interface PathPlacepublic MapUnit[] getNotMyAdjacentMapUnits(PathPlace pp)
getNotMyAdjacentMapUnits in interface PathPlacepublic MapUnit[] getMyAdjacentMapUnits(PathPlace pp)
getMyAdjacentMapUnits in interface PathPlacepublic MapUnit[] getUnits()
getUnits in interface PathPlacepublic MapUnit[] getInnerMapUnitBoundary()
getInnerMapUnitBoundary in interface PathPlacepublic AbstractMap getMap()
getMap in interface PathPlacepublic MapUnit[] getOuterMapUnitBoundary()
getOuterMapUnitBoundary in interface PathPlacepublic int getBiggestXLength()
getBiggestXLength in interface PathPlacepublic int getBiggestYLength()
getBiggestYLength in interface PathPlacepublic boolean contains(PathPlace pp)
contains in interface PathPlacepublic boolean contained(PathPlace pp)
contained in interface PathPlacepublic boolean containsMapUnit(MapUnit mu)
containsMapUnit in interface PathPlacepublic MapUnit[] getDifference(PathPlace pp)
getDifference in interface PathPlacepublic MapUnit[] getIntersection(PathPlace pp)
getIntersection in interface PathPlacepublic boolean equals(PathPlace pp)
equals in interface PathPlacepublic int getNumberOfUnits()
getNumberOfUnits in interface PathPlacepublic java.lang.String getSignature()
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||