Class AbstractTexture
java.lang.Object
org.scilab.forge.scirenderer.texture.AbstractTexture
- Direct Known Subclasses:
G2DTextureManager.G2DTexture
,JoGLTextureManager.JoGLTexture
- Author:
- Pierre Lando
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.scilab.forge.scirenderer.texture.Texture
Texture.Filter, Texture.Wrap
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected TextureDataProvider
Texture data provider.protected boolean
True if the data are up to date. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Notify for data update.Texture data provider getter.Magnification filter getter.Minifying filter getter.double
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).Wrapping mode on the first texture coordinate getter.double
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).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 Details
-
textureDataProvider
Texture data provider. -
upToDate
protected boolean upToDateTrue 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. -
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
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
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
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
Description copied from interface:Texture
Minifying filter getter.- Specified by:
getMinifyingFilter
in interfaceTexture
- Returns:
- the used minifying filter.
-
setMinifyingFilter
Description copied from interface:Texture
Minifying filter mode setter.- Specified by:
setMinifyingFilter
in interfaceTexture
- Parameters:
minifyingFilter
- the new minifying filter mode.
-
getMagnificationFilter
Description copied from interface:Texture
Magnification filter getter.- Specified by:
getMagnificationFilter
in interfaceTexture
- Returns:
- the used magnification filter.
-
setMagnificationFilter
Description copied from interface:Texture
Magnification filter mode setter.- Specified by:
setMagnificationFilter
in interfaceTexture
- Parameters:
magnificationFilter
- the new minifying filter mode.
-
getDataProvider
Description copied from interface:Texture
Texture data provider getter.- Specified by:
getDataProvider
in interfaceTexture
- Returns:
- the texture data provider.
-
setDataProvider
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
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
-