net.dzzd.access
Interface IScene3DRender


public interface IScene3DRender

Used for accessing to a Scene3DRender.

Since:
1.0
Version:
1.0
Author:
Bruno Augier Copyright Bruno Augier 2005

Method Summary
 boolean getAutoPlayAnimator()
          Gets autoPlayAnimator flag.
 int getFPS100()
          Gets the current average FPS.
 long getFrameTime()
           
 IRender3D getRender3D()
          Gets the current render3D for this Scene3DRender.
 IScene3D getScene3D()
          Gets the current scene3D for this Scene3DRender.
 long getTime()
          Gets time for current frame
this method will intend to resolve time for the current frame
using advanced time algorithm even with an non-accurate timer
as System.currentTimeMillis();
 void pause()
          Pause this Scene3DRender thread.
 void render()
          Render a single frame while rendering the current IScene3DRenderCallBack events are called
 void setAutoPlayAnimator(boolean flag)
          Sets autoPlayAnimator flag.
 void setMaxFPS100(int maxFPS)
          Sets the maximum average FPS.
 void setScene3D(IScene3D scene)
          Immediatly replace the current Scene3D
 void setScene3DRenderCallBack(IScene3DRenderCallBack iScene3DRenderCallBack)
          Sets a new Scene3DRenderCallBack for this Scene3DRender.
 void start()
          Start this Scene3DRender thread.
 void stop()
          Stop this Scene3DRender thread.
 void switchRender3D(java.lang.String implementationName)
          Switch the current render3D implementation to the given one.
 

Method Detail

getScene3D

public IScene3D getScene3D()
Gets the current scene3D for this Scene3DRender.

Returns:
current scene3D or null if no scene3D has been set.

getRender3D

public IRender3D getRender3D()
Gets the current render3D for this Scene3DRender.

Returns:
current render3D or null if no render3D has been set.

setScene3DRenderCallBack

public void setScene3DRenderCallBack(IScene3DRenderCallBack iScene3DRenderCallBack)
Sets a new Scene3DRenderCallBack for this Scene3DRender.

Parameters:
iScene3DRenderCallBack - new event handler for this Scene3DRender, pass null to disable callback.

render

public void render()
Render a single frame while rendering the current IScene3DRenderCallBack events are called


start

public void start()
Start this Scene3DRender thread. Once started the current scene3D will be rendered using the current render3D and will call the call back handler events methods when needed.


stop

public void stop()
Stop this Scene3DRender thread.


pause

public void pause()
Pause this Scene3DRender thread.


getFPS100

public int getFPS100()
Gets the current average FPS.

Returns:
current FPS, the returned value is the current frame rate per seconde multiplied by 100 25,56 fps will be return as 2556.

getTime

public long getTime()
Gets time for current frame
this method will intend to resolve time for the current frame
using advanced time algorithm even with an non-accurate timer
as System.currentTimeMillis();

Returns:
time expressed in ms for the current frame

getFrameTime

public long getFrameTime()

setMaxFPS100

public void setMaxFPS100(int maxFPS)
Sets the maximum average FPS.

Parameters:
maxFPS - maximum desired FPS, the passed value must be the frame rate per seconde multiplied by 100 25,56 fps will be return as 2556.

setScene3D

public void setScene3D(IScene3D scene)
Immediatly replace the current Scene3D

Parameters:
scene - scene that will replace current one.

switchRender3D

public void switchRender3D(java.lang.String implementationName)
Switch the current render3D implementation to the given one.

This method will first try to instanciate the given render3D using the specified implmentation name, and the previous render3D size.
if render3D successfully instanciated the previous render3D will be removed from its parent component and replaced with the newly render3D.
if render3D not successfully instanciated no change will be preformed.


render3D switch is asyncronous and will be performed at the begining of next frame.

Parameters:
implementationName - new render3D implementation name

setAutoPlayAnimator

public void setAutoPlayAnimator(boolean flag)
Sets autoPlayAnimator flag.

If autoPlayAnimator is set to true than after each render3DStart event
all SceneObject using an animator will be updated with its animator
default autoPlayAnimator value is true

Parameters:
flag - new value for autoPlayAnimator

getAutoPlayAnimator

public boolean getAutoPlayAnimator()
Gets autoPlayAnimator flag.

If autoPlayAnimator is set to true than after each render3DStart event
all SceneObject using an animator will be updated with its animator
default autoPlayAnimator value is true

Returns:
current value for autoPlayAnimator