de.jreality.scene
Class SceneGraphPathObserver
java.lang.Object
de.jreality.scene.SceneGraphPathObserver
- All Implemented Interfaces:
- AppearanceListener, SceneGraphComponentListener, TransformationListener, EventListener
public class SceneGraphPathObserver
- extends Object
- implements AppearanceListener, TransformationListener, SceneGraphComponentListener
This class observes the given path for changes of the resulting
path matrix/effective appearance.
Note: this class makes a private copy of the path and
therefore doesn't care about changes of the path itself!
If the observed path changes, call setPath(myPath) to observe
the changed path.
TODO: add listeners to changes other than transformation or appearance
- Author:
- weissman
SceneGraphPathObserver
public SceneGraphPathObserver()
SceneGraphPathObserver
public SceneGraphPathObserver(SceneGraphPath path)
setPath
public void setPath(SceneGraphPath newPath)
- TODO: remove only the listeners from nodes that
are not part of the new path!
calling this method results in changing the observed path.
TransformationChangedEvents will be generated only if the new
given path changes.
- Parameters:
newPath
-
dispose
public void dispose()
addTransformationListener
public void addTransformationListener(TransformationListener listener)
removeTransformationListener
public void removeTransformationListener(TransformationListener listener)
addAppearanceListener
public void addAppearanceListener(AppearanceListener listener)
removeAppearanceListener
public void removeAppearanceListener(AppearanceListener listener)
appearanceChanged
public void appearanceChanged(AppearanceEvent ev)
- Specified by:
appearanceChanged
in interface AppearanceListener
transformationMatrixChanged
public void transformationMatrixChanged(TransformationEvent ev)
- Specified by:
transformationMatrixChanged
in interface TransformationListener
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
visibilityChanged
public void visibilityChanged(SceneGraphComponentEvent ev)
- Specified by:
visibilityChanged
in interface SceneGraphComponentListener