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 TextureDataProvider
textureDataProvider
Texture data provider.protected boolean
upToDate
True 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 void
dataUpdated()
Notify for data update.TextureDataProvider
getDataProvider()
Texture data provider getter.Texture.Filter
getMagnificationFilter()
Magnification filter getter.Texture.Filter
getMinifyingFilter()
Minifying filter getter.double
getSScaleFactor()
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.Wrap
getSWrappingMode()
Wrapping mode on the first texture coordinate getter.double
getTScaleFactor()
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.Wrap
getTWrappingMode()
Wrapping mode on the second dimension getter.boolean
isValid()
Texture validity getter.void
setDataProvider(TextureDataProvider provider)
Texture data provider setter.void
setDrawer(TextureDrawer textureDrawer)
Set the texture data provider as a drawn texture data provider.void
setMagnificationFilter(Texture.Filter magnificationFilter)
Magnification filter mode setter.void
setMinifyingFilter(Texture.Filter minifyingFilter)
Minifying filter mode setter.void
setSWrappingMode(Texture.Wrap sWrappingMode)
Wrapping mode on the first texture coordinate.void
setTWrappingMode(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:Texture
Texture validity getter.
-
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 interfaceTexture
- 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 interfaceTexture
- 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 returnnull
. For more information on wrapping mode {see Wrap}.- Specified by:
getTWrappingMode
in interfaceTexture
- 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 interfaceTexture
- 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 interfaceTexture
- 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 interfaceTexture
- Parameters:
minifyingFilter
- the new minifying filter mode.
-
getMagnificationFilter
public Texture.Filter getMagnificationFilter()
Description copied from interface:Texture
Magnification filter getter.- Specified by:
getMagnificationFilter
in interfaceTexture
- 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 interfaceTexture
- Parameters:
magnificationFilter
- the new minifying filter mode.
-
getDataProvider
public TextureDataProvider getDataProvider()
Description copied from interface:Texture
Texture data provider getter.- Specified by:
getDataProvider
in interfaceTexture
- 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 interfaceTexture
- 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.
-
dataUpdated
public void dataUpdated()
Description copied from interface:DataUser
Notify for data update.- Specified by:
dataUpdated
in interfaceDataUser
-
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 interfaceTexture
- 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 interfaceTexture
- Returns:
- the scale factor for the t-coordinate
-
-