|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdata.Camera
public class Camera
Camera in OpenGL-context
Constructor Summary | |
---|---|
Camera(double[] pos,
double pan,
double tilt,
double zoom,
double speed,
javax.media.opengl.GL gl)
initializes Camera parameters |
Method Summary | |
---|---|
void |
addPan(double pan)
Pans the camera when update(long deltaTime) is called |
void |
addTilt(double tilt)
Tilts the camera when update(long deltaTime) is called |
void |
addZoom(double zoom)
Tilts the camera when update(long deltaTime) is called |
double[] |
getPos()
returns the camera position in world coordinates |
double |
getZoom()
returns the zoom factor of the camera |
void |
move(float x,
float y,
float z)
simply moves the camera instantly plus the given vector |
void |
moveBackward(boolean b)
Moves the camera backward when update(long deltaTime) is called |
void |
moveDown(boolean b)
Moves the camera down when update(long deltaTime) is called |
void |
moveForward(boolean b)
Moves the camera forward when update(long deltaTime) is called |
void |
moveLeft(boolean b)
Moves the camera left when update(long deltaTime) is called |
void |
moveRight(boolean b)
Moves the camera right when update(long deltaTime) is called |
void |
moveUp(boolean b)
Moves the camera up when update(long deltaTime) is called |
void |
transformIntoCameraSpace()
transforms the OpenGL objects into camera space. |
void |
update(long deltaTime)
updates the camera position and orientation |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Camera(double[] pos, double pan, double tilt, double zoom, double speed, javax.media.opengl.GL gl)
pos
- absolute positionpan
- pan of the cameratilt
- tilt of the cameraspeed
- movement speed of the cameragl
- GL-contextMethod Detail |
---|
public void moveUp(boolean b)
update(long deltaTime)
is called
b
- public void moveDown(boolean b)
update(long deltaTime)
is called
b
- public void moveLeft(boolean b)
update(long deltaTime)
is called
b
- public void moveRight(boolean b)
update(long deltaTime)
is called
b
- public void moveForward(boolean b)
update(long deltaTime)
is called
b
- public void moveBackward(boolean b)
update(long deltaTime)
is called
b
- public void addPan(double pan)
update(long deltaTime)
is called
pan
- pan to addpublic void move(float x, float y, float z)
x
- y
- public double getZoom()
public double[] getPos()
public void addTilt(double tilt)
update(long deltaTime)
is called
tilt
- tilt to addpublic void addZoom(double zoom)
update(long deltaTime)
is called
zoom
- public void update(long deltaTime)
deltaTime
- passed time since update(long deltaTime)
was called the last timepublic void transformIntoCameraSpace()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |