org.xith3d.loop
Class InputAdapterRenderLoop

java.lang.Object
  extended by org.xith3d.loop.UpdatingThread
      extended by org.xith3d.loop.RenderLoop
          extended by org.xith3d.loop.InputAdapterRenderLoop
All Implemented Interfaces:
java.lang.Runnable, org.jagatoo.input.listeners.ControllerListener, org.jagatoo.input.listeners.InputListener, org.jagatoo.input.listeners.InputStateListener, org.jagatoo.input.listeners.KeyboardListener, org.jagatoo.input.listeners.MouseListener, org.jagatoo.input.listeners.MouseStopListener, org.jagatoo.input.managers.SimpleInputActionListener, GameTimeHost, RenderLoopController, Updatable, Updater

public class InputAdapterRenderLoop
extends RenderLoop
implements org.jagatoo.input.listeners.InputListener, org.jagatoo.input.listeners.InputStateListener, org.jagatoo.input.managers.SimpleInputActionListener

This loop renders the scene in the same or a separate Thread.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.xith3d.loop.RenderLoop
RenderLoop.RunMode, RenderLoop.StopOperation
 
Nested classes/interfaces inherited from class org.xith3d.loop.UpdatingThread
UpdatingThread.TimingMode
 
Field Summary
 
Fields inherited from class org.xith3d.loop.RenderLoop
PAUSE_RENDERING
 
Fields inherited from class org.xith3d.loop.UpdatingThread
PAUSE_NONE, PAUSE_TOTAL
 
Constructor Summary
InputAdapterRenderLoop()
          Creates a new instance.
InputAdapterRenderLoop(float maxFPS)
          Creates a new instance.
InputAdapterRenderLoop(Xith3DEnvironment x3dEnv)
          Creates a new instance.
InputAdapterRenderLoop(Xith3DEnvironment x3dEnv, float maxFPS)
          Creates a new instance.
 
Method Summary
protected  void destroy()
          This method is invoked, when the RenderLoop stopped and the StopOperation is set to DESTROY or DESTROY_AND_EXIT.
 long getMouseStopDelay()
          
 void onActionInvoked(java.lang.Object action, int delta, int state)
          
 void onControllerAxisChanged(org.jagatoo.input.events.ControllerAxisChangedEvent e, org.jagatoo.input.devices.components.ControllerAxis axis, float axisDelta)
          
 void onControllerButtonPressed(org.jagatoo.input.events.ControllerButtonPressedEvent e, org.jagatoo.input.devices.components.ControllerButton button)
          
 void onControllerButtonReleased(org.jagatoo.input.events.ControllerButtonReleasedEvent e, org.jagatoo.input.devices.components.ControllerButton button)
          
 void onControllerButtonStateChanged(org.jagatoo.input.events.ControllerButtonEvent e, org.jagatoo.input.devices.components.ControllerButton button, boolean state)
          
 void onInputStateChanged(org.jagatoo.input.events.InputEvent e, org.jagatoo.input.devices.components.DeviceComponent comp, int delta, int state)
          
 void onKeyPressed(org.jagatoo.input.events.KeyPressedEvent e, org.jagatoo.input.devices.components.Key key)
          
 void onKeyReleased(org.jagatoo.input.events.KeyReleasedEvent e, org.jagatoo.input.devices.components.Key key)
          
 void onKeyStateChanged(org.jagatoo.input.events.KeyStateEvent e, org.jagatoo.input.devices.components.Key key, boolean state)
          
 void onKeyTyped(org.jagatoo.input.events.KeyTypedEvent e, char keyChar)
          
 void onMouseButtonClicked(org.jagatoo.input.events.MouseButtonClickedEvent e, org.jagatoo.input.devices.components.MouseButton button, int clickCount)
          
 void onMouseButtonPressed(org.jagatoo.input.events.MouseButtonPressedEvent e, org.jagatoo.input.devices.components.MouseButton button)
          
 void onMouseButtonReleased(org.jagatoo.input.events.MouseButtonReleasedEvent e, org.jagatoo.input.devices.components.MouseButton button)
          
 void onMouseButtonStateChanged(org.jagatoo.input.events.MouseButtonEvent e, org.jagatoo.input.devices.components.MouseButton button, boolean state)
          
 void onMouseMoved(org.jagatoo.input.events.MouseMovedEvent e, int x, int y, int dx, int dy)
          
 void onMouseStopped(org.jagatoo.input.events.MouseStoppedEvent e, int x, int y)
          
 void onMouseWheelMoved(org.jagatoo.input.events.MouseWheelEvent e, int wheelDelta)
          
 
