Class Land.Sector
raft.kilavuz.runtime.Land.Sector All Implemented Interfaces:
-
Enclosing class:
-
public class Land.Sector
a rectangular region which is freely traversable with simple steps
Field Summary |
|
|
|
maxXmax x coordinate in grid space |
|
|
|
maxZmax z coordinate in grid space |
|
minXmin x coordinate in grid space |
|
|
|
minZmin z coordinate in grid space |
Method Summary |
|
|
|
|
|
|
|
getElevationAt(float x, float z)returns interpolated elevation at given point at grid space. |
|
getLand()returns enclosing land instance |
|
getPoint(float x, float z)returns the point at given grid coordinates |
|
getPortals()returns portals owned by with this sector |
|
|
|
toString()returns string representation of this sector |
Field Detail
id
public final int id
-
id of this sector. same with the corresponding sector in Grid
minX
public final float minX
-
min x coordinate in grid space
maxX
public final float maxX
-
max x coordinate in grid space
minY
public final float minY
-
min y coordinate
maxY
public final float maxY
-
max y coordinate
minZ
public final float minZ
-
min z coordinate in grid space
maxZ
public final float maxZ
-
max z coordinate in grid space
Method Detail
getPortals
-
returns portals owned by with this sector
getArrivingPortals
-
returns portals leading to this sector.
this method traverses all portals so is not very cheap
getTransitions
-
returns a collection of transitions from this node.
if an adjacent node is unreachable result may contain it
with a negative cost
Overrides:
-
getCostEstimate
-
returns the cost estimate from this node to destination node.
if cannot be estimated, returning 0 will also result in finding a solution
but generally should take much time
Overrides:
-
Parameters:
-
dest - destination node
-
context - more information about pathfinding enviroment.
-
See Also:
-
getLand
-
returns enclosing land instance
getCenter
-
returns center of this sector
getPoint
-
returns the point at given grid coordinates
getElevationAt
public float getElevationAt(float x,
float z)
-
returns interpolated elevation at given point at grid space.
if all sector is at same elevation then no range check is done, simply elevation is returned
-
Returns:
-
elevation at given point in grid space
Throws:
-
See Also:
-
toString
-
returns string representation of this sector
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