deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.ogcwebservices.wpvs.j3d
Class Abstract3DRenderingEngine

java.lang.Object
  extended by org.deegree.ogcwebservices.wpvs.j3d.Abstract3DRenderingEngine
All Implemented Interfaces:
RenderingEngine
Direct Known Subclasses:
InteractiveWPVSRenderer, OffScreenWPVSRenderer

public abstract class Abstract3DRenderingEngine
extends Object
implements RenderingEngine

This class serves a a superclass for all rendering engines of the WPV Service.

Version:
$Revision: 18195 $ $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Andreas Poth

Field Summary
protected  float farClippingPlane
          the far clipping plane
protected  double nearClippingPlane
          the near clipping plane.
protected  WPVSScene scene
          Scene to render
 
Constructor Summary
Abstract3DRenderingEngine(WPVSScene scene)
          Creates a new Abstract3DRenderEngine object with a nearclippingplane of 2.
Abstract3DRenderingEngine(WPVSScene scene, double nearClippingPlane)
          Creates a new Abstract3DRenderEngine object.
 
Method Summary
protected  void addBackground(ViewPoint vp, javax.media.j3d.Group worldGroup, javax.media.j3d.Node background)
          adds a background to the scene
protected  javax.media.j3d.Canvas3D createCanvas(boolean offscreen)
          Creates a new canvas each time this is called.
protected  javax.media.j3d.TransformGroup createTransformGroup()
          A transform group is aplied as the transformation to the branches
 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(javax.media.j3d.View view, javax.media.j3d.BranchGroup viewGroup)
          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.ogcwebservices.wpvs.j3d.RenderingEngine
renderScene
 

Field Detail

scene

protected WPVSScene scene
Scene to render


farClippingPlane

protected float farClippingPlane
the far clipping plane


nearClippingPlane

protected double nearClippingPlane
the near clipping plane.

Constructor Detail

Abstract3DRenderingEngine

public Abstract3DRenderingEngine(WPVSScene scene)
Creates a new Abstract3DRenderEngine object with a nearclippingplane of 2.

Parameters:
scene - to be rendered

Abstract3DRenderingEngine

public Abstract3DRenderingEngine(WPVSScene scene,
                                 double nearClippingPlane)
Creates a new Abstract3DRenderEngine object.

Parameters:
scene - to be rendered
nearClippingPlane - of the viewport
Method Detail

createCanvas

protected javax.media.j3d.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.

Parameters:
offscreen - true if the canvas3D is an offsreen canvas.
Returns:
A new canvas instance or null if no GraphicsEnvironment was found.

createTransformGroup

protected javax.media.j3d.TransformGroup createTransformGroup()
A transform group is aplied as the transformation to the branches

Returns:
the transformgroup with ALLOW_TRANSFORM_READ, ALLOW_TRANSFORM_WRITE and ALLOW_LOCAL_TO_VWORLD_READ set.

setView

protected void setView(javax.media.j3d.View view,
                       javax.media.j3d.BranchGroup viewGroup)
sets/defines the View of the scene and adds it to the submitted BranchGroup

Parameters:
view - the scenes view
viewGroup -

addBackground

protected void addBackground(ViewPoint vp,
                             javax.media.j3d.Group worldGroup,
                             javax.media.j3d.Node background)
adds a background to the scene

Parameters:
vp - viewpoint
background - the node to render in the background
worldGroup - to add the Background to

setBackClipDistance

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

Specified by:
setBackClipDistance in interface RenderingEngine
Parameters:
distance -

setFrontClipDistance

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

Specified by:
setFrontClipDistance in interface RenderingEngine
Parameters:
distance -

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org