|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This interface defines callback functions which are used by the engine to communicate with the application. Any application using the engine has to implement this interface.
TODO: Nothing
| Method Summary | |
java.awt.Component |
engineComponentRequest()
This function is called by the engine to request the component it is running in. |
void |
engineInitCallback(yrqEngine a_engine)
This callback is used by the engine to notify applications that loading of low-level ressources has been done and all internal initalisation has finished. |
void |
engineInputCallback(yrqEngine a_engine,
java.awt.AWTEvent a_evt)
This callback is used by the engine to inform the application that a mouse or keyboard event has occurred. |
void |
engineLoadCallback(yrqEngine a_engine)
This callback is used by the engine to notify applications that low-level ressources like textures, sounds etc. should be loaded into the repository. |
void |
engineRenderCallback(yrqEngine a_engine,
java.awt.Graphics2D a_gfx)
This callback is used by the engine after every 3D frame rendering to allow for the application to do 2D overlay drawing. |
void |
engineUpdateCallback(yrqEngine a_engine)
This callback is used by the engine to request updates from the application. |
| Method Detail |
public java.awt.Component engineComponentRequest()
Applications should pass back a container component into which the engine should render, e.g. java.awt.frame for an engine instance running in its own window or java.awt.panel if the engine shares the screen with other components in a user interface. Note: The use of swing components like jpanel is not recommended.
public void engineInitCallback(yrqEngine a_engine)
Applications working with one scene, which do not have the need for recreation of objects at runtime, could create all scene-relevant objects here and implement interactivity in the update callback.
a_engine - Instance of yrqEngine responsible for the callback
public void engineInputCallback(yrqEngine a_engine,
java.awt.AWTEvent a_evt)
a_engine - Instance of yrqEngine responsible for the callbacka_evt - The event that ocurredpublic void engineLoadCallback(yrqEngine a_engine)
a_engine - Instance of yrqEngine responsible for the callback
public void engineRenderCallback(yrqEngine a_engine,
java.awt.Graphics2D a_gfx)
a_engine - Instance of yrqEngine responsible for the callbacka_gfx - The graphics context onto which to renderpublic void engineUpdateCallback(yrqEngine a_engine)
Applications can clear all objects and add a totally new set of objects here if a complete scene change is necessary.
Calls to update occur exactly every 1/50 second by default, or in the intervals specified by a call to the setUpdateInterval method of the engine, so animation sequences updated by this call can use simple counters for updating and still be synchronous.
a_engine - Instance of yrqEngine responsible for the callback
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||