|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object glapp.GLCam
public class GLCam
Change the position and orientation of a GLCamera based on input keys. This class moves the camera according to how much time has elapsed, so will produce consistent response to input, regardless of processor speed. To use:
GLCamera.java
Field Summary | |
---|---|
GLCamera |
camera
|
float |
camSpeedR
|
float |
camSpeedXZ
|
float |
camSpeedY
|
Constructor Summary | |
---|---|
GLCam()
Create a GLCameraMover. |
|
GLCam(GLCamera cam)
Create a GLCameraMover with the camera that it will be moving. |
Method Summary | |
---|---|
void |
handleArrowKeysOnly(float seconds)
Adjust the Camera position based on keyboard arrow key input. |
void |
handleNavKeys(float seconds)
Adjust the Camera position based on keyboard arrow key input. |
void |
handleNavKeysViewOnly(float seconds)
Adjust the Camera view direction based on key press events. |
void |
render()
Tell camera to adjust modelview matrix to new view position and orientation. |
void |
setCamera(GLCamera cam)
Create a GLCameraMover with the camera that it will be moving. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public float camSpeedR
public float camSpeedXZ
public float camSpeedY
public GLCamera camera
Constructor Detail |
---|
public GLCam(GLCamera cam)
cam
- public GLCam()
cam
- Method Detail |
---|
public void setCamera(GLCamera cam)
cam
- public void render()
public void handleNavKeys(float seconds)
seconds
- seconds elapsed since last frame was drawnpublic void handleArrowKeysOnly(float seconds)
seconds
- seconds elapsed since last frame was drawnpublic void handleNavKeysViewOnly(float seconds)
seconds
- seconds elapsed since last frame was drawn
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |