org.deegree_impl.services.wts
Class OffScreenWTSRenderer

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

public class OffScreenWTSRenderer
extends Abstract3DRenderEngine

The class provides the capabilitiy for rendering a WTSScene to an offscreen graphic context that is represent by a BufferedImage.

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

Version:
$Revision: 1.11 $ $Date: 2004/02/09 08:00:39 $
Author:
Andreas Poth

Field Summary
private  int height
           
private  boolean newSize
           
private  Canvas3D offScreenCanvas3D
           
private  View view
           
private  int width
           
 
Fields inherited from class org.deegree_impl.services.wts.Abstract3DRenderEngine
back_clipping, front_clipping, scene
 
Constructor Summary
OffScreenWTSRenderer(WTSScene scene)
          initialzies the render class with a default width and height (800x600)
OffScreenWTSRenderer(WTSScene scene, int width, int height)
          initialzies the render class with the submitted width and height
 
Method Summary
protected  Locale createLocale(VirtualUniverse u)
          Simple utility method that creates a Locale for the VirtualUniverse
protected  Canvas3D createOffscreenCanvas3D()
          creates and returns a canvas for offscreen rendering
protected  VirtualUniverse createVirtualUniverse()
          Create the VirtualUniverse for the application.
 int getHeight()
          returns the height of the offscreen rendering target
protected  java.awt.image.RenderedImage getImage(Canvas3D offScreenCanvas3D)
           
 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(WTSScene scene)
           
 void setWidth(int width_)
           
 
Methods inherited from class org.deegree_impl.services.wts.Abstract3DRenderEngine
addBackround, createBackground, createCanvas, setBackClipDistance, setFrontClipDistance, setView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

private int width

height

private int height

offScreenCanvas3D

private Canvas3D offScreenCanvas3D

view

private View view

newSize

private boolean newSize
Constructor Detail

OffScreenWTSRenderer

public OffScreenWTSRenderer(WTSScene scene)
initialzies the render class with a default width and height (800x600)


OffScreenWTSRenderer

public OffScreenWTSRenderer(WTSScene scene,
                            int width,
                            int height)
initialzies the render class with the submitted width and height

Method Detail

setScene

public void setScene(WTSScene scene)

createVirtualUniverse

protected VirtualUniverse createVirtualUniverse()
Create the VirtualUniverse for the application.


createLocale

protected Locale createLocale(VirtualUniverse u)
Simple utility method that creates a Locale for the VirtualUniverse


getWidth

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


setWidth

public void setWidth(int width_)

getHeight

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


setHeight

public void setHeight(int height_)

renderScene

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

Returns:
a BufferedImage where the scene has been rendered to

createOffscreenCanvas3D

protected Canvas3D createOffscreenCanvas3D()
creates and returns a canvas for offscreen rendering


getImage

protected java.awt.image.RenderedImage getImage(Canvas3D offScreenCanvas3D)