]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.g3d/src/org/simantics/proconf/g3d/base/GeometryProvider.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 / base / GeometryProvider.java
diff --git a/org.simantics.g3d/src/org/simantics/proconf/g3d/base/GeometryProvider.java b/org.simantics.g3d/src/org/simantics/proconf/g3d/base/GeometryProvider.java
new file mode 100644 (file)
index 0000000..d4de992
--- /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.base;\r
+\r
+import org.simantics.layer0.utils.IEntity;\r
+\r
+\r
+/**\r
+ * Interface for geometryProviders\r
+ * \r
+ * TODO : instead of using Geometry array, create class that is passed through\r
+ * TODO : Current animation system links resources; what about code generated meshes ?\r
+ * \r
+ * @author Marko Luukkainen\r
+ *\r
+ */\r
+public interface GeometryProvider {\r
+    \r
+       /**\r
+        * Used to check if GeometryProvider can generate mesh\r
+        * @param instance\r
+        * @return\r
+        */\r
+    public boolean canHandle(IEntity instance);\r
+       \r
+    /**\r
+     * Generates mesh\r
+     * @param instance\r
+     * @param transform\r
+     * @return\r
+     */\r
+    public com.jme.scene.Geometry[] getGeometryFromResource(IEntity instance, boolean transform);\r
+    \r
+    /**\r
+     * Updates mesh\r
+     * @param instance\r
+     * @param transform\r
+     * @param geometry\r
+     * @return\r
+     */\r
+    public boolean reconstructGeometry(IEntity instance, boolean transform, com.jme.scene.Geometry[] geometry);\r
+}\r