org.deegree_impl.services.wts
Class Abstract3DRenderEngine

java.lang.Object
  extended byorg.deegree_impl.services.wts.Abstract3DRenderEngine
All Implemented Interfaces:
RenderEngine
Direct Known Subclasses:
OffScreenWTSRenderer

public abstract class Abstract3DRenderEngine
extends java.lang.Object
implements RenderEngine

-----------------------------------------------------------------------

Version:
$Revision: 1.16 $ $Date: 2004/02/23 07:47:52 $
Author:
Andreas Poth

Field Summary
protected  float back_clipping
           
protected  float front_clipping
           
protected  WTSScene scene
           
 
Constructor Summary
Abstract3DRenderEngine(WTSScene scene)
          Creates a new Abstract3DRenderEngine object.
 
Method Summary
protected  void addBackround(ViewPoint vp, Group world_group, java.lang.String background)
          adds a background to the scene
 BranchGroup createBackground(ViewPoint vp, java.lang.String background)
          creates the background of a scene depending of the view point definition
protected  Canvas3D createCanvas(boolean offscreen)
          Creates a new canvas each time this is called.
private  TransformGroup createTransformGroup()
          Build the scenegraph for the canvas
private  double mapAngle(double angle)
           
 void setBackClipDistance(float distance)
          sets the scenes back clip distance. default is 15000
 void setFrontClipDistance(float distance)
          sets the scenes front clip distance. default is 2
protected  void setView(View view, BranchGroup view_group)
          sets/defines the View of the scene and adds it to the submitted BranchGroup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.deegree.services.wts.RenderEngine
renderScene
 

Field Detail

scene

protected WTSScene scene

back_clipping

protected float back_clipping

front_clipping

protected float front_clipping
Constructor Detail

Abstract3DRenderEngine

public Abstract3DRenderEngine(WTSScene scene)
Creates a new Abstract3DRenderEngine object.

Parameters:
scene -
Method Detail

createCanvas

protected Canvas3D createCanvas(boolean offscreen)
Creates a new canvas each time this is called. The Canvas3D class provides a drawing canvas for 3D rendering. The Canvas3D object extends the Canvas object to include 3D-related information such as the size of the canvas in pixels, the Canvas3D's location, also in pixels, within a Screen3D object, and whether or not the canvas has stereo enabled. Because all Canvas3D objects contain a reference to a Screen3D object and because Screen3D objects define the size of a pixel in physical units, Java 3D can convert a Canvas3D size in pixels to a physical world size in meters. It can also determine the Canvas3D's position and orientation in the physical world.

Returns:
A new canvas instance

createTransformGroup

private TransformGroup createTransformGroup()
Build the scenegraph for the canvas


setView

protected void setView(View view,
                       BranchGroup view_group)
sets/defines the View of the scene and adds it to the submitted BranchGroup

Parameters:
view - the scenes view
view_group -

mapAngle

private double mapAngle(double angle)
Parameters:
angle -
Returns:

addBackround

protected void addBackround(ViewPoint vp,
                            Group world_group,
                            java.lang.String background)
adds a background to the scene

Parameters:
vp - view point
world_group - background

createBackground

public BranchGroup createBackground(ViewPoint vp,
                                    java.lang.String background)
creates the background of a scene depending of the view point definition

Parameters:
vp - view point
Returns:
BranchGroup representing the background

setBackClipDistance

public void setBackClipDistance(float distance)
sets the scenes back clip distance. default is 15000

Specified by:
setBackClipDistance in interface RenderEngine
Parameters:
distance -

setFrontClipDistance

public void setFrontClipDistance(float distance)
sets the scenes front clip distance. default is 2

Specified by:
setFrontClipDistance in interface RenderEngine
Parameters:
distance -