|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ericsson.tic.vi.Camera
public class Camera
Keeps track of all common camera related variables.
| Field Summary | |
|---|---|
float |
camX
Camera coordinate. |
float |
camY
Camera coordinate. |
float |
camZ
Camera coordinate. |
boolean |
dragging
A flag used to determine wheter the mouse is dragging or not. |
private int |
id
The view id for this camera. |
float |
lookX
Camera look at coordinate. |
float |
lookY
Camera look at coordinate. |
float |
lookZ
Camera look at coordinate. |
int |
mouseX
Mouse coordinate given by mouse events. |
int |
mouseY
Mouse coordinate given by mouse events. |
int |
moveCounter
A counter which is used to keep track of inertia. |
private ViewPanel |
pv
The parent panel of this camera. |
float |
rotAngle
Angle which determines how much the world/globe should be rotated relative to the camera |
float |
speedX
The motion vector calculated by mouse events. |
float |
speedY
The motion vector calculated by mouse events. |
private float |
tilt
This is the tilt of the lookAt vector. |
float |
tiltAngle
Angle which determines the tilt angle (around relative camera x axis). |
boolean |
tilting
Specifies if we are currently in tilting mode. |
float |
upX
The Camera "up" vector coordinate. |
float |
upY
The Camera "up" vector coordinate. |
float |
upZ
The Camera "up" vector coordinate. |
float |
zoom
The zoom distance of the camera. |
| Constructor Summary | |
|---|---|
Camera(int id,
ViewPanel parentView)
A constructor which sets up the camera. |
|
| Method Summary | |
|---|---|
void |
mDragged(int x,
int y)
To be called when the mouse is dragged. |
void |
mPressed(int x,
int y)
To be called when the mouse is pressed. |
void |
mReleased()
To be called when the mouse is pressed. |
void |
mWheelMoved(int w)
To be called when the mousewheel is scrolled. |
void |
tilt(float t)
Updates the tilt of the tilt of the lookAt vector. |
void |
update()
Updates the camera. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int id
public boolean tilting
public boolean dragging
public float camX
public float camY
public float camZ
public float lookX
public float lookY
public float lookZ
public float upX
public float upY
public float upZ
public float zoom
public int mouseX
public int mouseY
public float speedX
public float speedY
public float rotAngle
public float tiltAngle
public int moveCounter
private ViewPanel pv
private float tilt
| Constructor Detail |
|---|
public Camera(int id,
ViewPanel parentView)
id - The view id for this camera.parentView - The ViewPanel which this camera belongs to.| Method Detail |
|---|
public void mPressed(int x,
int y)
x - Mouse coordinate.y - Mouse coordinate.public void tilt(float t)
t - Specifies the magnitude and direction of the tilt.public void mReleased()
public void mWheelMoved(int w)
w - The amount the wheel was scrolled.
public void mDragged(int x,
int y)
x - Mouse coordinate.y - Mouse coordinate.public void update()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||