|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.opengl.camera.CameraHandler
com.threerings.opengl.camera.OrbitCameraHandler
public class OrbitCameraHandler
Swings the camera around a target position.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.threerings.opengl.camera.CameraHandler |
|---|
CameraHandler.Offset |
| Field Summary | |
|---|---|
protected SphereCoords |
_coords
The coordinates relative to the target. |
protected float |
_maxDistance
The minimum and maximum distances. |
protected float |
_maxElevation
The minimum and maximum elevations. |
protected float |
_minDistance
The minimum and maximum distances. |
protected float |
_minElevation
The minimum and maximum elevations. |
protected Vector3f |
_pan
A temporary vector for pan calculations. |
protected Vector3f |
_target
The location that the camera is looking at. |
| Fields inherited from class com.threerings.opengl.camera.CameraHandler |
|---|
_camera, _ctx, _far, _fovy, _matchRenderSurface, _near, _offsets |
| Constructor Summary | |
|---|---|
OrbitCameraHandler(GlContext ctx)
Creates a new orbit camera handler for the compositor camera. |
|
OrbitCameraHandler(GlContext ctx,
Camera camera,
boolean matchRenderSurface)
Creates a new orbit camera handler for the specified camera. |
|
| Method Summary | |
|---|---|
SphereCoords |
getCoords()
Returns a reference to the camera's coordinates relative to the target. |
Vector3f |
getTarget()
Returns a reference to the location of the camera's target. |
protected void |
getTransform(Transform3D transform)
Computes the base (pre-offset) camera transform. |
Vector3f |
getViewerTranslation()
Returns a reference to the translation to use for the notional "viewer." |
void |
orbit(float azimuth,
float elevation)
Adjusts the azimuth and elevation of the camera by the specified amounts. |
void |
pan(float x,
float y)
Pans the target by the specified amounts relative to the camera's current orientation. |
void |
panXY(float x,
float y)
Pans the target on the XY plane by the specified amounts relative to the camera's current orientation. |
void |
setCoordLimits(float minElevation,
float maxElevation,
float minDistance,
float maxDistance)
Sets the limits on the camera's relative coordinates. |
void |
zoom(float distance)
"Zooms" in (if negative) or out (if positive) by the specified amount. |
| Methods inherited from class com.threerings.opengl.camera.CameraHandler |
|---|
addOffset, getFar, getFieldOfView, getNear, getViewerRotation, isAdded, setPerspective, sizeChanged, updatePerspective, updatePosition, wasAdded, wasRemoved |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Vector3f _target
protected SphereCoords _coords
protected float _minElevation
protected float _maxElevation
protected float _minDistance
protected float _maxDistance
protected Vector3f _pan
| Constructor Detail |
|---|
public OrbitCameraHandler(GlContext ctx)
public OrbitCameraHandler(GlContext ctx,
Camera camera,
boolean matchRenderSurface)
| Method Detail |
|---|
public Vector3f getTarget()
public SphereCoords getCoords()
public void orbit(float azimuth,
float elevation)
public void zoom(float distance)
public void pan(float x,
float y)
public void panXY(float x,
float y)
public void setCoordLimits(float minElevation,
float maxElevation,
float minDistance,
float maxDistance)
public Vector3f getViewerTranslation()
CameraHandler
getViewerTranslation in class CameraHandlerprotected void getTransform(Transform3D transform)
CameraHandler
getTransform in class CameraHandler
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||