|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IWorld
An interface which provides methods to let the user manipulate objects in the canvas.
Method Summary | |
---|---|
void |
draw(ICanvas c)
With this method the user can draw on the canvas. |
void |
onGyroscopeEvent(float mGyroX,
float mGyroY,
float mGyroZ)
Performs an action when tilting the device by using the gyroscope. |
void |
onInit(IInit init)
With this method the user establish the initial values at bigBang. |
void |
onKeyEvent(int keyCode)
Performs an action when pressing a key on the keyboard. |
void |
onOrientationEvent(float mOriX,
float mOriY,
float mOriZ)
Performs an action when tilting the device by using the gyroscope. |
void |
onTick()
Performs an action on ever tick of the world's clock. |
void |
onTiltEvent(float mAccelX,
float mAccelY,
float mAccelZ)
Performs an action when tilting the device by using the accelerometer. |
void |
onTouchEvent(int x,
int y)
Performs an action when touching the screen of the device. |
Method Detail |
---|
void onTick()
void onTouchEvent(int x, int y)
x
- coordinate of the touched area.y
- coordinate of the touched area.void onTiltEvent(float mAccelX, float mAccelY, float mAccelZ)
mAccelX
- Acceleration minus Gx on the x-axis.mAccelY
- Acceleration minus Gy on the y-axis.mAccelZ
- Acceleration minus Gz on the z-axis. Note: Get more
information on Android's Sensorsvoid onGyroscopeEvent(float mGyroX, float mGyroY, float mGyroZ)
mGyroX
- Angular speed around the x-axis.mGyroY
- Angular speed around the y-axis.mGyroZ
- Angular speed around the z-axis. Note: Get more information on
Android's Sensorsvoid onKeyEvent(int keyCode)
keyCode
- The key code that represents a key. Note: Get more information
on KeyEventsvoid onOrientationEvent(float mOriX, float mOriY, float mOriZ)
mOriX
- Azimuth, angle between the magnetic north direction and the y-axis, around the z-axis (0 to 359). 0=North, 90=East, 180=South, 270=West.mOriY
- Pitch, rotation around x-axis (-180 to 180), with positive values when the z-axis moves toward the y-axis.mOriZ
- Roll, rotation around y-axis (-90 to 90), with positive values when the x-axis moves toward the z-axis.
Note: Get more information on Android's Sensorsvoid draw(ICanvas c)
c
- Canvas object to insert the figures to draw in.void onInit(IInit init)
init
- object where we can establish the initial values.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |