]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.g3d/src/org/simantics/proconf/g3d/gizmo/Gizmo.java
git-svn-id: https://www.simantics.org/svn/simantics/3d/trunk@22280 ac1ea38d-2e2b...
[simantics/3d.git] / org.simantics.g3d / src / org / simantics / proconf / g3d / gizmo / Gizmo.java
diff --git a/org.simantics.g3d/src/org/simantics/proconf/g3d/gizmo/Gizmo.java b/org.simantics.g3d/src/org/simantics/proconf/g3d/gizmo/Gizmo.java
new file mode 100644 (file)
index 0000000..551033f
--- /dev/null
@@ -0,0 +1,50 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.proconf.g3d.gizmo;\r
+\r
+import com.jme.scene.Node;\r
+\r
+/**\r
+ * Interface for gizmos, interactive components in the scene-graph.\r
+ * \r
+ * @author Marko Luukkainen <Marko.Luukkainen@vtt.fi>\r
+ *\r
+ */\r
+public interface Gizmo {\r
+\r
+       /**\r
+        * Must return unique identifier for this gizmo\r
+        * @return\r
+        */\r
+    public abstract String getPickPrefix();\r
+\r
+    /**\r
+     * Sets selected component (where mouse is hovering) by using its name.\r
+     * Name includes pick prefix\r
+     * @param name\r
+     */\r
+    public abstract void setSelected(String name);\r
+\r
+    /**\r
+     * Returns root-node of the gizmo. It is used for inserting the gizmo into scenegraph.\r
+     * @return\r
+     */\r
+    public abstract Node getNode();\r
+    \r
+    /**\r
+     * Returns true if gizmo needs to be redrawn.\r
+     * @return\r
+     */\r
+    public boolean isChanged();\r
+    \r
+    public void setChanged(boolean b);\r
+\r
+}
\ No newline at end of file