org.jzy3d.plot3d.rendering.canvas
Class OffscreenCanvas

java.lang.Object
  extended by org.jzy3d.plot3d.rendering.canvas.OffscreenCanvas
All Implemented Interfaces:
ICanvas

public class OffscreenCanvas
extends Object
implements ICanvas


Field Summary
protected  javax.media.opengl.GLPbuffer glpBuffer
           
protected  Renderer3d renderer
           
protected  View view
           
 
Constructor Summary
OffscreenCanvas(Scene scene, Quality quality, javax.media.opengl.GLProfile profile, int width, int height)
           
 
Method Summary
 void addKeyListener(KeyListener listener)
           
 void addMouseListener(MouseListener listener)
           
 void addMouseMotionListener(MouseMotionListener listener)
           
 void addMouseWheelListener(MouseWheelListener listener)
           
 void dispose()
          Performs all required cleanup when destroying a Canvas.
 void forceRepaint()
          Invoked when a user requires the Canvas to be repainted (e.g. a non 3d layer has changed).
 javax.media.opengl.GLPbuffer getGlpBuffer()
           
 int getRendererHeight()
          Provide the actual renderer height for the open gl camera settings, which is obtained after a resize event.
 int getRendererWidth()
          Provide the actual renderer width for the open gl camera settings, which is obtained after a resize event.
 View getView()
          Provide a reference to the View that renders into this canvas.
protected  void initGLPBuffer(int width, int height)
           
 void removeKeyListener(KeyListener listener)
           
 void removeMouseListener(MouseListener listener)
           
 void removeMouseMotionListener(MouseMotionListener listener)
           
 void removeMouseWheelListener(MouseWheelListener listener)
           
 BufferedImage screenshot()
          Returns an image with the current renderer's size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

view

protected View view

renderer

protected Renderer3d renderer

glpBuffer

protected javax.media.opengl.GLPbuffer glpBuffer
Constructor Detail

OffscreenCanvas

public OffscreenCanvas(Scene scene,
                       Quality quality,
                       javax.media.opengl.GLProfile profile,
                       int width,
                       int height)
Method Detail

initGLPBuffer

protected void initGLPBuffer(int width,
                             int height)

getGlpBuffer

public javax.media.opengl.GLPbuffer getGlpBuffer()

dispose

public void dispose()
Description copied from interface: ICanvas
Performs all required cleanup when destroying a Canvas.

Specified by:
dispose in interface ICanvas

forceRepaint

public void forceRepaint()
Description copied from interface: ICanvas
Invoked when a user requires the Canvas to be repainted (e.g. a non 3d layer has changed).

Specified by:
forceRepaint in interface ICanvas

screenshot

public BufferedImage screenshot()
Description copied from interface: ICanvas
Returns an image with the current renderer's size

Specified by:
screenshot in interface ICanvas

getView

public View getView()
Provide a reference to the View that renders into this canvas.

Specified by:
getView in interface ICanvas

getRendererWidth

public int getRendererWidth()
Provide the actual renderer width for the open gl camera settings, which is obtained after a resize event.

Specified by:
getRendererWidth in interface ICanvas

getRendererHeight

public int getRendererHeight()
Provide the actual renderer height for the open gl camera settings, which is obtained after a resize event.

Specified by:
getRendererHeight in interface ICanvas

removeKeyListener

public void removeKeyListener(KeyListener listener)
Specified by:
removeKeyListener in interface ICanvas

removeMouseListener

public void removeMouseListener(MouseListener listener)
Specified by:
removeMouseListener in interface ICanvas

removeMouseMotionListener

public void removeMouseMotionListener(MouseMotionListener listener)
Specified by:
removeMouseMotionListener in interface ICanvas

removeMouseWheelListener

public void removeMouseWheelListener(MouseWheelListener listener)
Specified by:
removeMouseWheelListener in interface ICanvas

addKeyListener

public void addKeyListener(KeyListener listener)
Specified by:
addKeyListener in interface ICanvas

addMouseListener

public void addMouseListener(MouseListener listener)
Specified by:
addMouseListener in interface ICanvas

addMouseMotionListener

public void addMouseMotionListener(MouseMotionListener listener)
Specified by:
addMouseMotionListener in interface ICanvas

addMouseWheelListener

public void addMouseWheelListener(MouseWheelListener listener)
Specified by:
addMouseWheelListener in interface ICanvas