|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlejos.robotics.mapping.LineMap
public class LineMap
A map of a room or other closed environment, represented by line segments
Constructor Summary | |
---|---|
LineMap()
Constructor to use when map will be loaded from a data stream |
|
LineMap(Line[] lines,
java.awt.Rectangle boundingRect)
Create a map from an array of line segments and a bounding rectangle |
Method Summary | |
---|---|
void |
dumpMap(java.io.DataOutputStream dos)
Dump the map to a DataOutputStream |
java.awt.Rectangle |
getBoundingRect()
Return the bounding rectangle of the mapped area |
boolean |
inside(Point p)
Check if a point is within the mapped area |
void |
loadMap(java.io.DataInputStream dis)
Load a map from a DataInputStream |
float |
range(Pose pose)
Calculate the range of a robot to the nearest wall |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LineMap(Line[] lines, java.awt.Rectangle boundingRect)
lines
- the line segmentsboundingRect
- the bounding rectanglepublic LineMap()
Method Detail |
---|
public float range(Pose pose)
range
in interface RangeMap
pose
- the pose of the robot
public boolean inside(Point p)
inside
in interface RangeMap
p
- the Point
public java.awt.Rectangle getBoundingRect()
getBoundingRect
in interface RangeMap
public void dumpMap(java.io.DataOutputStream dos) throws java.io.IOException
dos
- the stream
java.io.IOException
public void loadMap(java.io.DataInputStream dis) throws java.io.IOException
dis
- the stream
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |