Class Land.Sector
raft.kilavuz.runtime
java.lang.Object
  raft.kilavuz.runtime.AStar.Node
      raft.kilavuz.runtime.Land.Sector
All Implemented Interfaces:
Enclosing class:

public class Land.Sector
extends AStar.Node
implements Serializable
a rectangular region which is freely traversable with simple steps

Field Summary
int
id
id of this sector.
float
maxX
max x coordinate in grid space
float
maxY
max y coordinate
float
maxZ
max z coordinate in grid space
float
minX
min x coordinate in grid space
float
minY
min y coordinate
float
minZ
min z coordinate in grid space
Method Summary
getArrivingPortals()
returns portals leading to this sector.
getCenter()
returns center of this sector
float
getCostEstimate(AStar.Node dest, PathContext context)
returns the cost estimate from this node to destination node.
float
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
getTransitions()
returns a collection of transitions from this node.
toString()
returns string representation of this sector
Methods inherited from class raft.kilavuz.runtime.AStar.Node
getId, isSameWithGoal
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
public List<Land.PortalgetPortals()
returns portals owned by with this sector

getArrivingPortals
public List<Land.PortalgetArrivingPortals()
returns portals leading to this sector. this method traverses all portals so is not very cheap

getTransitions
public Collection<AStar.TransitiongetTransitions()
returns a collection of transitions from this node. if an adjacent node is unreachable result may contain it with a negative cost
Overrides:

getCostEstimate
public float getCostEstimate(AStar.Node dest,
                             PathContext context)
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
public Land getLand()
returns enclosing land instance

getCenter
public Land.Point getCenter()
returns center of this sector

getPoint
public Land.Point getPoint(float x,
                           float z)
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:
ArrayIndexOutOfBoundsException - if point is not on this sector
See Also:

toString
public String toString()
returns string representation of this sector
Overrides:
toString in class Object
Java API documentation generated with DocFlex/Doclet v1.5.2
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