1 /*******************************************************************************
\r
2 * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.
\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
9 * VTT Technical Research Centre of Finland - initial API and implementation
\r
10 *******************************************************************************/
\r
11 package org.simantics.proconf.g3d.base;
\r
13 import com.jme.renderer.Camera;
\r
14 import com.jme.scene.Node;
\r
15 import com.jme.system.DisplaySystem;
\r
21 * Rendering component
\r
22 * Allows to change underlying rendering so that
\r
23 * additional information can be presented to the user
\r
25 * @author Marko Luukkainen
\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
33 * Returns root node for nodes that cast and receive shadows.
\r
36 public abstract Node getShadowRoot();
\r
39 * Returns root node for nodes that do not cast shadows.
\r
42 public abstract Node getNoCastRoot();
\r
45 * Returns root node of the scenegraph
\r
48 public abstract Node getRoot();
\r
51 * Returns root node of orthogonal nodes (nodes that always face the camera)
\r
54 public abstract Node getOrthoNode();
\r
57 * Returns root node for nodes that do not cast or receive shadows.
\r
60 public abstract Node getNoShadowRoot();
\r
62 public abstract void init(DisplaySystem displaySystem);
\r
65 * Sets projection policy.
\r
66 * FIXME : this was for Xith compatibility!
\r
69 public abstract void setProjectionPolicy(int policy);
\r
70 public abstract int getProjectionPolicy();
\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
78 * Update flag (Return true if view needs to be rendered)
\r
81 public boolean update() {return false;}
\r
82 public abstract Camera getCamera();
\r
84 public abstract void render();
\r
85 public abstract void resize(int width, int height);
\r
86 public abstract DisplaySystem getDisplaySystem();
\r
89 * TODO : this is for debugging purposes and will be removed.
\r
92 public abstract void setDebugText(String text);
\r