deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.ogcwebservices.wpvs.j3d
Class InteractiveWPVSRenderer

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

public class InteractiveWPVSRenderer
extends Abstract3DRenderingEngine

This class sill/shoud provide the ability to render a scence object (s. com.sun.j3d.loaders.Scene) or a Canvas3D. It's currently used for testing.

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

Field Summary
 
Fields inherited from class org.deegree.ogcwebservices.wpvs.j3d.Abstract3DRenderingEngine
farClippingPlane, nearClippingPlane, scene
 
Constructor Summary
InteractiveWPVSRenderer(WPVSScene scene)
          initialzies the render class with a default width and height (801x601)
InteractiveWPVSRenderer(WPVSScene scene, int width, int height)
          initialzies the render class with the submitted width and height
 
Method Summary
protected  javax.media.j3d.Locale createLocale(javax.media.j3d.VirtualUniverse u)
          Simple utility method that creates a Locale for the VirtualUniverse
protected  javax.media.j3d.Canvas3D createOffscreenCanvas3D()
          creates and returns a canvas for offscreen rendering
protected  javax.media.j3d.VirtualUniverse createVirtualUniverse()
          Create the VirtualUniverse for the application.
 int getHeight()
          returns the height of the offscreen rendering target
protected  java.awt.image.RenderedImage getImage(javax.media.j3d.Canvas3D offScreenCanvas3D)
          Called to render the scene into the offscreen Canvas3D
 int getWidth()
          returns the width of the offscreen rendering target
 java.lang.Object renderScene()
          renders the scene to an BufferedImage
 void setHeight(int height)
           
 void setScene(WPVSScene scene)
           
 void setWidth(int width)
           
 
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

InteractiveWPVSRenderer

public InteractiveWPVSRenderer(WPVSScene scene)
initialzies the render class with a default width and height (801x601)

Parameters:
scene -

InteractiveWPVSRenderer

public InteractiveWPVSRenderer(WPVSScene scene,
                               int width,
                               int height)
initialzies the render class with the submitted width and height

Parameters:
scene -
width -
height -
Method Detail

setScene

public void setScene(WPVSScene scene)
Parameters:
scene -

createVirtualUniverse

protected javax.media.j3d.VirtualUniverse createVirtualUniverse()
Create the VirtualUniverse for the application.

Returns:
the VirtualUniverse for the application.

createLocale

protected javax.media.j3d.Locale createLocale(javax.media.j3d.VirtualUniverse u)
Simple utility method that creates a Locale for the VirtualUniverse

Parameters:
u - the universe
Returns:
the Locale

getWidth

public int getWidth()
returns the width of the offscreen rendering target

Returns:
the width of the offscreen rendering target

setWidth

public void setWidth(int width)
Parameters:
width - the new width of the screen

getHeight

public int getHeight()
returns the height of the offscreen rendering target

Returns:
the height of the offscreen rendering target

setHeight

public void setHeight(int height)
Parameters:
height - the new Height of the screen

renderScene

public java.lang.Object renderScene()
renders the scene to an BufferedImage

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 canvas for rendering

getImage

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

Parameters:
offScreenCanvas3D - the canvas to render into
Returns:
the Rendered Image

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