Public Member Functions | |
void | apply (GL10 gl) |
boolean | applyFrameTransform (GL10 gl, GraphName frame) |
Transform | getCameraToRosTransform () |
GraphName | getFrame () |
Transform | getScreenTransform (GraphName targetFrame) |
Viewport | getViewport () |
double | getZoom () |
void | jumpToFrame (GraphName frame) |
void | jumpToFrame (String frame) |
void | rotate (double focusX, double focusY, double deltaAngle) |
void | setFrame (GraphName frame) |
void | setFrame (String frame) |
void | setViewport (Viewport viewport) |
Vector3 | toCameraFrame (int pixelX, int pixelY) |
Transform | toFrame (final int pixelX, final int pixelY, final GraphName frame) |
void | translate (double deltaX, double deltaY) |
XYOrthographicCamera (FrameTransformTree frameTransformTree) | |
void | zoom (double focusX, double focusY, double factor) |
Private Member Functions | |
Transform | getCameraToScreenTransform () |
void | resetTransform () |
Private Attributes | |
Transform | cameraToRosTransform |
GraphName | frame |
final FrameTransformTree | frameTransformTree |
final Object | mutex |
Viewport | viewport |
Static Private Attributes | |
static final float | MAXIMUM_ZOOM_FACTOR = 5.f |
static final float | MINIMUM_ZOOM_FACTOR = 0.1f |
static final double | PIXELS_PER_METER = 100.0 |
static final Transform | ROS_TO_SCREEN_TRANSFORM |
Definition at line 34 of file XYOrthographicCamera.java.
org.ros.android.view.visualization.XYOrthographicCamera.XYOrthographicCamera | ( | FrameTransformTree | frameTransformTree | ) | [inline] |
Definition at line 80 of file XYOrthographicCamera.java.
void org.ros.android.view.visualization.XYOrthographicCamera.apply | ( | GL10 | gl | ) | [inline] |
Definition at line 90 of file XYOrthographicCamera.java.
boolean org.ros.android.view.visualization.XYOrthographicCamera.applyFrameTransform | ( | GL10 | gl, |
GraphName | frame | ||
) | [inline] |
Definition at line 97 of file XYOrthographicCamera.java.
Transform org.ros.android.view.visualization.XYOrthographicCamera.getCameraToRosTransform | ( | ) | [inline] |
Definition at line 260 of file XYOrthographicCamera.java.
Transform org.ros.android.view.visualization.XYOrthographicCamera.getCameraToScreenTransform | ( | ) | [inline, private] |
Definition at line 123 of file XYOrthographicCamera.java.
GraphName org.ros.android.view.visualization.XYOrthographicCamera.getFrame | ( | ) | [inline] |
Definition at line 195 of file XYOrthographicCamera.java.
Transform org.ros.android.view.visualization.XYOrthographicCamera.getScreenTransform | ( | GraphName | targetFrame | ) | [inline] |
Definition at line 127 of file XYOrthographicCamera.java.
Definition at line 255 of file XYOrthographicCamera.java.
double org.ros.android.view.visualization.XYOrthographicCamera.getZoom | ( | ) | [inline] |
Definition at line 168 of file XYOrthographicCamera.java.
void org.ros.android.view.visualization.XYOrthographicCamera.jumpToFrame | ( | GraphName | frame | ) | [inline] |
Changes the camera frame to the specified frame and aligns the camera with the new frame.
frame | the new camera frame |
Definition at line 234 of file XYOrthographicCamera.java.
void org.ros.android.view.visualization.XYOrthographicCamera.jumpToFrame | ( | String | frame | ) | [inline] |
Definition at line 246 of file XYOrthographicCamera.java.
void org.ros.android.view.visualization.XYOrthographicCamera.resetTransform | ( | ) | [inline, private] |
Definition at line 86 of file XYOrthographicCamera.java.
void org.ros.android.view.visualization.XYOrthographicCamera.rotate | ( | double | focusX, |
double | focusY, | ||
double | deltaAngle | ||
) | [inline] |
Rotates the camera round the specified coordinates.
focusX | the x coordinate to focus on |
focusY | the y coordinate to focus on |
deltaAngle | the camera will be rotated by deltaAngle |
Definition at line 139 of file XYOrthographicCamera.java.
void org.ros.android.view.visualization.XYOrthographicCamera.setFrame | ( | GraphName | frame | ) | [inline] |
Changes the camera frame to the specified frame.
If possible, the camera will avoid jumping on the next frame.
frame | the new camera frame |
Definition at line 206 of file XYOrthographicCamera.java.
void org.ros.android.view.visualization.XYOrthographicCamera.setFrame | ( | String | frame | ) | [inline] |
Definition at line 224 of file XYOrthographicCamera.java.
void org.ros.android.view.visualization.XYOrthographicCamera.setViewport | ( | Viewport | viewport | ) | [inline] |
Definition at line 250 of file XYOrthographicCamera.java.
Vector3 org.ros.android.view.visualization.XYOrthographicCamera.toCameraFrame | ( | int | pixelX, |
int | pixelY | ||
) | [inline] |
Definition at line 176 of file XYOrthographicCamera.java.
Transform org.ros.android.view.visualization.XYOrthographicCamera.toFrame | ( | final int | pixelX, |
final int | pixelY, | ||
final GraphName | frame | ||
) | [inline] |
pixelX | the x coordinate on the screen (origin top left) in pixels |
pixelY | the y coordinate on the screen (origin top left) in pixels |
frame | the frame to transform the coordinates into (e.g. "map") |
Definition at line 188 of file XYOrthographicCamera.java.
void org.ros.android.view.visualization.XYOrthographicCamera.translate | ( | double | deltaX, |
double | deltaY | ||
) | [inline] |
Translates the camera.
deltaX | distance to move in x in pixels |
deltaY | distance to move in y in pixels |
Definition at line 115 of file XYOrthographicCamera.java.
void org.ros.android.view.visualization.XYOrthographicCamera.zoom | ( | double | focusX, |
double | focusY, | ||
double | factor | ||
) | [inline] |
Zooms the camera around the specified focus coordinates.
focusX | the x coordinate to focus on |
focusY | the y coordinate to focus on |
factor | the zoom will be scaled by this factor |
Definition at line 155 of file XYOrthographicCamera.java.
Transform org.ros.android.view.visualization.XYOrthographicCamera.cameraToRosTransform [private] |
Transforms from camera frame (our data frame) to the ROS frame (our target frame). See ROS_TO_SCREEN_TRANSFORM.
Definition at line 70 of file XYOrthographicCamera.java.
GraphName org.ros.android.view.visualization.XYOrthographicCamera.frame [private] |
The frame in which to render everything. The default value is /map which indicates that everything is rendered in map. If this is changed to, for instance, base_link, the view follows the robot and the robot itself is in the origin.
Definition at line 78 of file XYOrthographicCamera.java.
final FrameTransformTree org.ros.android.view.visualization.XYOrthographicCamera.frameTransformTree [private] |
Definition at line 61 of file XYOrthographicCamera.java.
final float org.ros.android.view.visualization.XYOrthographicCamera.MAXIMUM_ZOOM_FACTOR = 5.f [static, private] |
Most the user can zoom out.
Definition at line 59 of file XYOrthographicCamera.java.
final float org.ros.android.view.visualization.XYOrthographicCamera.MINIMUM_ZOOM_FACTOR = 0.1f [static, private] |
Most the user can zoom in.
Definition at line 54 of file XYOrthographicCamera.java.
final Object org.ros.android.view.visualization.XYOrthographicCamera.mutex [private] |
Definition at line 62 of file XYOrthographicCamera.java.
final double org.ros.android.view.visualization.XYOrthographicCamera.PIXELS_PER_METER = 100.0 [static, private] |
Pixels per meter in the world. If zoom is set to the number of pixels per meter (the display density) then 1 cm in the world will be displayed as 1 cm on the display.
Definition at line 41 of file XYOrthographicCamera.java.
final Transform org.ros.android.view.visualization.XYOrthographicCamera.ROS_TO_SCREEN_TRANSFORM [static, private] |
Transform.zRotation(Math.PI / 2).scale( PIXELS_PER_METER)
Transforms from our ROS frame (the data frame) to the screen frame (our target frame) by rotating the coordinate system so that x is forward and y is left. See REP 103.
Definition at line 48 of file XYOrthographicCamera.java.
Definition at line 64 of file XYOrthographicCamera.java.