Class AbstractTexture

java.lang.Object
org.scilab.forge.scirenderer.texture.AbstractTexture
All Implemented Interfaces:
DataUser, Texture
Direct Known Subclasses:
G2DTextureManager.G2DTexture, JoGLTextureManager.JoGLTexture

public class AbstractTexture extends Object implements Texture
Author:
Pierre Lando
  • Field Details

    • textureDataProvider

      protected TextureDataProvider textureDataProvider
      Texture data provider.
    • upToDate

      protected boolean upToDate
      True if the data are up to date.
  • Constructor Details

    • AbstractTexture

      public AbstractTexture()
      Default constructor.
  • Method Details

    • isValid

      public boolean isValid()
      Description copied from interface: Texture
      Texture validity getter.
      Specified by:
      isValid in interface Texture
      Returns:
      true is this texture is valid and can be used for rendering.
    • getSWrappingMode

      public Texture.Wrap getSWrappingMode()
      Description copied from interface: Texture
      Wrapping mode on the first texture coordinate getter. For more information on wrapping mode {see Wrap}.
      Specified by:
      getSWrappingMode in interface Texture
      Returns:
      the wrapping mode on the first texture coordinate.
    • setSWrappingMode

      public void setSWrappingMode(Texture.Wrap sWrappingMode)
      Description copied from interface: Texture
      Wrapping mode on the first texture coordinate.
      Specified by:
      setSWrappingMode in interface Texture
      Parameters:
      sWrappingMode - the new wrapping mode on the first texture coordinate.
    • getTWrappingMode

      public Texture.Wrap getTWrappingMode()
      Description copied from interface: Texture
      Wrapping mode on the second dimension getter. If the texture dimension is 1, this method will return null. For more information on wrapping mode {see Wrap}.
      Specified by:
      getTWrappingMode in interface Texture
      Returns:
      the wrapping mode on the second dimension.
    • setTWrappingMode

      public void setTWrappingMode(Texture.Wrap tWrappingMode)
      Description copied from interface: Texture
      Wrapping mode on the second texture coordinate.
      Specified by:
      setTWrappingMode in interface Texture
      Parameters:
      tWrappingMode - the new wrapping mode on the second texture coordinate.
    • getMinifyingFilter

      public Texture.Filter getMinifyingFilter()
      Description copied from interface: Texture
      Minifying filter getter.
      Specified by:
      getMinifyingFilter in interface Texture
      Returns:
      the used minifying filter.
    • setMinifyingFilter

      public void setMinifyingFilter(Texture.Filter minifyingFilter)
      Description copied from interface: Texture
      Minifying filter mode setter.
      Specified by:
      setMinifyingFilter in interface Texture
      Parameters:
      minifyingFilter - the new minifying filter mode.
    • getMagnificationFilter

      public Texture.Filter getMagnificationFilter()
      Description copied from interface: Texture
      Magnification filter getter.
      Specified by:
      getMagnificationFilter in interface Texture
      Returns:
      the used magnification filter.
    • setMagnificationFilter

      public void setMagnificationFilter(Texture.Filter magnificationFilter)
      Description copied from interface: Texture
      Magnification filter mode setter.
      Specified by:
      setMagnificationFilter in interface Texture
      Parameters:
      magnificationFilter - the new minifying filter mode.
    • getDataProvider

      public TextureDataProvider getDataProvider()
      Description copied from interface: Texture
      Texture data provider getter.
      Specified by:
      getDataProvider in interface Texture
      Returns:
      the texture data provider.
    • setDataProvider

      public void setDataProvider(TextureDataProvider provider)
      Description copied from interface: Texture
      Texture data provider setter. The texture is set to 'no up to date'.
      Specified by:
      setDataProvider in interface Texture
      Parameters:
      provider - the new texture data provider.
    • setDrawer

      public void setDrawer(TextureDrawer textureDrawer)
      Description copied from interface: Texture
      Set the texture data provider as a drawn texture data provider.
      Specified by:
      setDrawer in interface Texture
      Parameters:
      textureDrawer - the given texture drawer.
    • dataUpdated

      public void dataUpdated()
      Description copied from interface: DataUser
      Notify for data update.
      Specified by:
      dataUpdated in interface DataUser
    • getSScaleFactor

      public double getSScaleFactor()
      Description copied from interface: Texture
      2D-Texture coordinates must be modified according to the real texture dimension which can differ from the textureSize (with certains GC, a texture must have a size which is a power-of-two).
      Specified by:
      getSScaleFactor in interface Texture
      Returns:
      the scale factor for the s-coordinate
    • getTScaleFactor

      public double getTScaleFactor()
      Description copied from interface: Texture
      2D-Texture coordinates must be modified according to the real texture dimension which can differ from the textureSize (with certains GC, a texture must have a size which is a power-of-two).
      Specified by:
      getTScaleFactor in interface Texture
      Returns:
      the scale factor for the t-coordinate