Class AbstractTexture
- java.lang.Object
-
- org.scilab.forge.scirenderer.texture.AbstractTexture
-
- Direct Known Subclasses:
G2DTextureManager.G2DTexture,JoGLTextureManager.JoGLTexture
public class AbstractTexture extends java.lang.Object implements Texture
- Author:
- Pierre Lando
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.scilab.forge.scirenderer.texture.Texture
Texture.Filter, Texture.Wrap
-
-
Field Summary
Fields Modifier and Type Field Description protected TextureDataProvidertextureDataProviderTexture data provider.protected booleanupToDateTrue if the data are up to date.
-
Constructor Summary
Constructors Constructor Description AbstractTexture()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddataUpdated()Notify for data update.TextureDataProvidergetDataProvider()Texture data provider getter.Texture.FiltergetMagnificationFilter()Magnification filter getter.Texture.FiltergetMinifyingFilter()Minifying filter getter.doublegetSScaleFactor()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).Texture.WrapgetSWrappingMode()Wrapping mode on the first texture coordinate getter.doublegetTScaleFactor()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).Texture.WrapgetTWrappingMode()Wrapping mode on the second dimension getter.booleanisValid()Texture validity getter.voidsetDataProvider(TextureDataProvider provider)Texture data provider setter.voidsetDrawer(TextureDrawer textureDrawer)Set the texture data provider as a drawn texture data provider.voidsetMagnificationFilter(Texture.Filter magnificationFilter)Magnification filter mode setter.voidsetMinifyingFilter(Texture.Filter minifyingFilter)Minifying filter mode setter.voidsetSWrappingMode(Texture.Wrap sWrappingMode)Wrapping mode on the first texture coordinate.voidsetTWrappingMode(Texture.Wrap tWrappingMode)Wrapping mode on the second texture coordinate.
-
-
-
Field Detail
-
textureDataProvider
protected TextureDataProvider textureDataProvider
Texture data provider.
-
upToDate
protected boolean upToDate
True if the data are up to date.
-
-
Method Detail
-
isValid
public boolean isValid()
Description copied from interface:TextureTexture validity getter.
-
getSWrappingMode
public Texture.Wrap getSWrappingMode()
Description copied from interface:TextureWrapping mode on the first texture coordinate getter. For more information on wrapping mode {see Wrap}.- Specified by:
getSWrappingModein interfaceTexture- Returns:
- the wrapping mode on the first texture coordinate.
-
setSWrappingMode
public void setSWrappingMode(Texture.Wrap sWrappingMode)
Description copied from interface:TextureWrapping mode on the first texture coordinate.- Specified by:
setSWrappingModein interfaceTexture- Parameters:
sWrappingMode- the new wrapping mode on the first texture coordinate.
-
getTWrappingMode
public Texture.Wrap getTWrappingMode()
Description copied from interface:TextureWrapping mode on the second dimension getter. If the texture dimension is 1, this method will returnnull. For more information on wrapping mode {see Wrap}.- Specified by:
getTWrappingModein interfaceTexture- Returns:
- the wrapping mode on the second dimension.
-
setTWrappingMode
public void setTWrappingMode(Texture.Wrap tWrappingMode)
Description copied from interface:TextureWrapping mode on the second texture coordinate.- Specified by:
setTWrappingModein interfaceTexture- Parameters:
tWrappingMode- the new wrapping mode on the second texture coordinate.
-
getMinifyingFilter
public Texture.Filter getMinifyingFilter()
Description copied from interface:TextureMinifying filter getter.- Specified by:
getMinifyingFilterin interfaceTexture- Returns:
- the used minifying filter.
-
setMinifyingFilter
public void setMinifyingFilter(Texture.Filter minifyingFilter)
Description copied from interface:TextureMinifying filter mode setter.- Specified by:
setMinifyingFilterin interfaceTexture- Parameters:
minifyingFilter- the new minifying filter mode.
-
getMagnificationFilter
public Texture.Filter getMagnificationFilter()
Description copied from interface:TextureMagnification filter getter.- Specified by:
getMagnificationFilterin interfaceTexture- Returns:
- the used magnification filter.
-
setMagnificationFilter
public void setMagnificationFilter(Texture.Filter magnificationFilter)
Description copied from interface:TextureMagnification filter mode setter.- Specified by:
setMagnificationFilterin interfaceTexture- Parameters:
magnificationFilter- the new minifying filter mode.
-
getDataProvider
public TextureDataProvider getDataProvider()
Description copied from interface:TextureTexture data provider getter.- Specified by:
getDataProviderin interfaceTexture- Returns:
- the texture data provider.
-
setDataProvider
public void setDataProvider(TextureDataProvider provider)
Description copied from interface:TextureTexture data provider setter. The texture is set to 'no up to date'.- Specified by:
setDataProviderin interfaceTexture- Parameters:
provider- the new texture data provider.
-
setDrawer
public void setDrawer(TextureDrawer textureDrawer)
Description copied from interface:TextureSet the texture data provider as a drawn texture data provider.
-
dataUpdated
public void dataUpdated()
Description copied from interface:DataUserNotify for data update.- Specified by:
dataUpdatedin interfaceDataUser
-
getSScaleFactor
public double getSScaleFactor()
Description copied from interface:Texture2D-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:
getSScaleFactorin interfaceTexture- Returns:
- the scale factor for the s-coordinate
-
getTScaleFactor
public double getTScaleFactor()
Description copied from interface:Texture2D-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:
getTScaleFactorin interfaceTexture- Returns:
- the scale factor for the t-coordinate
-
-