|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
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,
Rectangle boundingRect)
Create a map from an array of line segments and a bounding rectangle |
Method Summary | |
---|---|
void |
createSVGFile(java.lang.String fileName)
Create an SVG map file |
void |
dumpObject(java.io.DataOutputStream dos)
Dump the map to a DataOutputStream |
LineMap |
flip()
Create a line map with the y axis flipped |
Rectangle |
getBoundingRect()
Return the bounding rectangle of the mapped area |
Line[] |
getLines()
Get the lines as an array |
boolean |
inside(Point p)
Check if a point is within the mapped area |
void |
loadObject(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, 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 dumpObject(java.io.DataOutputStream dos) throws java.io.IOException
dumpObject
in interface Transmittable
dos
- the stream
java.io.IOException
public void loadObject(java.io.DataInputStream dis) throws java.io.IOException
loadObject
in interface Transmittable
dis
- the stream
java.io.IOException
public Line[] getLines()
public void createSVGFile(java.lang.String fileName) throws java.io.IOException
fileName
- the name of the file to create or overwrite
java.io.IOException
public LineMap flip()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |