/******************************************************************************* * Copyright (c) 2007 VTT Technical Research Centre of Finland and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * VTT Technical Research Centre of Finland - initial API and implementation *******************************************************************************/ package org.simantics.proconf.g3d.base; import com.jme.renderer.Camera; import com.jme.scene.Node; import com.jme.system.DisplaySystem; /** * Rendering component * Allows to change underlying rendering so that * additional information can be presented to the user * * @author Marko Luukkainen * */ public abstract class JmeRenderingComponent { public static final int PARALLEL_PROJECTION = 0; public static final int PERSPECTIVE_PROJECTION = 1; /** * Returns root node for nodes that cast and receive shadows. * @return */ public abstract Node getShadowRoot(); /** * Returns root node for nodes that do not cast shadows. * @return */ public abstract Node getNoCastRoot(); /** * Returns root node of the scenegraph * @return */ public abstract Node getRoot(); /** * Returns root node of orthogonal nodes (nodes that always face the camera) * @return */ public abstract Node getOrthoNode(); /** * Returns root node for nodes that do not cast or receive shadows. * @return */ public abstract Node getNoShadowRoot(); public abstract void init(DisplaySystem displaySystem); /** * Sets projection policy. * FIXME : this was for Xith compatibility! * @param policy */ public abstract void setProjectionPolicy(int policy); public abstract int getProjectionPolicy(); public abstract float getScreenScale(); public abstract void setScreenScale(float screenScale); public abstract float getFieldOfView(); public abstract void dispose(); /** * Update flag (Return true if view needs to be rendered) * @return */ public boolean update() {return false;} public abstract Camera getCamera(); public abstract void render(); public abstract void resize(int width, int height); public abstract DisplaySystem getDisplaySystem(); /** * TODO : this is for debugging purposes and will be removed. * @param text */ public abstract void setDebugText(String text); }