com.jme.renderer.lwjgl
Class LWJGLCamera
java.lang.Object
com.jme.renderer.AbstractCamera
com.jme.renderer.lwjgl.LWJGLCamera
- All Implemented Interfaces:
- Camera, java.io.Serializable
- public class LWJGLCamera
- extends AbstractCamera
LWJGLCamera defines a concrete implementation of a
AbstractCamera using the LWJGL library for view port setting.
Most functionality is provided by the AbstractCamera class with
this class handling the OpenGL specific calls to set the frustum and
viewport.
- Version:
- $Id: LWJGLCamera.java,v 1.5 2004/09/14 21:52:24 mojomonkey Exp $
- Author:
- Mark Powell
- See Also:
- Serialized Form
| Fields inherited from class com.jme.renderer.AbstractCamera |
BOTTOM_PLANE, coeffBottom, coeffLeft, coeffRight, coeffTop, direction, FAR_PLANE, FRUSTUM_PLANES, frustumBottom, frustumFar, frustumLeft, frustumNear, frustumRight, frustumTop, left, LEFT_PLANE, location, lookAt, MAX_WORLD_PLANES, NEAR_PLANE, overrideLookAt, planeQuantity, RIGHT_PLANE, TOP_PLANE, up, viewPortBottom, viewPortLeft, viewPortRight, viewPortTop, worldPlane |
|
Constructor Summary |
LWJGLCamera(int width,
int height,
java.lang.Object parent)
Constructor instantiates a new LWJGLCamera object. |
|
Method Summary |
void |
onFrameChange()
onFrameChange updates the view frame when needed. |
void |
onFrustumChange()
onFrustumChange updates the frustum when needed. |
void |
onViewPortChange()
onViewportChange updates the viewport when needed. |
void |
resize(int width,
int height)
resize resizes this cameras view with the given width/height. |
| Methods inherited from class com.jme.renderer.AbstractCamera |
contains, getDirection, getFrustumBottom, getFrustumFar, getFrustumLeft, getFrustumNear, getFrustumRight, getFrustumTop, getLeft, getLocation, getPlaneState, getUp, getViewPortBottom, getViewPortLeft, getViewPortRight, getViewPortTop, lookAt, setAxes, setAxes, setDirection, setFrame, setFrame, setFrustum, setFrustumBottom, setFrustumFar, setFrustumLeft, setFrustumNear, setFrustumPerspective, setFrustumRight, setFrustumTop, setLeft, setLocation, setPlaneState, setUp, setViewPort, setViewPortBottom, setViewPortLeft, setViewPortRight, setViewPortTop, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LWJGLCamera
public LWJGLCamera(int width,
int height,
java.lang.Object parent)
- Constructor instantiates a new
LWJGLCamera object. The
width and height are provided, which cooresponds to either the
width and height of the rendering window, or the resolution of the
fullscreen display.
- Parameters:
width - the width/resolution of the display.height - the height/resolution of the display.
resize
public void resize(int width,
int height)
resize resizes this cameras view with the given width/height.
This is similar to constructing a new camera, but reusing the same
Object.
- Parameters:
width - intheight - int
onFrustumChange
public void onFrustumChange()
onFrustumChange updates the frustum when needed. It calls
super to set the new frustum values then sets the OpenGL frustum.
- Specified by:
onFrustumChange in interface Camera- Overrides:
onFrustumChange in class AbstractCamera
- See Also:
Camera.onFrustumChange()
onViewPortChange
public void onViewPortChange()
onViewportChange updates the viewport when needed. It
calculates the viewport coordinates and then calls OpenGL's viewport.
- See Also:
Camera.onViewPortChange()
onFrameChange
public void onFrameChange()
onFrameChange updates the view frame when needed. It calls
super to update the data and then uses GLU's lookat function to set the
OpenGL frame.
- Specified by:
onFrameChange in interface Camera- Overrides:
onFrameChange in class AbstractCamera
- See Also:
Camera.onFrameChange()