dzzd
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 getFPS()
          Gets the current FPS.
 IRender3D getRender3D()
          Gets the current render3D for this Scene3DRender.
 IScene3D getScene3D()
          Gets the current scene3D for this Scene3DRender.
 void pause()
          Pause this Scene3DRender thread.
 void setAutoPlayAnimator(boolean flag)
          Sets autoPlayAnimator flag.
 void setMaxFPS(int maxFPS)
          Sets the maximum FPS.
 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.

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.


getFPS

public int getFPS()
Gets the current 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.

setMaxFPS

public void setMaxFPS(int maxFPS)
Sets the maximum 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.

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