|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.camera.CameraHandler
public abstract class CameraHandler
Controls the camera parameters.
| Nested Class Summary | |
|---|---|
static interface |
CameraHandler.Offset
Provides a means of temporarily offsetting the camera transform. |
| Constructor Summary | |
|---|---|
CameraHandler(GlContext ctx)
Creates a new camera handler for the compositor camera. |
|
CameraHandler(GlContext ctx,
Camera camera,
boolean matchRenderSurface)
Creates a new camera handler for the specified camera. |
|
| Method Summary | |
|---|---|
void |
addOffset(CameraHandler.Offset offset)
Adds an element to the list of offsets to apply. |
float |
getFar()
Returns the distance to the far clip plane. |
float |
getFieldOfView()
Returns the camera's field of view in radians. |
float |
getNear()
Returns the distance to the near clip plane. |
Quaternion |
getViewerRotation()
Returns a reference to the rotation to use for the viewer. |
Vector3f |
getViewerTranslation()
Returns a reference to the translation to use for the notional "viewer." |
boolean |
isAdded()
Determines whether the camera handler is currently active. |
void |
setPerspective(float fovy,
float near,
float far)
Sets the camera's perspective parameters. |
void |
sizeChanged(int width,
int height)
Notes that the size of the renderer's drawable surface has changed. |
void |
updatePerspective()
Updates the camera perspective parameters. |
void |
updatePosition()
Updates the camera position. |
void |
wasAdded()
Notifies the handler that it has been added. |
void |
wasRemoved()
Notifies the handler that it has been removed. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CameraHandler(GlContext ctx)
public CameraHandler(GlContext ctx,
Camera camera,
boolean matchRenderSurface)
matchRenderSurface - if true, automatically adjust the camera viewport to match the
dimensions of the renderer surface.| Method Detail |
|---|
public void setPerspective(float fovy,
float near,
float far)
public float getFieldOfView()
public float getNear()
public float getFar()
public void addOffset(CameraHandler.Offset offset)
public Vector3f getViewerTranslation()
public Quaternion getViewerRotation()
public boolean isAdded()
public void wasAdded()
public void wasRemoved()
public void updatePerspective()
public void updatePosition()
public void sizeChanged(int width,
int height)
Renderer.Observer
sizeChanged in interface Renderer.Observer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||