]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.g3d/src/org/simantics/proconf/g3d/base/JmeRenderingComponent.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 / JmeRenderingComponent.java
diff --git a/org.simantics.g3d/src/org/simantics/proconf/g3d/base/JmeRenderingComponent.java b/org.simantics.g3d/src/org/simantics/proconf/g3d/base/JmeRenderingComponent.java
new file mode 100644 (file)
index 0000000..159bd98
--- /dev/null
@@ -0,0 +1,93 @@
+/*******************************************************************************\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 com.jme.renderer.Camera;\r
+import com.jme.scene.Node;\r
+import com.jme.system.DisplaySystem;\r
+\r
+\r
+\r
+\r
+/**\r
+ * Rendering component\r
+ * Allows to change underlying rendering so that\r
+ * additional information can be presented to the user\r
+ * \r
+ * @author Marko Luukkainen\r
+ *\r
+ */\r
+public abstract class JmeRenderingComponent {\r
+    public static final int PARALLEL_PROJECTION = 0;\r
+    public static final int PERSPECTIVE_PROJECTION = 1;\r
+    \r
+    /**\r
+     * Returns root node for nodes that cast and receive shadows.\r
+     * @return\r
+     */\r
+       public abstract Node getShadowRoot();\r
+       \r
+       /**\r
+     * Returns root node for nodes that do not cast shadows.\r
+     * @return\r
+     */\r
+       public abstract Node getNoCastRoot();\r
+       \r
+       /**\r
+        * Returns root node of the scenegraph\r
+        * @return\r
+        */\r
+       public abstract Node getRoot();\r
+       \r
+       /**\r
+        * Returns root node of orthogonal nodes (nodes that always face the camera)\r
+        * @return\r
+        */\r
+       public abstract Node getOrthoNode();\r
+       \r
+       /**\r
+        * Returns root node for nodes that do not cast or receive shadows.\r
+        * @return\r
+        */\r
+       public abstract Node getNoShadowRoot();\r
+       \r
+       public abstract void init(DisplaySystem displaySystem);\r
+       \r
+       /**\r
+        * Sets projection policy.\r
+        * FIXME : this was for Xith compatibility!\r
+        * @param policy\r
+        */\r
+       public abstract void setProjectionPolicy(int policy);\r
+    public abstract int getProjectionPolicy();\r
+    \r
+    public abstract float getScreenScale();\r
+    public abstract void setScreenScale(float screenScale);\r
+    public abstract float getFieldOfView();\r
+    public abstract void dispose();\r
+    \r
+    /**\r
+     * Update flag (Return true if view needs to be rendered)\r
+     * @return\r
+     */\r
+    public boolean update() {return false;}\r
+    public abstract Camera getCamera();\r
+    \r
+    public abstract void render();\r
+    public abstract void resize(int width, int height);\r
+    public abstract DisplaySystem getDisplaySystem();\r
+    \r
+    /**\r
+     * TODO : this is for debugging purposes and will be removed.\r
+     * @param text\r
+     */\r
+    public abstract void setDebugText(String text);\r
+}\r