X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=org.simantics.g3d%2Fsrc%2Forg%2Fsimantics%2Fg3d%2Fscenegraph%2FNodeMap.java;fp=org.simantics.g3d%2Fsrc%2Forg%2Fsimantics%2Fg3d%2Fscenegraph%2FNodeMap.java;h=d4f12da30fa2a0ebbde238bbda81f9055a6f172c;hb=87b3241ec277ba3d8e414b26186a032c9cdcaeed;hp=0000000000000000000000000000000000000000;hpb=1f0bcd66274375f2278d2e6c486cb28257a5f7b2;p=simantics%2F3d.git diff --git a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/NodeMap.java b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/NodeMap.java new file mode 100644 index 00000000..d4f12da3 --- /dev/null +++ b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/NodeMap.java @@ -0,0 +1,48 @@ +package org.simantics.g3d.scenegraph; + +import java.util.Collection; + +import org.simantics.g3d.scenegraph.base.INode; +import org.simantics.g3d.scenegraph.base.NodeListener; +import org.simantics.g3d.scenegraph.base.ParentNode; + +public interface NodeMap { + + public Collection getRenderObjects(INode node); + + public void updateRenderObjectsFor(INode node); + + public INode getNode(T t); + + public ParentNode getRootNode(); + + /** + * Commit changes to the database. + */ + public void commit(); + + + /** + * Deletes (Disposes) the map. + */ + public void delete(); + + + /** + * Track changes that are going to be committed into the database. + * + * Disabling change tracking causes commit() to do nothing. + * @param enabled + */ + public void setChangeTracking(boolean enabled); + public boolean isChangeTracking(); + + + /** + * Add listener for all scene-graph events. + * @param listener + */ + public void addListener(NodeListener listener); + + public void removeListener(NodeListener listener); +}