uwcse.location.core
Class WorldMap

java.lang.Object
  |
  +--uwcse.location.core.WorldMap

public class WorldMap
extends Object

The WorldMap class describes a coordinate system in which location computations occur.

Version:
$Revision: 1.5 $
Author:
Jeffrey Hightower

Constructor Summary
WorldMap()
          Create an empty world map 1 cubic unit in size.
WorldMap(byte[][] grid, Vector3d gridResolution, Vector3d gridOriginTranslation)
          Creates a world map defined by the given obstacle grid and transform.
WorldMap(Tuple3d lowerCorner, Tuple3d upperCorner)
          Creates a world map defined by the given lower and upper bounding corners.
WorldMap(WorldMap wm)
          Creates a map measurement as a copy of the given one.
 
Method Summary
 Object clone()
          Return a cloned copy of this world map.
 int getGridHeight()
          Return the width of the obstacle grid.
 int getGridWidth()
          Return the width of the obstacle grid.
 Point3d getLowerCorner()
          Get the lower corner of the bounding box of this map.
 Point3d getUpperCorner()
          Get the upper corner of the bounding box of this map.
 Vector3d getWorldSize()
          Get the size of the world.
 boolean isConsistent(Tuple3d position)
          Return true if the given world position is consistent with this world map.
 boolean isConsistent(State s)
          Return true if the given State is consistent with this world map.
 boolean isConsistentGridFrame(Tuple3d pos)
          Returns true if the given position, already transformed to the grid reference frame, is consistent with this world map (i.e. not off the map, or in an obstacle).
 double obstacleDistance(Point3d position, Vector3d heading)
          Returns the maximum distance that can be traveled from the given position along the given heading before leaving the bounds of the world map or hitting an obstacle.
 double obstacleDistance(State s)
          Returns the maximum distance that can be traveled from the given State's position along its heading before leaving bounds of the world map or hitting an obstacle.
 String toString()
          Return a string representation of this WorldMap.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WorldMap

public WorldMap()
Create an empty world map 1 cubic unit in size.


WorldMap

public WorldMap(Tuple3d lowerCorner,
                Tuple3d upperCorner)
Creates a world map defined by the given lower and upper bounding corners.


WorldMap

public WorldMap(byte[][] grid,
                Vector3d gridResolution,
                Vector3d gridOriginTranslation)
Creates a world map defined by the given obstacle grid and transform.


WorldMap

public WorldMap(WorldMap wm)
Creates a map measurement as a copy of the given one.

Method Detail

clone

public Object clone()
Return a cloned copy of this world map.

Overrides:
clone in class Object

toString

public String toString()
Return a string representation of this WorldMap.

Overrides:
toString in class Object

getLowerCorner

public Point3d getLowerCorner()
Get the lower corner of the bounding box of this map.


getUpperCorner

public Point3d getUpperCorner()
Get the upper corner of the bounding box of this map.


getWorldSize

public Vector3d getWorldSize()
Get the size of the world.


getGridWidth

public int getGridWidth()
Return the width of the obstacle grid.


getGridHeight

public int getGridHeight()
Return the width of the obstacle grid.


isConsistent

public boolean isConsistent(State s)
Return true if the given State is consistent with this world map.


isConsistent

public boolean isConsistent(Tuple3d position)
Return true if the given world position is consistent with this world map.


isConsistentGridFrame

public boolean isConsistentGridFrame(Tuple3d pos)
Returns true if the given position, already transformed to the grid reference frame, is consistent with this world map (i.e. not off the map, or in an obstacle). This method is usually not used externally.

See Also:
isConsistent(State), isConsistent(Tuple3d)

obstacleDistance

public double obstacleDistance(State s)
Returns the maximum distance that can be traveled from the given State's position along its heading before leaving bounds of the world map or hitting an obstacle.


obstacleDistance

public double obstacleDistance(Point3d position,
                               Vector3d heading)
Returns the maximum distance that can be traveled from the given position along the given heading before leaving the bounds of the world map or hitting an obstacle.



This documentation is for the Location Stack v0.8. The latest distribution, the documentation, and the list of contributors to the Location Stack can always be found at http://portolano.cs.washington.edu/projects/location/

© Copyright 2004 University of Washington CSE