java.io.Serializablepublic class VacuumMap
extends java.lang.Object
implements java.io.Serializable
| Constructor | Description |
|---|---|
VacuumMap(de.sg_o.proto.MapPackageProto.MapPackage image,
de.sg_o.proto.MapSlamProto.MapSlam slam,
int overSample) |
|
VacuumMap(java.io.BufferedReader image,
java.io.BufferedReader slam,
int overSample,
java.util.logging.Level logLevel) |
Create a vacuum map object.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
appendMapSlam(de.sg_o.proto.MapSlamProto.MapSlam slam) |
Add new path segments to the previous path.
|
void |
appendSlam(java.io.BufferedReader slam) |
Append new slam lines to the map
|
boolean |
equals(java.lang.Object o) |
|
java.awt.Rectangle |
getBoundingBox() |
|
java.awt.image.BufferedImage |
getMap() |
|
de.sg_o.proto.MapPackageProto.MapPackage |
getMapPackage() |
Get the complete map image as a proto message.
|
de.sg_o.proto.MapSlamProto.MapSlam |
getMapPath() |
Get the complete path as a proto message.
|
de.sg_o.proto.MapSlamProto.MapSlam |
getMapPath(int start) |
Get the maps path as a proto message.
|
java.awt.image.BufferedImage |
getMapWithPath() |
|
java.awt.image.BufferedImage |
getMapWithPath(java.awt.Color startColor,
java.awt.Color pathColor) |
|
java.awt.image.BufferedImage |
getMapWithPathInBounds() |
|
java.awt.image.BufferedImage |
getMapWithPathInBounds(java.awt.Color startColor,
java.awt.Color pathColor) |
|
int |
getOverSample() |
|
java.util.List<java.awt.geom.Point2D.Float> |
getPath() |
|
int |
getPathSize() |
|
int |
hashCode() |
|
int[] |
mapPointScale(java.awt.Point p) |
Get coordinates from a point in this map.
|
int[] |
mapRectangleScale(java.awt.Rectangle rec) |
Get coordinates from a rectangle in this map.
|
void |
setOverSample(int overSample) |
|
java.lang.String |
toString() |
public VacuumMap(java.io.BufferedReader image,
java.io.BufferedReader slam,
int overSample,
java.util.logging.Level logLevel)
image - The reader the map image should be read from.slam - The reader the slam log should be read from.overSample - The oversampling that should be applied to the map.logLevel - The log level.public VacuumMap(de.sg_o.proto.MapPackageProto.MapPackage image,
de.sg_o.proto.MapSlamProto.MapSlam slam,
int overSample)
public void appendSlam(java.io.BufferedReader slam)
slam - The reader to parsepublic java.awt.image.BufferedImage getMap()
public java.util.List<java.awt.geom.Point2D.Float> getPath()
public int getPathSize()
public java.awt.Rectangle getBoundingBox()
public int getOverSample()
public void setOverSample(int overSample)
overSample - The new overSample to set.public int[] mapPointScale(java.awt.Point p)
p - The point to convert.public int[] mapRectangleScale(java.awt.Rectangle rec)
rec - The rectangle to convert.public java.awt.image.BufferedImage getMapWithPathInBounds()
public java.awt.image.BufferedImage getMapWithPathInBounds(java.awt.Color startColor,
java.awt.Color pathColor)
startColor - The color the start point should be drawn with. If null is provided this will fall back to green.pathColor - The color the path should be drawn with. If null is provided this will fall back to blue.public java.awt.image.BufferedImage getMapWithPath()
public java.awt.image.BufferedImage getMapWithPath(java.awt.Color startColor,
java.awt.Color pathColor)
startColor - The color the start point should be drawn with. If null is provided this will fall back to green.pathColor - The color the path should be drawn with. If null is provided this will fall back to blue.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic de.sg_o.proto.MapPackageProto.MapPackage getMapPackage()
public de.sg_o.proto.MapSlamProto.MapSlam getMapPath()
public de.sg_o.proto.MapSlamProto.MapSlam getMapPath(int start)
start - The first index of the path pints to get.public void appendMapSlam(de.sg_o.proto.MapSlamProto.MapSlam slam)
slam - The path segments to add.Copyright © 2018. All rights reserved.