deegree 2.5 (2011/06/29 09:44 build-8-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: 19665 $ $Date: 2009-09-16 10:11:29 +0200 (Mi, 16 Sep 2009) $
Author:
Andreas Poth, Rutger Bezema

Field Summary
 
Fields inherited from class org.deegree.ogcwebservices.wpvs.j3d.Abstract3DRenderingEngine
farClippingPlane, nearClippingPlane, scene
 
Constructor Summary
OffScreenWPVSRenderer(javax.media.j3d.Canvas3D canvas, double nearClippingPlane, WPVSScene scene, int width, int height, boolean antialiased)
          Initializes the renderer class with the submitted width and height
OffScreenWPVSRenderer(javax.media.j3d.Canvas3D canvas, WPVSScene scene)
          Initializes the render class with a default width and height (800x600) and a nearclipping plane of 2
OffScreenWPVSRenderer(javax.media.j3d.Canvas3D canvas, WPVSScene scene, int width, int height, boolean antialiased)
          Initializes the renderer class with the submitted width and height and a nearclipping plane of 2
 
Method Summary
protected  java.awt.image.RenderedImage getImage(javax.media.j3d.Canvas3D offScreenCanvas3D)
          Called to render the scene into the offscreen Canvas3D
 java.awt.image.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(javax.media.j3d.Canvas3D canvas,
                             WPVSScene scene)
Initializes the render class with a default width and height (800x600) and a nearclipping plane of 2

Parameters:
canvas - to render upon
scene - to render

OffScreenWPVSRenderer

public OffScreenWPVSRenderer(javax.media.j3d.Canvas3D canvas,
                             WPVSScene scene,
                             int width,
                             int height,
                             boolean antialiased)
Initializes the renderer class with the submitted width and height and a nearclipping plane of 2

Parameters:
canvas - to render upon
scene - to render
width - of the resulting image
height - of the resulting image
antialiased - true if the scene should be rendered antialiased

OffScreenWPVSRenderer

public OffScreenWPVSRenderer(javax.media.j3d.Canvas3D canvas,
                             double nearClippingPlane,
                             WPVSScene scene,
                             int width,
                             int height,
                             boolean antialiased)
Initializes the renderer class with the submitted width and height

Parameters:
canvas - to render upon
nearClippingPlane - of the scene's viewport.
scene - to render
width - of the resulting image
height - of the resulting image
antialiased - true if the scene should be rendered antialiased
Method Detail

setScene

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

renderScene

public java.awt.image.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

getImage

protected java.awt.image.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.5 (2011/06/29 09:44 build-8-official)

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