de.jreality.scene.proxy.tree
Class UpToDateSceneProxyBuilder

java.lang.Object
  extended by de.jreality.scene.proxy.tree.SceneProxyTreeBuilder
      extended by de.jreality.scene.proxy.tree.UpToDateSceneProxyBuilder
All Implemented Interfaces:
SceneGraphComponentListener, java.util.EventListener

public class UpToDateSceneProxyBuilder
extends SceneProxyTreeBuilder
implements SceneGraphComponentListener

This class creates a proxy tree for the given sceneGraph from the root node and cares about adding and removing of objects. Updating the proxy tree for other changes is handled differently, as there is no need for the factory mechanism then. just forward the events to the implemetation TODO: thread issues!!

Author:
weissman

Constructor Summary
UpToDateSceneProxyBuilder(SceneGraphComponent root)
           
 
Method Summary
 void childAdded(SceneGraphComponentEvent ev)
           
 void childRemoved(SceneGraphComponentEvent ev)
           
 void childReplaced(SceneGraphComponentEvent ev)
           
 SceneTreeNode createProxyTree()
          TODO: synchronize and signal error when called twice?
 void dispose()
           
 EntityFactory getEntityFactory()
           
 void setEntityFactory(EntityFactory ef)
           
 void visibilityChanged(SceneGraphComponentEvent ev)
           
 
Methods inherited from class de.jreality.scene.proxy.tree.SceneProxyTreeBuilder
getConnector, getProxy, getProxyTreeFactory, getTreeNodeForProxy, getTreeRoot, setProxyConnector, setProxyTreeFactory
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpToDateSceneProxyBuilder

public UpToDateSceneProxyBuilder(SceneGraphComponent root)
Method Detail

createProxyTree

public SceneTreeNode createProxyTree()
TODO: synchronize and signal error when called twice?

Overrides:
createProxyTree in class SceneProxyTreeBuilder

childAdded

public void childAdded(SceneGraphComponentEvent ev)
Specified by:
childAdded in interface SceneGraphComponentListener

childRemoved

public void childRemoved(SceneGraphComponentEvent ev)
Specified by:
childRemoved in interface SceneGraphComponentListener

childReplaced

public void childReplaced(SceneGraphComponentEvent ev)
Specified by:
childReplaced in interface SceneGraphComponentListener

getEntityFactory

public EntityFactory getEntityFactory()

setEntityFactory

public void setEntityFactory(EntityFactory ef)

visibilityChanged

public void visibilityChanged(SceneGraphComponentEvent ev)
Specified by:
visibilityChanged in interface SceneGraphComponentListener

dispose

public void dispose()