1 /*******************************************************************************
\r
2 * Copyright (c) 2012, 2013 Association for Decentralized Information Management in
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.g3d.scenegraph;
\r
14 import java.util.Collection;
\r
16 import org.simantics.g3d.scenegraph.base.INode;
\r
17 import org.simantics.g3d.scenegraph.base.NodeListener;
\r
18 import org.simantics.g3d.scenegraph.base.ParentNode;
\r
20 public interface NodeMap<T> {
\r
22 public Collection<T> getRenderObjects(INode node);
\r
24 public void updateRenderObjectsFor(INode node);
\r
26 public INode getNode(T t);
\r
28 public ParentNode<IG3DNode> getRootNode();
\r
31 * Commit changes to the database.
\r
33 public void commit();
\r
37 * Deletes (Disposes) the map.
\r
39 public void delete();
\r
43 * Track changes that are going to be committed into the database.
\r
45 * Disabling change tracking causes commit() to do nothing.
\r
48 public void setChangeTracking(boolean enabled);
\r
49 public boolean isChangeTracking();
\r
53 * Add listener for all scene-graph events.
\r
56 public void addListener(NodeListener listener);
\r
58 public void removeListener(NodeListener listener);
\r