Methods inherited from class org.xith3d.loop.RenderLoop
addFPSListener, addRenderLoopListener, addUpdatable, begin, begin, begin, begin, destroyAndExit, end, exit, getAnimator, getFPS, getFPSCalcInterval, getMaxFPS, getOperationScheduler, getRunMode, getStopOperation, getThread, getTotalAverageFPS, getUpdater, getXith3DEnvironment, loop, loopIteration, nextFrame, nextIteration, onFPSCountIntervalHit, onRenderLoopPaused, onRenderLoopResumed, onRenderLoopStarted, onRenderLoopStopped, pauseRendering, prepareNextFrame, removeFPSListener, removeRenderLoopListener, removeUpdatable, renderNextFrame, resumeRendering, run, setFPSCalcInterval, setMaxFPS, setOperationScheduler, setStopOperation, setUpdater, setXith3DEnvironment, update
 
Methods inherited from class org.xith3d.loop.UpdatingThread
begin, getFPSLimiter, getGameMicroTime, getGameMilliTime, getGameNanoTime, getGameTime, getIterationsCount, getLastFrameTime, getLastNanoFrameTime, getMinIterationTime, getPauseMode, getTimer, getTimingMode, isRunning, isStopping, setFPSLimiter, setMinIterationTime, setPauseMode, setTimer, setTimingMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputAdapterRenderLoop

public InputAdapterRenderLoop(Xith3DEnvironment x3dEnv,
                              float maxFPS)
Creates a new instance.

Parameters:
x3dEnv - the Xith3DEnvironment to be linked with this RenderLoop.
maxFPS - the maximum FPS to render at

InputAdapterRenderLoop

public InputAdapterRenderLoop(float maxFPS)
Creates a new instance.

Parameters:
maxFPS - the maximum FPS to render at

InputAdapterRenderLoop

public InputAdapterRenderLoop(Xith3DEnvironment x3dEnv)
Creates a new instance.

Parameters:
x3dEnv - the Xith3DEnvironment to be linked with this RenderLoop.

InputAdapterRenderLoop

public InputAdapterRenderLoop()
Creates a new instance.

Method Detail

onKeyPressed

public void onKeyPressed(org.jagatoo.input.events.KeyPressedEvent e,
                         org.jagatoo.input.devices.components.Key key)

Specified by:
onKeyPressed in interface org.jagatoo.input.listeners.KeyboardListener

onKeyReleased

public void onKeyReleased(org.jagatoo.input.events.KeyReleasedEvent e,
                          org.jagatoo.input.devices.components.Key key)

Specified by:
onKeyReleased in interface org.jagatoo.input.listeners.KeyboardListener

onKeyStateChanged

public void onKeyStateChanged(org.jagatoo.input.events.KeyStateEvent e,
                              org.jagatoo.input.devices.components.Key key,
                              boolean state)

Specified by:
onKeyStateChanged in interface org.jagatoo.input.listeners.KeyboardListener

onKeyTyped

public void onKeyTyped(org.jagatoo.input.events.KeyTypedEvent e,
                       char keyChar)

Specified by:
onKeyTyped in interface org.jagatoo.input.listeners.KeyboardListener

onMouseButtonPressed

public void onMouseButtonPressed(org.jagatoo.input.events.MouseButtonPressedEvent e,
                                 org.jagatoo.input.devices.components.MouseButton button)

Specified by:
onMouseButtonPressed in interface org.jagatoo.input.listeners.MouseListener

onMouseButtonReleased

