1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.g3d.scenegraph;
14 import java.util.Collection;
16 import org.simantics.g3d.scenegraph.base.INode;
17 import org.simantics.g3d.scenegraph.base.NodeListener;
18 import org.simantics.g3d.scenegraph.base.ParentNode;
19 import org.simantics.objmap.graph.IMapping;
21 public interface NodeMap<T,E extends INode> {
23 public Collection<T> getRenderObjects(E node);
25 public void updateRenderObjectsFor(E node);
27 public E getNode(T t);
29 public ParentNode<E> getRootNode();
32 * Commit changes to the database.
34 public void commit(String message);
38 * Deletes (Disposes) the map.
44 * Track changes that are going to be committed into the database.
46 * Disabling change tracking causes commit() to do nothing.
49 public void setChangeTracking(boolean enabled);
50 public boolean isChangeTracking();
54 * Add listener for all scene-graph events.
57 public void addListener(NodeListener listener);
59 public void removeListener(NodeListener listener);
61 public IMapping<Object, E> getMapping();