Class Grid.Portal
raft.kilavuz.grid.Grid.Portal All Implemented Interfaces:
-
Enclosing class:
-
public class Grid.Portal
a portal is a line of (generally) border cells which leads to same sector with same action
Field Summary |
|
actionaction to take to pass through this portal. |
|
|
|
|
|
idid of this portal, assigned during creation |
|
|
|
toSectorwhich sector this portal leads to |
Method Summary |
|
getBounds()returns bounds as minX, maxX, minZ, maxZ |
|
getCells()returns an unmodifiable view of cells this portal consists of |
|
|
|
getGrid()returns enclosing grid instance |
|
|
|
toString()returns a string representation of this portal |
Field Detail
id
public final int id
-
id of this portal, assigned during creation
regular
public final boolean regular
-
if this portal is regular.
a regular portal is a portal which is created during flood fill
and leads to an adjacent sector
direction
-
orientation of this portal. null for non regular portals
action
public final short action
-
action to take to pass through this portal. Land.ACTION_NONE for regular portals
fromSector
-
owner of this portal
toSector
-
which sector this portal leads to
Method Detail
getExplicitCost
public Float getExplicitCost() -
returns explicit cost or null if not set
setExplicitCost
public void setExplicitCost(Float cost) -
explicitly sets cost of passing through this portal.
if an explicit cost is set, it has precedence over regular cost calculation.
setting to null removes explicit cost information. explicit cost set on Grid.Portal
is transferred to Land.Portal when the land is created
getCells
-
returns an unmodifiable view of cells this portal consists of
getGrid
-
returns enclosing grid instance
getBounds
public float[] getBounds()
-
returns bounds as minX, maxX, minZ, maxZ
toString
-
returns a string representation of this portal
Overrides:
-
DocFlex/Doclet is both a multi-format Javadoc doclet and a free edition of DocFlex/Javadoc. If you need to customize your Javadoc without writing a full-blown doclet from scratch, DocFlex/Javadoc may be the only tool able to help you! Find out more at www.docflex.com