gzz.client
Interface AbstractUpdateManager.Window

All Known Implementing Classes:
Screen
Enclosing interface:
AbstractUpdateManager

public static interface AbstractUpdateManager.Window

A window animation is performed in. It is a mutable pair of states: (start, end). The end state doesn't initially exist.


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.
 boolean hasEndState()
          Whether the endstate has been generated.
 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)
          Same as renderAnim(0, lod), except that it's not allowed to crash even if the end state doesn't exist.
 

Method Detail

generateEndState

public 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. If false is returned, lower level of detail would have produced a better result.


animUseful

public boolean animUseful()

renderAnim

public void renderAnim(float fract,
                       float lod,
                       boolean showFinal)
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.

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.

changeStartState

public 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). 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.


renderStill

public void renderStill(float lod)
Same as renderAnim(0, lod), except that it's not allowed to crash even if the end state doesn't exist. lod may be interpreted differently to show things that are not important when animating (such as connections).


hasEndState

public boolean hasEndState()
Whether the endstate has been generated.


endAnimation

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