]> gerrit.simantics Code Review - simantics/3d.git/blob - org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/JmeRenderingComponent.java
Set copyright texts for java files in the latest development branches.
[simantics/3d.git] / org.simantics.proconf.g3d / src / org / simantics / proconf / g3d / base / JmeRenderingComponent.java
1 /*******************************************************************************\r
2  * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
3  * All rights reserved. This program and the accompanying materials\r
4  * are made available under the terms of the Eclipse Public License v1.0\r
5  * which accompanies this distribution, and is available at\r
6  * http://www.eclipse.org/legal/epl-v10.html\r
7  *\r
8  * Contributors:\r
9  *     VTT Technical Research Centre of Finland - initial API and implementation\r
10  *******************************************************************************/\r
11 package org.simantics.proconf.g3d.base;\r
12 \r
13 import com.jme.renderer.Camera;\r
14 import com.jme.scene.Node;\r
15 import com.jme.system.DisplaySystem;\r
16 \r
17 \r
18 \r
19 \r
20 /**\r
21  * Rendering component\r
22  * Allows to change underlying rendering so that\r
23  * additional information can be presented to the user\r
24  * \r
25  * @author Marko Luukkainen\r
26  *\r
27  */\r
28 public abstract class JmeRenderingComponent {\r
29     public static final int PARALLEL_PROJECTION = 0;\r
30     public static final int PERSPECTIVE_PROJECTION = 1;\r
31     \r
32     /**\r
33      * Returns root node for nodes that cast and receive shadows.\r
34      * @return\r
35      */\r
36         public abstract Node getShadowRoot();\r
37         \r
38         /**\r
39      * Returns root node for nodes that do not cast shadows.\r
40      * @return\r
41      */\r
42         public abstract Node getNoCastRoot();\r
43         \r
44         /**\r
45          * Returns root node of the scenegraph\r
46          * @return\r
47          */\r
48         public abstract Node getRoot();\r
49         \r
50         /**\r
51          * Returns root node of orthogonal nodes (nodes that always face the camera)\r
52          * @return\r
53          */\r
54         public abstract Node getOrthoNode();\r
55         \r
56         /**\r
57          * Returns root node for nodes that do not cast or receive shadows.\r
58          * @return\r
59          */\r
60         public abstract Node getNoShadowRoot();\r
61         \r
62         public abstract void init(DisplaySystem displaySystem);\r
63         \r
64         /**\r
65          * Sets projection policy.\r
66          * FIXME : this was for Xith compatibility!\r
67          * @param policy\r
68          */\r
69         public abstract void setProjectionPolicy(int policy);\r
70     public abstract int getProjectionPolicy();\r
71     \r
72     public abstract float getScreenScale();\r
73     public abstract void setScreenScale(float screenScale);\r
74     public abstract float getFieldOfView();\r
75     public abstract void dispose();\r
76     \r
77     /**\r
78      * Update flag (Return true if view needs to be rendered)\r
79      * @return\r
80      */\r
81     public boolean update() {return false;}\r
82     public abstract Camera getCamera();\r
83     \r
84     public abstract void render();\r
85     public abstract void resize(int width, int height);\r
86     public abstract DisplaySystem getDisplaySystem();\r
87     \r
88     /**\r
89      * TODO : this is for debugging purposes and will be removed.\r
90      * @param text\r
91      */\r
92     public abstract void setDebugText(String text);\r
93 }\r