public void onMouseButtonReleased(org.jagatoo.input.events.MouseButtonReleasedEvent e,
                                  org.jagatoo.input.devices.components.MouseButton button)

Specified by:
onMouseButtonReleased in interface org.jagatoo.input.listeners.MouseListener

onMouseButtonClicked

public void onMouseButtonClicked(org.jagatoo.input.events.MouseButtonClickedEvent e,
                                 org.jagatoo.input.devices.components.MouseButton button,
                                 int clickCount)

Specified by:
onMouseButtonClicked in interface org.jagatoo.input.listeners.MouseListener

onMouseButtonStateChanged

public void onMouseButtonStateChanged(org.jagatoo.input.events.MouseButtonEvent e,
                                      org.jagatoo.input.devices.components.MouseButton button,
                                      boolean state)

Specified by:
onMouseButtonStateChanged in interface org.jagatoo.input.listeners.MouseListener

onMouseMoved

public void onMouseMoved(org.jagatoo.input.events.MouseMovedEvent e,
                         int x,
                         int y,
                         int dx,
                         int dy)

Specified by:
onMouseMoved in interface org.jagatoo.input.listeners.MouseListener

onMouseWheelMoved

public void onMouseWheelMoved(org.jagatoo.input.events.MouseWheelEvent e,
                              int wheelDelta)

Specified by:
onMouseWheelMoved in interface org.jagatoo.input.listeners.MouseListener

getMouseStopDelay

public long getMouseStopDelay()

Specified by:
getMouseStopDelay in interface org.jagatoo.input.listeners.MouseStopListener

onMouseStopped

public void onMouseStopped(org.jagatoo.input.events.MouseStoppedEvent e,
                           int x,
                           int y)

Specified by:
onMouseStopped in interface org.jagatoo.input.listeners.MouseStopListener

onControllerAxisChanged

public void onControllerAxisChanged(org.jagatoo.input.events.ControllerAxisChangedEvent e,
                                    org.jagatoo.input.devices.components.ControllerAxis axis,
                                    float axisDelta)

Specified by:
onControllerAxisChanged in interface org.jagatoo.input.listeners.ControllerListener

onControllerButtonPressed

public void onControllerButtonPressed(org.jagatoo.input.events.ControllerButtonPressedEvent e,
                                      org.jagatoo.input.devices.components.ControllerButton button)

Specified by:
onControllerButtonPressed in interface org.jagatoo.input.listeners.ControllerListener

onControllerButtonReleased

public void onControllerButtonReleased(org.jagatoo.input.events.ControllerButtonReleasedEvent e,
                                       org.jagatoo.input.devices.components.ControllerButton button)

Specified by:
onControllerButtonReleased in interface org.jagatoo.input.listeners.ControllerListener

onControllerButtonStateChanged

public void onControllerButtonStateChanged(org.jagatoo.input.events.ControllerButtonEvent e,
                                           org.jagatoo.input.devices.components.ControllerButton button,
                                           boolean state)

Specified by:
onControllerButtonStateChanged in interface org.jagatoo.input.listeners.ControllerListener

onInputStateChanged

public void onInputStateChanged(org.jagatoo.input.events.InputEvent e,
                                org.jagatoo.input.devices.components.DeviceComponent comp,
                                int delta,
                                int state)

Specified by:
onInputStateChanged in interface org.jagatoo.input.listeners.InputStateListener

onActionInvoked

public void onActionInvoked(java.lang.Object action,
                            int delta,
                            int state)

Specified by:
onActionInvoked in interface org.jagatoo.input.managers.SimpleInputActionListener

destroy

protected void destroy()
Description copied from class: RenderLoop
This method is invoked, when the RenderLoop stopped and the StopOperation is set to DESTROY or DESTROY_AND_EXIT.

It calls destroy() on any registered RenderEngine and sets any MouseDevice registered to the InputManager to non-exclusive.

Don't invoke this method directly except in a super call. Use end() instead.

Overrides:
destroy in class RenderLoop
See Also:
RenderLoop.StopOperation, RenderLoop.setStopOperation(StopOperation), RenderLoop.end()