net.dzzd.access
Interface IScene

All Known Subinterfaces:
IScene2D, IScene3D

public interface IScene


Method Summary
 void addMaterial(IMaterial m)
          Add the given Material to this scene.
 void addSceneObject(ISceneObject object)
          Add the given SceneObject to this scene.
 void addSceneObjects(ISceneObject[] objects)
          Add multiple SceneObject to this scene.
 void addTexture(ITexture t)
          Add the given Texture to this scene.
 IMaterial getMaterialById(int id)
          Gets the Material having the given id from this scene.
 IMaterial getMaterialByName(java.lang.String name)
          Gets the Material having the given name from this scene.
 IMonitoredSceneObject getMonitoredSceneObject(int idx)
          Gets a MonitoredSceneObject from the monitored object stack of this scene.
 int getNbMaterial()
          Gets the number of IMaterial for this scene.
 int getNbMonitoredSceneObject()
          Gets total number of SceneObject currently monitored.
 int getNbSceneObject()
          Gets the number of ISceneObject for this scene.
 int getNbTexture()
          Gets the number of ITexture for this scene.
 ITexture getTextureById(int id)
          Gets the Texture having the given id from this scene.
 ITexture getTextureByName(java.lang.String name)
          Gets the Texture having the given name from this scene.
 void removeMaterialById(int id)
          Remove the Material having the given id from this scene.
 void removeSceneObject(ISceneObject object)
          Remove the given Scene3DObject from this scene.
 void removeTextureById(int id)
          Remove the Texture having the given id from this scene.
 void setSceneBufferSize(int maxMaterial, int maxTexture)
          Sets this scene internal buffer size.
 void startMonitorSceneObject(IMonitoredSceneObject obj)
          Sets an object to monitor into the monitored object stack of this scene.
 void stopMonitorSceneObject(int idx)
          Remove an object from the monitored object stack of this scene.
 void updateMonitoredSceneObjects()
          Check all monitored SceneObject and update them or the scene3D if needed.
 

Method Detail

setSceneBufferSize

public void setSceneBufferSize(int maxMaterial,
                               int maxTexture)
Sets this scene internal buffer size.

this method must be used to increase/reduce the scene internal buffers size.

Default value are :
IMaterial: 1024
ITexture: 1024


Note: This method will reset the scene by calling clearScene internally.

Parameters:
maxMaterial - maximum number of material allowed.
maxTexture - maximum number of texture allowed.

getNbSceneObject

public int getNbSceneObject()
Gets the number of ISceneObject for this scene.

Returns:
number of ISceneObject

getNbMaterial

public int getNbMaterial()
Gets the number of IMaterial for this scene.

Returns:
number of IMaterial

getNbTexture

public int getNbTexture()
Gets the number of ITexture for this scene.

Returns:
number of ITexture

addSceneObject

public void addSceneObject(ISceneObject object)
Add the given SceneObject to this scene.

Parameters:
object - the new SceneObject to add.

addSceneObjects

public void addSceneObjects(ISceneObject[] objects)
Add multiple SceneObject to this scene.

Parameters:
objects - array containing SceneObject to add.

addMaterial

public void addMaterial(IMaterial m)
Add the given Material to this scene.

Parameters:
m - the new Material to add.

addTexture

public void addTexture(ITexture t)
Add the given Texture to this scene.

Parameters:
t - the new Texture to add.

removeSceneObject

public void removeSceneObject(ISceneObject object)
Remove the given Scene3DObject from this scene.

this method will remove the given Scene3DObject and all its childrens.

Material and Texture are not affected by this method.

Parameters:
object - the Scene3DObject to remove.

removeMaterialById

public void removeMaterialById(int id)
Remove the Material having the given id from this scene.

Parameters:
id - id of the Material to remove.

removeTextureById

public void removeTextureById(int id)
Remove the Texture having the given id from this scene.

Parameters:
id - id of the Texture to remove.

getMaterialById

public IMaterial getMaterialById(int id)
Gets the Material having the given id from this scene.

Parameters:
id - id of the Material to get.

getMaterialByName

public IMaterial getMaterialByName(java.lang.String name)
Gets the Material having the given name from this scene.

Parameters:
name - name of the Material to get.

getTextureById

public ITexture getTextureById(int id)
Gets the Texture having the given id from this scene.

Parameters:
id - id of the Texture to get.

getTextureByName

public ITexture getTextureByName(java.lang.String name)
Gets the Texture having the given name from this scene.

Parameters:
name - name of the Texture to get.

updateMonitoredSceneObjects

public void updateMonitoredSceneObjects()
Check all monitored SceneObject and update them or the scene3D if needed.

if some monitored SceneObject have reached a new state this method will update them or the scene3D if needed.

for example if some SceneObject(texture,3ds file) have reached the state loaded, they will be added to the scene.


getNbMonitoredSceneObject

public int getNbMonitoredSceneObject()
Gets total number of SceneObject currently monitored.

this will return the number of files currently loading as well as the number of sceneObject currently moving to an other state : loading,initilising,synchronising, etc..

Returns:
total currently monitored sceneObject

startMonitorSceneObject

public void startMonitorSceneObject(IMonitoredSceneObject obj)
Sets an object to monitor into the monitored object stack of this scene.

Parameters:
obj - MonitoredSceneObject to add into the monitored object stack of this scene

stopMonitorSceneObject

public void stopMonitorSceneObject(int idx)
Remove an object from the monitored object stack of this scene.

Parameters:
idx - Index of the MonitoredSceneObject to remove from the monitored object stack of this scene

getMonitoredSceneObject

public IMonitoredSceneObject getMonitoredSceneObject(int idx)
Gets a MonitoredSceneObject from the monitored object stack of this scene.

Returns:
MonitoredObject for the given index