java.io.Serializablepublic class VacuumMap
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field | Description |
|---|---|---|
static int |
BLUE |
|
static int |
GREEN |
|
static int |
RED |
| 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) |
|
int[] |
getBoundingBox() |
|
int[] |
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.
|
int[] |
getMapWithPath() |
|
int[] |
getMapWithPath(java.lang.Integer startColor,
java.lang.Integer pathColor) |
|
int[] |
getMapWithPathInBounds() |
|
int[] |
getMapWithPathInBounds(java.lang.Integer startColor,
java.lang.Integer pathColor) |
|
int |
getOverSample() |
|
java.util.List<float[]> |
getPath() |
|
int |
getPathSize() |
|
int |
hashCode() |
|
int[] |
mapPointScale(int[] p) |
Get coordinates from a point in this map.
|
int[] |
mapRectangleScale(int[] rec) |
Get coordinates from a rectangle in this map.
|
void |
setOverSample(int overSample) |
|
java.lang.String |
toString() |
public static final int RED
public static final int GREEN
public static final int BLUE
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 int[] getMap()
public java.util.List<float[]> getPath()
public int getPathSize()
public int[] getBoundingBox()
public int getOverSample()
public void setOverSample(int overSample)
overSample - The new overSample to set.public int[] mapPointScale(int[] p)
p - The point to convert.public int[] mapRectangleScale(int[] rec)
rec - The rectangle to convert.public int[] getMapWithPathInBounds()
public int[] getMapWithPathInBounds(java.lang.Integer startColor,
java.lang.Integer 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 int[] getMapWithPath()
public int[] getMapWithPath(java.lang.Integer startColor,
java.lang.Integer 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.