deegree 2.1 (2007/11/08 09:57 build-328-official)

org.deegree.ogcwebservices.wpvs.j3d
Class OffScreenWPVSRenderer

java.lang.Object
  extended by org.deegree.ogcwebservices.wpvs.j3d.Abstract3DRenderingEngine
      extended by org.deegree.ogcwebservices.wpvs.j3d.OffScreenWPVSRenderer
All Implemented Interfaces:
RenderingEngine

public class OffScreenWPVSRenderer
extends Abstract3DRenderingEngine

The class provides the capabilitiy for rendering a WPVSScene to an offscreen graphic context that is represent by a BufferedImage. That is, the returned BufferedImage of this class's renderScene method is the response Object of a GetView request.

Version:
$Revision: 7957 $ $Date: 2007-08-09 11:59:39 +0200 (Do, 09 Aug 2007) $
Author:
Andreas Poth, Rutger Bezema

Field Summary
 
Fields inherited from class org.deegree.ogcwebservices.wpvs.j3d.Abstract3DRenderingEngine
farClippingPlane, nearClippingPlane, scene
 
Constructor Summary
OffScreenWPVSRenderer(double nearClippingPlane, WPVSScene scene, int width, int height)
          Initialzies the renderer class with the submitted width and height
OffScreenWPVSRenderer(WPVSScene scene)
          Initialzies the render class with a default width and height (800x600) and a nearclipping plane of 2
OffScreenWPVSRenderer(WPVSScene scene, int width, int height)
          Initialzies the renderer class with the submitted width and height and a nearclipping plane of 2
 
Method Summary
protected  javax.media.j3d.Canvas3D createOffscreenCanvas3D()
          creates and returns a canvas for offscreen rendering
protected  RenderedImage getImage(javax.media.j3d.Canvas3D offScreenCanvas3D)
          Called to render the scene into the offscreen Canvas3D
 BufferedImage renderScene()
          Renders the scene to a BufferedImage.
 void setScene(WPVSScene scene)
           
 
Methods inherited from class org.deegree.ogcwebservices.wpvs.j3d.Abstract3DRenderingEngine
addBackground, createCanvas, createTransformGroup, setBackClipDistance, setFrontClipDistance, setView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OffScreenWPVSRenderer

public OffScreenWPVSRenderer(WPVSScene scene)
Initialzies the render class with a default width and height (800x600) and a nearclipping plane of 2

Parameters:
scene - to render

OffScreenWPVSRenderer

public OffScreenWPVSRenderer(WPVSScene scene,
                             int width,
                             int height)
Initialzies the renderer class with the submitted width and height and a nearclipping plane of 2

Parameters:
scene - to render
width - of the resulting image
height - of the resulting image

OffScreenWPVSRenderer

public OffScreenWPVSRenderer(double nearClippingPlane,
                             WPVSScene scene,
                             int width,
                             int height)
Initialzies the renderer class with the submitted width and height

Parameters:
nearClippingPlane - of the scene's viewport.
scene - to render
width - of the resulting image
height - of the resulting image
Method Detail

setScene

public void setScene(WPVSScene scene)
Parameters:
scene - the Scene to render

renderScene

public BufferedImage renderScene()
Renders the scene to a BufferedImage. This Method uses the viewmatrix of the the ViewPoint class, which the defines the necessary viewing rotations and translations for the j3d scene.

Returns:
a BufferedImage where the scene has been rendered to

createOffscreenCanvas3D

protected javax.media.j3d.Canvas3D createOffscreenCanvas3D()
creates and returns a canvas for offscreen rendering

Returns:
a offscreen Canvas3D on which the the scene will be rendered.

getImage

protected RenderedImage getImage(javax.media.j3d.Canvas3D offScreenCanvas3D)
Called to render the scene into the offscreen Canvas3D

Parameters:
offScreenCanvas3D - to be rendered into
Returns:
a buffered image as a result of the Rendering.

deegree 2.1 (2007/11/08 09:57 build-328-official)

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