org.ros.android.view.visualization
Class Camera

java.lang.Object
  extended by org.ros.android.view.visualization.Camera

public class Camera
extends java.lang.Object


Constructor Summary
Camera(org.ros.rosjava_geometry.FrameTransformTree frameTransformTree)
           
 
Method Summary
 void apply(GL10 gl)
           
 org.ros.rosjava_geometry.Vector3 getCamera()
           
 org.ros.namespace.GraphName getFixedFrame()
           
 org.ros.namespace.GraphName getTargetFrame()
           
 Viewport getViewport()
           
 float getZoom()
           
 void moveCameraScreenCoordinates(float xDistance, float yDistance)
          Moves the camera.
 void resetFixedFrame()
           
 void resetTargetFrame()
           
 void setCamera(org.ros.rosjava_geometry.Vector3 newCameraPoint)
           
 void setFixedFrame(org.ros.namespace.GraphName fixedFrame)
           
 void setTargetFrame(org.ros.namespace.GraphName frame)
           
 void setViewport(Viewport viewport)
           
 void setZoom(float zoom)
           
 org.ros.rosjava_geometry.Transform toOpenGLPose(Point goalScreenPoint, float orientation)
          Returns the pose in the OpenGL world that corresponds to a screen coordinate and an orientation.
 org.ros.rosjava_geometry.Vector3 toWorldCoordinates(Point screenPoint)
          Returns the real world equivalent of the viewport coordinates specified.
 void zoomCamera(float factor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Camera

public Camera(org.ros.rosjava_geometry.FrameTransformTree frameTransformTree)
Method Detail

apply

public void apply(GL10 gl)

moveCameraScreenCoordinates

public void moveCameraScreenCoordinates(float xDistance,
                                        float yDistance)
Moves the camera.

The distances are given in viewport coordinates, not in world coordinates.

Parameters:
xDistance - distance in x to move
yDistance - distance in y to move

setCamera

public void setCamera(org.ros.rosjava_geometry.Vector3 newCameraPoint)

getCamera

public org.ros.rosjava_geometry.Vector3 getCamera()

zoomCamera

public void zoomCamera(float factor)

toWorldCoordinates

public org.ros.rosjava_geometry.Vector3 toWorldCoordinates(Point screenPoint)
Returns the real world equivalent of the viewport coordinates specified.

Returns:
the world coordinates of the provided screen coordinates

toOpenGLPose

public org.ros.rosjava_geometry.Transform toOpenGLPose(Point goalScreenPoint,
                                                       float orientation)
Returns the pose in the OpenGL world that corresponds to a screen coordinate and an orientation.

Parameters:
goalScreenPoint - the point on the screen
orientation - the orientation of the pose on the screen

getFixedFrame

public org.ros.namespace.GraphName getFixedFrame()

setFixedFrame

public void setFixedFrame(org.ros.namespace.GraphName fixedFrame)

resetFixedFrame

public void resetFixedFrame()

setTargetFrame

public void setTargetFrame(org.ros.namespace.GraphName frame)

resetTargetFrame

public void resetTargetFrame()

getTargetFrame

public org.ros.namespace.GraphName getTargetFrame()

getViewport

public Viewport getViewport()

setViewport

public void setViewport(Viewport viewport)

getZoom

public float getZoom()

setZoom

public void setZoom(float zoom)