org.scilab.forge.scirenderer.texture
Class AbstractTexture

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

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
protected  TextureDataProvider textureDataProvider
          Texture data provider.
protected  boolean upToDate
          True if the data are up to date.
 
Constructor Summary
AbstractTexture()
          Default constructor.
 
Method Summary
 void dataUpdated()
          Notify for data update.
 TextureDataProvider getDataProvider()
          Texture data provider getter.
 Texture.Filter getMagnificationFilter()
          Magnification filter getter.
 Texture.Filter getMinifyingFilter()
          Minifying filter getter.
 Texture.Wrap getSWrappingMode()
          Wrapping mode on the first texture coordinate getter.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textureDataProvider

protected TextureDataProvider textureDataProvider
Texture data provider.


upToDate

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

Constructor Detail

AbstractTexture

public AbstractTexture()
Default constructor.

Method Detail

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