Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
org.ros.android.view.visualization.XYOrthographicCamera Class Reference

List of all members.

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

Detailed Description

Author:
damonkohler@google.com (Damon Kohler)
moesenle@google.com (Lorenz Moesenlechner)

Definition at line 34 of file XYOrthographicCamera.java.


Constructor & Destructor Documentation

org.ros.android.view.visualization.XYOrthographicCamera.XYOrthographicCamera ( FrameTransformTree  frameTransformTree) [inline]

Definition at line 80 of file XYOrthographicCamera.java.


Member Function Documentation

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.

Definition at line 260 of file XYOrthographicCamera.java.

Definition at line 123 of file XYOrthographicCamera.java.

Definition at line 195 of file XYOrthographicCamera.java.

Definition at line 127 of file XYOrthographicCamera.java.

Definition at line 255 of file XYOrthographicCamera.java.

Returns:
the current zoom level in pixels per meter

Definition at line 168 of file XYOrthographicCamera.java.

Changes the camera frame to the specified frame and aligns the camera with the new frame.

Parameters:
framethe new camera frame

Definition at line 234 of file XYOrthographicCamera.java.

See also:
jumpToFrame(GraphName)

Definition at line 246 of file XYOrthographicCamera.java.

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.

Parameters:
focusXthe x coordinate to focus on
focusYthe y coordinate to focus on
deltaAnglethe camera will be rotated by
 deltaAngle 
radians

Definition at line 139 of file XYOrthographicCamera.java.

Changes the camera frame to the specified frame.

If possible, the camera will avoid jumping on the next frame.

Parameters:
framethe new camera frame

Definition at line 206 of file XYOrthographicCamera.java.

See also:
setFrame(GraphName)

Definition at line 224 of file XYOrthographicCamera.java.

Definition at line 250 of file XYOrthographicCamera.java.

Vector3 org.ros.android.view.visualization.XYOrthographicCamera.toCameraFrame ( int  pixelX,
int  pixelY 
) [inline]
Returns:
the provided pixel coordinates (where the origin is the top left corner of the view) in the camera frame

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]
Parameters:
pixelXthe x coordinate on the screen (origin top left) in pixels
pixelYthe y coordinate on the screen (origin top left) in pixels
framethe frame to transform the coordinates into (e.g. "map")
Returns:
the pixel coordinate in the specified frame

Definition at line 188 of file XYOrthographicCamera.java.

void org.ros.android.view.visualization.XYOrthographicCamera.translate ( double  deltaX,
double  deltaY 
) [inline]

Translates the camera.

Parameters:
deltaXdistance to move in x in pixels
deltaYdistance 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.

Parameters:
focusXthe x coordinate to focus on
focusYthe y coordinate to focus on
factorthe zoom will be scaled by this factor

Definition at line 155 of file XYOrthographicCamera.java.


Member Data Documentation

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.

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.

Definition at line 61 of file XYOrthographicCamera.java.

Most the user can zoom out.

Definition at line 59 of file XYOrthographicCamera.java.

Most the user can zoom in.

Definition at line 54 of file XYOrthographicCamera.java.

Definition at line 62 of file XYOrthographicCamera.java.

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.

Initial value:
 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.


The documentation for this class was generated from the following file:


android_core
Author(s): Damon Kohler
autogenerated on Thu Jun 6 2019 21:20:07