|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.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,
Rectangle boundingRect)
Create a map from an array of line segments and a bounding rectangle |
Method Summary | |
---|---|
void |
dumpMap(DataOutputStream dos)
Dump the map to a DataOutputStream |
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(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, 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 Rectangle getBoundingRect()
getBoundingRect
in interface RangeMap
public void dumpMap(DataOutputStream dos) throws IOException
dos
- the stream
IOException
public void loadMap(DataInputStream dis) throws IOException
dis
- the stream
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |