org.scilab.forge.scirenderer.implementation.jogl.sprite
Class QuadsTextureRenderer

java.lang.Object
  extended by org.scilab.forge.scirenderer.implementation.jogl.sprite.QuadsTextureRenderer

public class QuadsTextureRenderer
extends java.lang.Object

Author:
Pierre Lando

Method Summary
protected  void bindTexture(javax.media.opengl.GL gl)
          Bind the texture.
 void dispose(JoGLDrawingTools drawingTools)
          Ask this sprite to dispose.
 void draw(JoGLDrawingTools drawingTools, SpriteAnchorPosition anchor, ElementsBuffer positions)
           
 void draw(JoGLDrawingTools drawingTools, SpriteAnchorPosition anchor, Vector3d position)
          Draw this sprite with the given drawing tools at the given position.
protected  float getAnchorDeltaX(SpriteAnchorPosition anchor)
          Return the deltaX to apply to the sprite in regards to the given anchor.
protected  float getAnchorDeltaY(SpriteAnchorPosition anchor)
          Return the deltaY to apply to the sprite in regards to the given anchor.
protected  TextureBufferedImage getImage()
          Return the image.
protected  org.scilab.forge.scirenderer.implementation.jogl.sprite.JoGLSprite getSprite()
          Return the sprite.
 void reload()
          Ask the sprite to reset the OpenGl status.
protected  void update(javax.media.opengl.GL gl)
          Update the texture.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

draw

public void draw(JoGLDrawingTools drawingTools,
                 SpriteAnchorPosition anchor,
                 ElementsBuffer positions)

draw

public void draw(JoGLDrawingTools drawingTools,
                 SpriteAnchorPosition anchor,
                 Vector3d position)
Draw this sprite with the given drawing tools at the given position.

Parameters:
drawingTools - the drawing tools to use.
anchor - anchor position.
position - the position.

dispose

public void dispose(JoGLDrawingTools drawingTools)
Ask this sprite to dispose.

Parameters:
drawingTools - the drawing tools to use.

reload

public void reload()
Ask the sprite to reset the OpenGl status.


update

protected void update(javax.media.opengl.GL gl)
Update the texture.

Parameters:
gl - the current OpenGl context.

bindTexture

protected void bindTexture(javax.media.opengl.GL gl)
Bind the texture. Create it if it wasn't.

Parameters:
gl - the OpenGl context.

getImage

protected TextureBufferedImage getImage()
Return the image.

Returns:
the image.

getSprite

protected org.scilab.forge.scirenderer.implementation.jogl.sprite.JoGLSprite getSprite()
Return the sprite.

Returns:
the sprite.

getAnchorDeltaX

protected float getAnchorDeltaX(SpriteAnchorPosition anchor)
Return the deltaX to apply to the sprite in regards to the given anchor.

Parameters:
anchor - the given anchor.
Returns:
the deltaX to apply to the sprite in regards to the given anchor.

getAnchorDeltaY

protected float getAnchorDeltaY(SpriteAnchorPosition anchor)
Return the deltaY to apply to the sprite in regards to the given anchor.

Parameters:
anchor - the given anchor.
Returns:
the deltaY to apply to the sprite in regards to the given anchor.