Class JoGLDrawingTools

java.lang.Object
org.scilab.forge.scirenderer.implementation.jogl.JoGLDrawingTools
All Implemented Interfaces:
DrawingTools

public class JoGLDrawingTools extends Object implements DrawingTools
JoGl implementation of the DrawingTools.
Author:
Pierre Lando
  • Method Details

    • getCanvas

      public JoGLCanvas getCanvas()
      Description copied from interface: DrawingTools
      Return the canvas where draw is done.
      Specified by:
      getCanvas in interface DrawingTools
      Returns:
      the canvas where draw is done.
    • getGl

      public com.jogamp.opengl.GL2 getGl()
      Return the OpenGl context.
      Returns:
      the OpenGl context.
    • getGLCapacity

      public JoGLCapacity getGLCapacity()
      Return the OpenGl capacity of this canvas.
      Returns:
      the OpenGl capacity of this canvas.
    • getTransformationManager

      public TransformationManager getTransformationManager()
      Description copied from interface: DrawingTools
      Return the transformation manager.
      Specified by:
      getTransformationManager in interface DrawingTools
      Returns:
      the transformation manager.
    • getLightManager

      public LightManager getLightManager()
      Description copied from interface: DrawingTools
      Return the light manager.
      Specified by:
      getLightManager in interface DrawingTools
      Returns:
      the light manager.
    • getClippingManager

      public ClippingManager getClippingManager()
      Description copied from interface: DrawingTools
      Return the clipping manager.
      Specified by:
      getClippingManager in interface DrawingTools
      Returns:
      the clipping manager.
    • clear

      public void clear(Color color)
      Description copied from interface: DrawingTools
      Clear the canvas with the given color.
      Specified by:
      clear in interface DrawingTools
      Parameters:
      color - the color used to clear the canvas.
    • clear

      public void clear(Color color)
      Description copied from interface: DrawingTools
      Clear the canvas with the given color.
      Specified by:
      clear in interface DrawingTools
      Parameters:
      color - the color used to clear the canvas.
    • clearDepthBuffer

      public void clearDepthBuffer()
      Description copied from interface: DrawingTools
      Clear the depth buffer.
      Specified by:
      clearDepthBuffer in interface DrawingTools
    • draw

      public void draw(Renderer renderer)
      Description copied from interface: DrawingTools
      Ask the given renderer to perform a draw.
      Specified by:
      draw in interface DrawingTools
      Parameters:
      renderer - the given renderer.
    • draw

      public void draw(Geometry geometry) throws SciRendererException
      Description copied from interface: DrawingTools
      Draw the given geometry with default appearance.
      Specified by:
      draw in interface DrawingTools
      Parameters:
      geometry - the geometry to draw.
      Throws:
      SciRendererException - if the draw is not possible.
    • draw

      public void draw(Geometry geometry, Appearance appearance) throws SciRendererException
      Description copied from interface: DrawingTools
      Draw the given geometry.
      Specified by:
      draw in interface DrawingTools
      Parameters:
      geometry - the geometry to draw.
      appearance - the appearance to use.
      Throws:
      SciRendererException - if the draw is not possible.
    • draw

      public void draw(Texture texture) throws SciRendererException
      Description copied from interface: DrawingTools
      Draw the texture on XY plane in current coordinate. The texture is drawn on the rectangle [(0,0)-(texture width,texture height)].
      Specified by:
      draw in interface DrawingTools
      Parameters:
      texture - the texture to drawn.
      Throws:
      SciRendererException - if the texture is not drawable.
    • draw

      public void draw(Texture texture, AnchorPosition anchor, ElementsBuffer positions) throws SciRendererException
      Description copied from interface: DrawingTools
      Draw the given texture at all given position.
      Specified by:
      draw in interface DrawingTools
      Parameters:
      texture - the texture to draw.
      anchor - the texture anchor position.
      positions - the positions where the texture will be drawn.
      Throws:
      SciRendererException - if the texture is not drawable.
    • draw

      public void draw(Texture texture, AnchorPosition anchor, ElementsBuffer positions, double rotationAngle) throws SciRendererException
      Description copied from interface: DrawingTools
      Draw the given texture at all given position with the given rotation angle.
      Specified by:
      draw in interface DrawingTools
      Parameters:
      texture - the texture to draw.
      anchor - the texture anchor position.
      positions - the positions where the texture will be drawn.
      rotationAngle - the rotation angle.
      Throws:
      SciRendererException - if the texture is not drawable.
    • draw

      public void draw(Texture texture, AnchorPosition anchor, Vector3d position) throws SciRendererException
      Description copied from interface: DrawingTools
      Draw the given texture at given position.
      Specified by:
      draw in interface DrawingTools
      Parameters:
      texture - the texture to draw.
      anchor - the texture anchor position.
      position - the position where the texture will be drawn.
      Throws:
      SciRendererException - if the texture is not drawable.
    • draw

      public void draw(Texture texture, AnchorPosition anchor, Vector3d position, double rotationAngle) throws SciRendererException
      Description copied from interface: DrawingTools
      Draw the given texture at given position with the given rotation angle.
      Specified by:
      draw in interface DrawingTools
      Parameters:
      texture - the texture to draw.
      anchor - the texture anchor position.
      position - the position where the texture will be drawn.
      rotationAngle - the rotation angle.
      Throws:
      SciRendererException - if the texture is not drawable.
    • bind

      public void bind(Texture texture) throws SciRendererException
      Bind the given texture to the OpenGl context.
      Parameters:
      texture - the given texture.
      Throws:
      SciRendererException - is thrown if the texture is invalid.