Deprecated
as a consequence of Applet being deprecated. See corresponding docs for further information.
| Modifier and Type | Field and Description |
|---|---|
| private float | |
| pack-priv Canvas | display_parent
The Canvas where the LWJGL Display is added |
| pack-priv Thread | gameThread
Thread which runs the main game loop |
| private int | |
| private int | |
| private int | |
| pack-priv boolean | |
| private boolean | |
| private int | |
| private int | |
| pack-priv boolean | running
is the game loop running |
| private float | view_rotx
variables used to rotate the view |
| private float | |
| private float |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | destroy()
Overrides java. |
| public void | |
| public void | |
| private void | gear(float
radius of hole at center inner_radius, float radius at center of teeth outer_radius, float width of gear width, int number of teeth teeth, float depth of tooth tooth_depth)Draw a gear wheel. |
| public void | init()
Overrides java. |
| protected void | |
| public void | start()
Overrides java. |
| public void | startLWJGL()
Once the Canvas is created its add notify method will call this method to start the LWJGL Display and game loop in another thread. |
| public void | stop()
Overrides java. |
| private void |
| angle | back to summary |
|---|---|
| private float angle | |
| display_parent | back to summary |
|---|---|
| pack-priv Canvas display_parent The Canvas where the LWJGL Display is added | |
| gameThread | back to summary |
|---|---|
| pack-priv Thread gameThread Thread which runs the main game loop | |
| gear1 | back to summary |
|---|---|
| private int gear1 | |
| gear2 | back to summary |
|---|---|
| private int gear2 | |
| gear3 | back to summary |
|---|---|
| private int gear3 | |
| keyDown | back to summary |
|---|---|
| pack-priv boolean keyDown | |
| mouseButtonDown | back to summary |
|---|---|
| private boolean mouseButtonDown | |
| prevMouseX | back to summary |
|---|---|
| private int prevMouseX | |
| prevMouseY | back to summary |
|---|---|
| private int prevMouseY | |
| running | back to summary |
|---|---|
| pack-priv boolean running is the game loop running | |
| view_rotx | back to summary |
|---|---|
| private float view_rotx variables used to rotate the view | |
| view_roty | back to summary |
|---|---|
| private float view_roty | |
| view_rotz | back to summary |
|---|---|
| private float view_rotz | |
| GearsApplet | back to summary |
|---|---|
| public GearsApplet() | |
| destroy | back to summary |
|---|---|
| public void destroy() Overrides java. Applet Destroy method will remove the canvas, before canvas is destroyed it will notify stopLWJGL() to stop main game loop and to destroy the Display | |
| drawLoop | back to summary |
|---|---|
| public void drawLoop() | |
| gameLoop | back to summary |
|---|---|
| public void gameLoop() | |
| gear | back to summary |
|---|---|
| private void gear(float inner_radius, float outer_radius, float width, int teeth, float tooth_depth) Draw a gear wheel. You'll probably want to call this function when building a display list since we do a lot of trig here.
| |
| init | back to summary |
|---|---|
| public void init() Overrides java. initialise applet by adding a canvas to it, this canvas will start the LWJGL Display and game loop in another thread. It will also stop the game loop and destroy the display on canvas removal when applet is destroyed. | |
| initGL | back to summary |
|---|---|
| protected void initGL() | |
| start | back to summary |
|---|---|
| public void start() Overrides java. Doc from java. Called by the browser or applet viewer to inform this applet that it
should start its execution. It is called after the
A subclass of Note some methods, such as
The implementation of this method provided by the | |
| startLWJGL | back to summary |
|---|---|
| public void startLWJGL() Once the Canvas is created its add notify method will call this method to start the LWJGL Display and game loop in another thread. | |
| stop | back to summary |
|---|---|
| public void stop() Overrides java. Doc from java. Called by the browser or applet viewer to inform this applet that it should stop its execution. It is called when the Web page that contains this applet has been replaced by another page, and also just before the applet is to be destroyed.
A subclass of
The implementation of this method provided by the | |
| stopLWJGL | back to summary |
|---|---|
| private void stopLWJGL() Tell game loop to stop running, after which the LWJGL Display will be destoryed. The main thread will wait for the Display.destroy() to complete | |