|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.renderer.AbstractCamera
com.jme.renderer.lwjgl.LWJGLCamera
public class LWJGLCamera
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.jme.renderer.Camera |
---|
Camera.FrustumIntersect |
Field Summary |
---|
Fields inherited from class com.jme.renderer.AbstractCamera |
---|
_modelView, _projection, _transMatrix, BOTTOM_PLANE, coeffBottom, coeffLeft, coeffRight, coeffTop, direction, FAR_PLANE, FRUSTUM_PLANES, frustumBottom, frustumFar, frustumLeft, frustumNear, frustumRight, frustumTop, height, left, LEFT_PLANE, location, MAX_WORLD_PLANES, NEAR_PLANE, newDirection, planeQuantity, RIGHT_PLANE, TOP_PLANE, up, viewPortBottom, viewPortLeft, viewPortRight, viewPortTop, width, worldPlane |
Constructor Summary | |
---|---|
LWJGLCamera()
|
|
LWJGLCamera(int width,
int height)
Constructor instantiates a new LWJGLCamera object. |
|
LWJGLCamera(int width,
int height,
boolean dataOnly)
Constructor instantiates a new LWJGLCamera object. |
Method Summary | |
---|---|
void |
apply()
Apply the settings of the camera to the current graphics state. |
protected void |
doFrameChange()
Uses GLU's lookat function to set the OpenGL frame. |
protected void |
doFrustumChange()
Sets the OpenGL frustum. |
protected void |
doViewPortChange()
Sets OpenGL's viewport. |
int |
getHeight()
|
int |
getWidth()
|
void |
onFrameChange()
onFrameChange updates the view frame of the camera. |
void |
onFrustumChange()
onFrustumChange updates the frustum to reflect any changes
made to the planes. |
void |
onViewPortChange()
onViewPortChange is an update callback that is activated
if the view port changes. |
void |
resize(int width,
int height)
Resizes this camera's view with the given width and height. |
(package private) void |
resize(int width,
int height,
boolean forceDirty)
Resizes this camera's view with the given width and height. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LWJGLCamera()
public LWJGLCamera(int width, int height)
LWJGLCamera
object. The
width and height are provided, which corresponds to either the
width and height of the rendering window, or the resolution of the
fullscreen display.
width
- the width/resolution of the display.height
- the height/resolution of the display.public LWJGLCamera(int width, int height, boolean dataOnly)
LWJGLCamera
object. The
width and height are provided, which corresponds to either the
width and height of the rendering window, or the resolution of the
fullscreen display.
width
- the width/resolution of the display.height
- the height/resolution of the display.Method Detail |
---|
public int getHeight()
getHeight
in class AbstractCamera
public int getWidth()
getWidth
in class AbstractCamera
public void resize(int width, int height)
width
- the view widthheight
- the view heightvoid resize(int width, int height, boolean forceDirty)
width
- the view widthheight
- the view heightforceDirty
- true
if camera settings should be treated as
changedpublic void apply()
Camera
If state should be applied even if not dirty, make sure to call Camera.update()
before.
public void onFrustumChange()
AbstractCamera
onFrustumChange
updates the frustum to reflect any changes
made to the planes. The new frustum values are kept in a temporary
location for use when calculating the new frame. It should be noted that
the abstract implementation of this class only updates the data, and does
not make any rendering calls. As such, any impelmenting subclass should
insure to override this method call it with super and then call the
rendering specific code.
onFrustumChange
in interface Camera
onFrustumChange
in class AbstractCamera
public void onViewPortChange()
Camera
onViewPortChange
is an update callback that is activated
if the view port changes.
public void onFrameChange()
AbstractCamera
onFrameChange
updates the view frame of the camera. It
should be noted that the abstract implementation of this class only
updates the data, and does not make any rendering calls. As such, any
implementing subclass should insure to override this method call it with
super and then call the rendering specific code.
onFrameChange
in interface Camera
onFrameChange
in class AbstractCamera
protected void doFrustumChange()
Camera.onFrustumChange()
protected void doViewPortChange()
Camera.onViewPortChange()
protected void doFrameChange()
Camera.onFrameChange()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |