gzz.client
Class Screen

java.lang.Object
  |
  +--gzz.client.Screen
All Implemented Interfaces:
AbstractUpdateManager.Window

public class Screen
extends java.lang.Object
implements AbstractUpdateManager.Window

An aggregate which defines a user-visible window and its contents. The View+Controller part of MVC.


Field Summary
 Binder binder
          The input handler (controller).
static boolean dbg
           
protected  float latestFract
           
protected  float latestLod
           
protected  VobScene next
           
protected  VobScene prev
           
static java.lang.String rcsid
           
 Shower shower
          The view.
 GraphicsAPI.Window window
          The window system -level window.
 
Constructor Summary
Screen(GraphicsAPI.Window window, Binder binder, Shower shower)
           
 
Method Summary
 boolean animUseful()
           
 void changeStartState(float fract)
          After this renderAnim(0, ...) would do the same as renderAnim(fract, ...) did before the call, if the end state wasn't destroyed (which it is).
 void endAnimation()
          Same as changeStartState(1), except that the end state doesn't exist afterwards.
 boolean generateEndState(int millis, float lod)
          Creates an end state, and returns true iff the time given for generation was sufficient for the given level of detail.
 VobScene getVobSceneForEvents()
           
 boolean hasEndState()
          Whether the endstate has been generated.
 void printScreen()
           
 void renderAnim(float fract, float lod, boolean showFinal)
          Render state between start and end (interpolation), with the specified level of detail.
 void renderStill(float lod)
          Renders and display current view state on screen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rcsid

public static final java.lang.String rcsid
See Also:
Constant Field Values

dbg

public static boolean dbg

window

public final GraphicsAPI.Window window
The window system -level window.


binder

public final Binder binder
The input handler (controller).


shower

public final Shower shower
The view.


prev

protected VobScene prev

next

protected VobScene next

latestFract

protected float latestFract

latestLod

protected float latestLod
Constructor Detail

Screen

public Screen(GraphicsAPI.Window window,
              Binder binder,
              Shower shower)
Method Detail

printScreen

public void printScreen()

hasEndState

public boolean hasEndState()
Description copied from interface: AbstractUpdateManager.Window
Whether the endstate has been generated.

Specified by:
hasEndState in interface AbstractUpdateManager.Window

animUseful

public boolean animUseful()
Specified by:
animUseful in interface AbstractUpdateManager.Window

changeStartState

public void changeStartState(float fract)
Description copied from interface: AbstractUpdateManager.Window
After this renderAnim(0, ...) would do the same as renderAnim(fract, ...) did before the call, if the end state wasn't destroyed (which it is). Used when the end state changes during animation, so that the animation continues from the state it reached, instead of jumping. If the end state doesn't exist, may crash.

Specified by:
changeStartState in interface AbstractUpdateManager.Window

endAnimation

public void endAnimation()
Description copied from interface: AbstractUpdateManager.Window
Same as changeStartState(1), except that the end state doesn't exist afterwards. If there is no end state, must be a no-op.

Specified by:
endAnimation in interface AbstractUpdateManager.Window

generateEndState

public boolean generateEndState(int millis,
                                float lod)
Description copied from interface: AbstractUpdateManager.Window
Creates an end state, and returns true iff the time given for generation was sufficient for the given level of detail. If false is returned, lower level of detail would have produced a better result.

Specified by:
generateEndState in interface AbstractUpdateManager.Window

renderStill

public void renderStill(float lod)
Renders and display current view state on screen

Specified by:
renderStill in interface AbstractUpdateManager.Window

renderAnim

public void renderAnim(float fract,
                       float lod,
                       boolean showFinal)
Description copied from interface: AbstractUpdateManager.Window
Render state between start and end (interpolation), with the specified level of detail. fract is in [0, 1], and so is lod. 0.5 should be assumed to be the default lod. If the end state doesn't exist, may crash.

Specified by:
renderAnim in interface AbstractUpdateManager.Window
Parameters:
showFinal - Whether to show (unanimated) the parts of the final view that are not animated. This can be used to make the effect of going slightly too far - coming back faster, not making the user wait for the very end of the animation to see everything.

getVobSceneForEvents

public VobScene getVobSceneForEvents()