@QiStruct open class MapTopGraphicalRepresentation
Used to display map shape on a UI. Scale, x, y and theta can be used to switch from world coordinates relatively to mapFrame to image coordinates in pixels using the following formulas: //! x_map = scale * (cos(theta) * x_img + sin(theta) * y_img) + x y_map = scale * (sin(theta) * x_img - cos(theta) * y_img) + y x_img = 1/scale * (cos(theta) * (x_map - x) + sin(theta) * (y_map-y)) y_img = 1/scale * (sin(theta) * (x_map - x) - cos(theta) * (y_map-y)) Map frame Image pixel coordinates //! ^ y_map in meters + -----> x_img in pixels | | | | +-----> x_map v y_img
<init> |
Create a new MapTopGraphicalRepresentation(image: EncodedImage!, x: Float, y: Float, theta: Float, scale: Float) |
equals |
open fun equals(other: Any?): Boolean |
getImage |
Byte array containing the image map. png encoded. open fun getImage(): EncodedImage! |
getScale |
image scale, in meter per pixel open fun getScale(): Float |
getTheta |
rotation of the image x-axis from the map frame x-axis open fun getTheta(): Float |
getX |
x, y position of the image top left corner in map frame (in meters) abscissa of image top left corner in map frame in meters open fun getX(): Float |
getY |
ordinate of image top left corner in map frame in meters open fun getY(): Float |
hashCode |
open fun hashCode(): Int |
setImage |
Setter for image Byte array containing the image map. png encoded. open fun setImage(image: EncodedImage!): Unit |
setScale |
Setter for scale image scale, in meter per pixel open fun setScale(scale: Float): Unit |
setTheta |
Setter for theta rotation of the image x-axis from the map frame x-axis open fun setTheta(theta: Float): Unit |
setX |
Setter for x x, y position of the image top left corner in map frame (in meters) abscissa of image top left corner in map frame in meters open fun setX(x: Float): Unit |
setY |
Setter for y ordinate of image top left corner in map frame in meters open fun setY(y: Float): Unit |
toString |
open fun toString(): String |