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.base;
14 import java.util.List;
20 public interface INode {
24 * @return unique node identifier
26 // public Long getId();
29 * @return root node of the scene graph or <code>null</code> if this node is
30 * not part of a properly rooted scene graph hierarchy
32 public ParentNode<?> getRootNode();
35 * @return Parent node reference or <code>null</code> if not set
37 public ParentNode<?> getParent();
39 public String getParentRel();
41 * Set parent node. This method is for scene graph internal use only and
42 * should not be called outside the scene graph structure. This method
43 * simply sets the parent node parent field, and does not affect on parent
44 * node (i.e., should be called only from parent node).
46 public void setParent(ParentNode<?> parent, String name);
49 * Perform cleanup for this node and for the child nodes. Any resources
50 * (including child nodes) related to this node are unusable after this
51 * operation. This method is for scene graph internal use only, thus should
52 * not be called outside the scene graph structure.
54 public void cleanup();
56 * Remove this node and its children from the scene graph.
61 public void addListener(NodeListener listener);
62 public void removeListener(NodeListener listener);
64 public List<NodeListener> getListeners();