public class Camera
extends java.lang.Object
| Constructor and Description |
|---|
Camera(org.ros.rosjava_geometry.FrameTransformTree frameTransformTree) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(GL10 gl) |
boolean |
applyFrameTransform(GL10 gl,
org.ros.rosjava_geometry.FrameName frame) |
org.ros.rosjava_geometry.FrameName |
getFrame() |
double |
getZoom() |
void |
jumpToFrame(org.ros.rosjava_geometry.FrameName frame)
Changes the camera frame to the specified frame and aligns the camera with
the new frame.
|
void |
jumpToFrame(java.lang.String frame) |
void |
rotate(double focusX,
double focusY,
double deltaAngle)
Rotates the camera round the specified coordinates.
|
void |
setFrame(org.ros.rosjava_geometry.FrameName frame)
Changes the camera frame to the specified frame.
|
void |
setFrame(java.lang.String frame) |
void |
setViewport(Viewport viewport) |
org.ros.rosjava_geometry.Vector3 |
toMetricCoordinates(int x,
int y) |
void |
translate(double deltaX,
double deltaY)
Translates the camera.
|
void |
zoom(double focusX,
double focusY,
double factor)
Zooms the camera around the specified focus coordinates.
|
public Camera(org.ros.rosjava_geometry.FrameTransformTree frameTransformTree)
public void apply(GL10 gl)
public boolean applyFrameTransform(GL10 gl,
org.ros.rosjava_geometry.FrameName frame)
public void translate(double deltaX,
double deltaY)
deltaX - distance to move in x in pixelsdeltaY - distance to move in y in pixelspublic void rotate(double focusX,
double focusY,
double deltaAngle)
focusX - the x coordinate to focus onfocusY - the y coordinate to focus ondeltaAngle - the camera will be rotated by deltaAngle radianspublic void zoom(double focusX,
double focusY,
double factor)
focusX - the x coordinate to focus onfocusY - the y coordinate to focus onfactor - the zoom will be scaled by this factorpublic double getZoom()
public org.ros.rosjava_geometry.Vector3 toMetricCoordinates(int x,
int y)
public org.ros.rosjava_geometry.FrameName getFrame()
public void setFrame(org.ros.rosjava_geometry.FrameName frame)
If possible, the camera will avoid jumping on the next frame.
frame - the new camera framepublic void setFrame(java.lang.String frame)
setFrame(FrameName)public void jumpToFrame(org.ros.rosjava_geometry.FrameName frame)
frame - the new camera framepublic void jumpToFrame(java.lang.String frame)
jumpToFrame(FrameName)public void setViewport(Viewport viewport)