org.scilab.forge.scirenderer.implementation.jogl
Class JoGLCanvas

java.lang.Object
  extended by org.scilab.forge.scirenderer.implementation.jogl.JoGLCanvas
All Implemented Interfaces:
Canvas

public final class JoGLCanvas
extends java.lang.Object
implements Canvas

JoGL implementation of a Canvas.

Author:
Pierre Lando

Method Summary
 void destroy()
          Destroy the GLPbuffer
 void display(GLAutoDrawable glAutoDrawable)
           
 void dispose(GLAutoDrawable drawable)
           
 int getAntiAliasingLevel()
          Anti-aliasing level getter.
 JoGLBuffersManager getBuffersManager()
          Return the buffers manager of this canvas.
 java.awt.Dimension getDimension()
          Return the canvas dimension.
 GL2 getGl()
          Return the OpenGl context.
 int getHeight()
          Return the canvas height.
 java.awt.image.BufferedImage getImage()
          Get an image from the autoDrawable
 JoGLParameters getJoGLParameters()
          Return the rendering parameters.
 Drawer getMainDrawer()
          Return the canvas main drawer.
 PickingManager getPickingManager()
          Return the picking manager.
 JoGLRendererManager getRendererManager()
          Return the renderer manager.
 JoGLTextureManager getTextureManager()
          Texture manger getter.
 int getWidth()
          Return the canvas width.
 void init(GLAutoDrawable glAutoDrawable)
           
 void redraw()
          Ask the canvas to perform asynchronous drawing.
 void reshape(GLAutoDrawable glAutoDrawable, int x, int y, int width, int height)
           
 void setAntiAliasingLevel(int antiAliasingLevel)
          Anti-aliasing level setter.
 void setDebugMode(boolean debug)
           
 void setMainDrawer(Drawer mainDrawer)
          Set this canvas main drawer.
 void waitImage()
          Wait until a drawing has been performed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setDebugMode

public void setDebugMode(boolean debug)

setMainDrawer

public void setMainDrawer(Drawer mainDrawer)
Description copied from interface: Canvas
Set this canvas main drawer.

Specified by:
setMainDrawer in interface Canvas
Parameters:
mainDrawer - the new canvas main drawer.

getMainDrawer

public Drawer getMainDrawer()
Description copied from interface: Canvas
Return the canvas main drawer.

Specified by:
getMainDrawer in interface Canvas
Returns:
the canvas main drawer.

getRendererManager

public JoGLRendererManager getRendererManager()
Description copied from interface: Canvas
Return the renderer manager.

Specified by:
getRendererManager in interface Canvas
Returns:
the renderer manager.

getBuffersManager

public JoGLBuffersManager getBuffersManager()
Description copied from interface: Canvas
Return the buffers manager of this canvas.

Specified by:
getBuffersManager in interface Canvas
Returns:
the buffers manager of this canvas.

getPickingManager

public PickingManager getPickingManager()
Description copied from interface: Canvas
Return the picking manager.

Specified by:
getPickingManager in interface Canvas
Returns:
the picking manager.

getTextureManager

public JoGLTextureManager getTextureManager()
Description copied from interface: Canvas
Texture manger getter.

Specified by:
getTextureManager in interface Canvas
Returns:
the texture manager.

getWidth

public int getWidth()
Description copied from interface: Canvas
Return the canvas width.

Specified by:
getWidth in interface Canvas
Returns:
the canvas width.

getHeight

public int getHeight()
Description copied from interface: Canvas
Return the canvas height.

Specified by:
getHeight in interface Canvas
Returns:
the canvas height.

getDimension

public java.awt.Dimension getDimension()
Description copied from interface: Canvas
Return the canvas dimension.

Specified by:
getDimension in interface Canvas
Returns:
the canvas dimension.

redraw

public void redraw()
Description copied from interface: Canvas
Ask the canvas to perform asynchronous drawing.

Specified by:
redraw in interface Canvas

waitImage

public void waitImage()
Description copied from interface: Canvas
Wait until a drawing has been performed

Specified by:
waitImage in interface Canvas

getAntiAliasingLevel

public int getAntiAliasingLevel()
Anti-aliasing level getter. - 0 for 1x - 1 for 2x - 2 for 4x - 3 for 8x - 4 for 16x

Returns:
the anti-aliasing level.

setAntiAliasingLevel

public void setAntiAliasingLevel(int antiAliasingLevel)
Anti-aliasing level setter. - 0 for 1x - 1 for 2x - 2 for 4x - 3 for 8x - 4 for 16x

Parameters:
antiAliasingLevel - the new level.

getGl

public GL2 getGl()
Return the OpenGl context.

Returns:
the OpenGl context.

getJoGLParameters

public JoGLParameters getJoGLParameters()
Return the rendering parameters.

Returns:
the rendering parameters.

getImage

public java.awt.image.BufferedImage getImage()
Get an image from the autoDrawable

Returns:
an image

destroy

public void destroy()
Destroy the GLPbuffer

Specified by:
destroy in interface Canvas

display

public void display(GLAutoDrawable glAutoDrawable)

init

public void init(GLAutoDrawable glAutoDrawable)

reshape

public void reshape(GLAutoDrawable glAutoDrawable,
                    int x,
                    int y,
                    int width,
                    int height)

dispose

public void dispose(GLAutoDrawable drawable)