]> gerrit.simantics Code Review - simantics/3d.git/blob - org.simantics.g3d/src/org/simantics/g3d/scenegraph/NodeMap.java
7e0f31e6439c02112d4ce45ba0b350eab263fb0a
[simantics/3d.git] / org.simantics.g3d / src / org / simantics / g3d / scenegraph / NodeMap.java
1 /*******************************************************************************\r
2  * Copyright (c) 2012, 2013 Association for Decentralized Information Management in\r
3  * Industry THTH ry.\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
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.g3d.scenegraph;\r
13 \r
14 import java.util.Collection;\r
15 \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
19 \r
20 public interface NodeMap<T> {\r
21 \r
22         public Collection<T> getRenderObjects(INode node);\r
23         \r
24         public void updateRenderObjectsFor(INode node);\r
25         \r
26         public INode getNode(T t);\r
27         \r
28         public ParentNode<IG3DNode> getRootNode();\r
29         \r
30         /**\r
31          * Commit changes to the database.\r
32          */\r
33         public void commit();\r
34         \r
35         \r
36         /**\r
37          * Deletes (Disposes) the map. \r
38          */\r
39         public void delete();\r
40         \r
41         \r
42         /**\r
43          * Track changes that are going to be committed into the database.\r
44          * \r
45          * Disabling change tracking causes commit() to do nothing. \r
46          * @param enabled\r
47          */\r
48         public void setChangeTracking(boolean enabled);\r
49         public boolean  isChangeTracking();\r
50         \r
51         \r
52         /**\r
53          * Add listener for all scene-graph events.\r
54          * @param listener\r
55          */\r
56         public void addListener(NodeListener listener);\r
57         \r
58         public void removeListener(NodeListener listener);\r
59 }\r