1 package org.simantics.g3d.scenegraph.base;
\r
3 import java.util.List;
\r
9 public interface INode {
\r
13 * @return unique node identifier
\r
15 public Long getId();
\r
18 * @return root node of the scene graph or <code>null</code> if this node is
\r
19 * not part of a properly rooted scene graph hierarchy
\r
21 public ParentNode<?> getRootNode();
\r
24 * @return Parent node reference or <code>null</code> if not set
\r
26 public ParentNode<?> getParent();
\r
28 public String getParentRel();
\r
30 * Set parent node. This method is for scene graph internal use only and
\r
31 * should not be called outside the scene graph structure. This method
\r
32 * simply sets the parent node parent field, and does not affect on parent
\r
33 * node (i.e., should be called only from parent node).
\r
35 public void setParent(ParentNode<?> parent, String name);
\r
38 * Perform cleanup for this node and for the child nodes. Any resources
\r
39 * (including child nodes) related to this node are unusable after this
\r
40 * operation. This method is for scene graph internal use only, thus should
\r
41 * not be called outside the scene graph structure.
\r
43 public void cleanup();
\r
45 * Remove this node and its children from the scene graph.
\r
47 public void remove();
\r
50 public void addListener(NodeListener listener);
\r
51 public void removeListener(NodeListener listener);
\r
53 public List<NodeListener> getListeners();
\r