org.ogre4j
Interface ITextureUnitState

All Superinterfaces:
IAllocatedObject<IResourceAllocPolicy>, INativeObject, IResourceAllocatedObject
All Known Implementing Classes:
TextureUnitState

public interface ITextureUnitState
extends INativeObject, IResourceAllocatedObject


Nested Class Summary
static interface ITextureUnitState.IEffectMap
           
static interface ITextureUnitState.ITextureEffect
           
static interface ITextureUnitState.IUVWAddressingMode
           
 
Method Summary
 void _getAnimController(IController<java.lang.Float> returnValue)
          Gets the animation controller (as created because of setAnimatedTexture) if it exists.
 ITexturePtr _getTexturePtr()
          Get the texture pointer for the current frame.
 ITexturePtr _getTexturePtr(int frame)
          Get the texture pointer for a given frame.
 void _load()
          Internal method for loading this object as part of
 void _notifyNeedsRecompile()
          Tells the class that it needs recompilation.
 void _notifyParent(IPass parent)
          Notify this object that its parent has changed
 void _prepare()
          Internal method for preparing this object for load, as part of
 void _setTexturePtr(ITexturePtr texptr)
          Set the texture pointer for the current frame (internal use only!).
 void _setTexturePtr(ITexturePtr texptr, int frame)
          Set the texture pointer for a given frame (internal use only!).
 void _unload()
          Internal method for unloading this object as part of
 void _unprepare()
          Internal method for undoing the preparation this object as part of Material::unprepare
 void addEffect(ITextureUnitState.ITextureEffect effect)
          Generic method for setting up texture effects.
 void addFrameTextureName(java.lang.String name)
          Add a name to the end of the frame container.
 boolean applyTextureAliases(IAliasTextureNamePairList aliasList, boolean apply)
          Applies texture names to Unit State with matching texture name aliases.
 void deleteFrameTextureName(int frameNumber)
          deletes a specific texture frame.
 ILayerBlendModeEx getAlphaBlendMode()
          Get multitexturing alpha blending mode.
 float getAnimationDuration()
           
 TextureUnitState.BindingType getBindingType()
          Gets the type of unit these texture settings should be bound to.
 SceneBlendFactor getColourBlendFallbackDest()
          Get the multipass fallback for colour blending operation destination factor.
 SceneBlendFactor getColourBlendFallbackSrc()
          Get the multipass fallback for colour blending operation source factor.
 ILayerBlendModeEx getColourBlendMode()
          Get multitexturing colour blending mode.
 TextureUnitState.ContentType getContentType()
          Get the type of content this references.
 long getCurrentFrame()
          Gets the active frame in an animated or multi-image texture layer.
 PixelFormat getDesiredFormat()
          Gets the desired pixel format when load the texture.
 ITextureUnitState.IEffectMap getEffects()
           
 java.lang.String getFrameTextureName(long frameNumber)
          Gets the name of the texture associated with a frame number.
 boolean getIsAlpha()
          Gets whether this texture is requested to be loaded as alpha if single channel
 java.lang.String getName()
           
 long getNumFrames()
          Gets the number of frames for a texture.
 int getNumMipmaps()
          Gets how many mipmaps have been requested for the texture.
 IPass getParent()
           
 ITextureUnitState.IUVWAddressingMode getTextureAddressingMode()
          Gets the texture addressing mode for a given coordinate, i.e. what happens at uv values above 1.0.
 long getTextureAnisotropy()
           
 IColourValue getTextureBorderColour()
          Sets the texture border colour.
 long getTextureCoordSet()
          Gets the index of the set of texture co-ords this layer uses.
 void getTextureDimensions(Ipair<java.lang.Integer,java.lang.Integer> returnValue, long frame)
          Returns the width and height of the texture in the given frame.
 FilterOptions getTextureFiltering(FilterType ftpye)
           
 float getTextureMipmapBias()
          Gets the bias value applied to the mipmap calculation.
 java.lang.String getTextureName()
          Get the name of current texture image for this layer.
 java.lang.String getTextureNameAlias()
          gets the Name Alias of the Unit.
 IRadian getTextureRotate()
           
 IMatrix4 getTextureTransform()
          Gets the current texture transformation matrix.
 TextureType getTextureType()
          Returns the type of this texture.
 float getTextureUScale()
           
 float getTextureUScroll()
           
 float getTextureVScale()
           
 float getTextureVScroll()
           
 boolean hasViewRelativeTextureCoordinateGeneration()
           
 boolean is3D()
          Returns true if this texture layer uses a composite 3D cubic texture.
 boolean isBlank()
          Determines if this texture layer is currently blank.
 boolean isCubic()
          Returns true if this texture unit is either a series of 6 2D textures, each in it's own frame, or is a full 3D cube map.
 boolean isHardwareGammaEnabled()
           
 boolean isLoaded()
           
 boolean isTextureLoadFailing()
          Tests if the texture associated with this unit has failed to load.
 ITextureUnitState operatorAssignment(ITextureUnitState oth)
           
 void removeAllEffects()
          Removes all effects applied to this texture layer.
 void removeEffect(TextureUnitState.TextureEffectType type)
          Removes a single effect applied to this texture layer.
 void retryTextureLoad()
          Tells the unit to retry loading the texture if it had failed to load.
 void setAlphaOperation(LayerBlendOperationEx op, LayerBlendSource source1, LayerBlendSource source2, float arg1, float arg2, float manualBlend)
          Sets the alpha operation to be applied to this texture.
 void setAnimatedTextureName(java.lang.String name, long numFrames, float duration)
          Sets the names of the texture images for an animated texture.
 void setBindingType(TextureUnitState.BindingType bt)
          Sets the type of unit these texture settings should be bound to.
 void setBlank()
          Sets this texture layer to be blank.
 void setColourOperation(LayerBlendOperation op)
          Determines how this texture layer is combined with the one below it (or the diffuse colour of the geometry if this is layer 0).
 void setColourOperationEx(LayerBlendOperationEx op, LayerBlendSource source1, LayerBlendSource source2, IColourValue arg1, IColourValue arg2, float manualBlend)
          Setting advanced blending options.
 void setColourOpMultipassFallback(SceneBlendFactor sourceFactor, SceneBlendFactor destFactor)
          Sets the multipass fallback operation for this layer, if you used and not enough multitexturing hardware is available.
 void setContentType(TextureUnitState.ContentType ct)
          Set the type of content this references.
 void setCubicTextureName(java.lang.String name, boolean forUVW)
          Sets this texture layer to use a combination of 6 texture maps, each one relating to a face of a cube.
 void setCurrentFrame(long frameNumber)
          Changes the active frame in an animated or multi-image texture.
 void setDesiredFormat(PixelFormat desiredFormat)
          Sets the desired pixel format when load the texture.
 void setEnvironmentMap(boolean enable, TextureUnitState.EnvMapType envMapType)
          Turns on/off texture coordinate effect that makes this layer an environment map.
 void setFrameTextureName(java.lang.String name, long frameNumber)
          Sets the name of the texture associated with a frame.
 void setHardwareGammaEnabled(boolean enabled)
           
 void setIsAlpha(boolean isAlpha)
          Sets whether this texture is requested to be loaded as alpha if single channel
 void setName(java.lang.String name)
          Set the name of the Unit State
 void setNumMipmaps(int numMipmaps)
          Sets how many mipmaps have been requested for the texture.
 void setProjectiveTexturing(boolean enabled, IFrustum projectionSettings)
          Enables or disables projective texturing on this texture unit.
 void setRotateAnimation(float speed)
          Sets up an animated texture rotation for this layer.
 void setScrollAnimation(float uSpeed, float vSpeed)
          Sets up an animated scroll for the texture layer.
 void setTextureAddressingMode(ITextureUnitState.IUVWAddressingMode uvw)
          Sets the texture addressing mode, i.e. what happens at uv values above 1.0.
 void setTextureAddressingMode(TextureUnitState.TextureAddressingMode tam)
          Sets the texture addressing mode, i.e. what happens at uv values above 1.0.
 void setTextureAddressingMode(TextureUnitState.TextureAddressingMode u, TextureUnitState.TextureAddressingMode v, TextureUnitState.TextureAddressingMode w)
          Sets the texture addressing mode, i.e. what happens at uv values above 1.0.
 void setTextureAnisotropy(long maxAniso)
          Sets the anisotropy level to be used for this texture level.
 void setTextureBorderColour(IColourValue colour)
          Sets the texture border colour.
 void setTextureCoordSet(long set)
          Sets the index of the set of texture co-ords this layer uses.
 void setTextureFiltering(FilterOptions minFilter, FilterOptions magFilter, FilterOptions mipFilter)
          Set a the detailed filtering options on this texture unit.
 void setTextureFiltering(FilterType ftype, FilterOptions opts)
          Set a single filtering option on this texture unit.
 void setTextureFiltering(TextureFilterOptions filterType)
          Set the texture filtering for this unit, using the simplified interface.
 void setTextureMipmapBias(float bias)
          Sets the bias value applied to the mipmap calculation.
 void setTextureName(java.lang.String name, TextureType ttype)
          Sets this texture layer to use a single texture, given the name of the texture to use on this layer.
 void setTextureNameAlias(java.lang.String name)
          Set the alias name used for texture frame names
 void setTextureRotate(IRadian angle)
          Sets the anticlockwise rotation factor applied to texture coordinates.
 void setTextureScale(float uScale, float vScale)
          Sets the scaling factor applied to texture coordinates.
 void setTextureScroll(float u, float v)
          Sets the translation offset of the texture, ie scrolls the texture.
 void setTextureTransform(IMatrix4 xform)
          Sets a matrix used to transform any texture coordinates on this layer.
 void setTextureUScale(float value)
          As setTextureScale, but sets only U value.
 void setTextureUScroll(float value)
          As setTextureScroll, but sets only U value.
 void setTextureVScale(float value)
          As setTextureScale, but sets only V value.
 void setTextureVScroll(float value)
          As setTextureScroll, but sets only V value.
 void setTransformAnimation(TextureUnitState.TextureTransformType ttype, WaveformType waveType, float base, float frequency, float phase, float amplitude)
          Sets up a general time-relative texture modification effect.
 
Methods inherited from interface org.xbig.base.INativeObject
delete, disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Method Detail

operatorAssignment

ITextureUnitState operatorAssignment(ITextureUnitState oth)

getTextureName

java.lang.String getTextureName()
Get the name of current texture image for this layer.


setTextureName

void setTextureName(java.lang.String name,
                    TextureType ttype)
Sets this texture layer to use a single texture, given the name of the texture to use on this layer.


setCubicTextureName

void setCubicTextureName(java.lang.String name,
                         boolean forUVW)
Sets this texture layer to use a combination of 6 texture maps, each one relating to a face of a cube.


setAnimatedTextureName

void setAnimatedTextureName(java.lang.String name,
                            long numFrames,
                            float duration)
Sets the names of the texture images for an animated texture.


getTextureDimensions

void getTextureDimensions(Ipair<java.lang.Integer,java.lang.Integer> returnValue,
                          long frame)
Returns the width and height of the texture in the given frame.


setCurrentFrame

void setCurrentFrame(long frameNumber)
Changes the active frame in an animated or multi-image texture.


getCurrentFrame

long getCurrentFrame()
Gets the active frame in an animated or multi-image texture layer.


getFrameTextureName

java.lang.String getFrameTextureName(long frameNumber)
Gets the name of the texture associated with a frame number. Throws an exception if frameNumber exceeds the number of stored frames.


setFrameTextureName

void setFrameTextureName(java.lang.String name,
                         long frameNumber)
Sets the name of the texture associated with a frame.


addFrameTextureName

void addFrameTextureName(java.lang.String name)
Add a name to the end of the frame container.


deleteFrameTextureName

void deleteFrameTextureName(int frameNumber)
deletes a specific texture frame. The texture used is not deleted but the texture will no longer be used by the Unit. An exception is raised if the frame number exceeds the number of actual frames.


getNumFrames

long getNumFrames()
Gets the number of frames for a texture.


setBindingType

void setBindingType(TextureUnitState.BindingType bt)
Sets the type of unit these texture settings should be bound to.


getBindingType

TextureUnitState.BindingType getBindingType()
Gets the type of unit these texture settings should be bound to.


setContentType

void setContentType(TextureUnitState.ContentType ct)
Set the type of content this references.


getContentType

TextureUnitState.ContentType getContentType()
Get the type of content this references.


isCubic

boolean isCubic()
Returns true if this texture unit is either a series of 6 2D textures, each in it's own frame, or is a full 3D cube map. You can tell which by checking getTextureType.


is3D

boolean is3D()
Returns true if this texture layer uses a composite 3D cubic texture.


getTextureType

TextureType getTextureType()
Returns the type of this texture.


setDesiredFormat

void setDesiredFormat(PixelFormat desiredFormat)
Sets the desired pixel format when load the texture.


getDesiredFormat

PixelFormat getDesiredFormat()
Gets the desired pixel format when load the texture.


setNumMipmaps

void setNumMipmaps(int numMipmaps)
Sets how many mipmaps have been requested for the texture.


getNumMipmaps

int getNumMipmaps()
Gets how many mipmaps have been requested for the texture.


setIsAlpha

void setIsAlpha(boolean isAlpha)
Sets whether this texture is requested to be loaded as alpha if single channel


getIsAlpha

boolean getIsAlpha()
Gets whether this texture is requested to be loaded as alpha if single channel


setHardwareGammaEnabled

void setHardwareGammaEnabled(boolean enabled)

isHardwareGammaEnabled

boolean isHardwareGammaEnabled()

getTextureCoordSet

long getTextureCoordSet()
Gets the index of the set of texture co-ords this layer uses.


setTextureCoordSet

void setTextureCoordSet(long set)
Sets the index of the set of texture co-ords this layer uses.


setTextureTransform

void setTextureTransform(IMatrix4 xform)
Sets a matrix used to transform any texture coordinates on this layer.


getTextureTransform

IMatrix4 getTextureTransform()
Gets the current texture transformation matrix.


setTextureScroll

void setTextureScroll(float u,
                      float v)
Sets the translation offset of the texture, ie scrolls the texture.


setTextureUScroll

void setTextureUScroll(float value)
As setTextureScroll, but sets only U value.


getTextureUScroll

float getTextureUScroll()

setTextureVScroll

void setTextureVScroll(float value)
As setTextureScroll, but sets only V value.


getTextureVScroll

float getTextureVScroll()

setTextureUScale

void setTextureUScale(float value)
As setTextureScale, but sets only U value.


getTextureUScale

float getTextureUScale()

setTextureVScale

void setTextureVScale(float value)
As setTextureScale, but sets only V value.


getTextureVScale

float getTextureVScale()

setTextureScale

void setTextureScale(float uScale,
                     float vScale)
Sets the scaling factor applied to texture coordinates.


setTextureRotate

void setTextureRotate(IRadian angle)
Sets the anticlockwise rotation factor applied to texture coordinates.


getTextureRotate

IRadian getTextureRotate()

getTextureAddressingMode

ITextureUnitState.IUVWAddressingMode getTextureAddressingMode()
Gets the texture addressing mode for a given coordinate, i.e. what happens at uv values above 1.0.


setTextureAddressingMode

void setTextureAddressingMode(TextureUnitState.TextureAddressingMode tam)
Sets the texture addressing mode, i.e. what happens at uv values above 1.0.


setTextureAddressingMode

void setTextureAddressingMode(TextureUnitState.TextureAddressingMode u,
                              TextureUnitState.TextureAddressingMode v,
                              TextureUnitState.TextureAddressingMode w)
Sets the texture addressing mode, i.e. what happens at uv values above 1.0.


setTextureAddressingMode

void setTextureAddressingMode(ITextureUnitState.IUVWAddressingMode uvw)
Sets the texture addressing mode, i.e. what happens at uv values above 1.0.


setTextureBorderColour

void setTextureBorderColour(IColourValue colour)
Sets the texture border colour.


getTextureBorderColour

IColourValue getTextureBorderColour()
Sets the texture border colour.


setColourOperationEx

void setColourOperationEx(LayerBlendOperationEx op,
                          LayerBlendSource source1,
                          LayerBlendSource source2,
                          IColourValue arg1,
                          IColourValue arg2,
                          float manualBlend)
Setting advanced blending options.


setColourOperation

void setColourOperation(LayerBlendOperation op)
Determines how this texture layer is combined with the one below it (or the diffuse colour of the geometry if this is layer 0).


setColourOpMultipassFallback

void setColourOpMultipassFallback(SceneBlendFactor sourceFactor,
                                  SceneBlendFactor destFactor)
Sets the multipass fallback operation for this layer, if you used and not enough multitexturing hardware is available.


getColourBlendMode

ILayerBlendModeEx getColourBlendMode()
Get multitexturing colour blending mode.


getAlphaBlendMode

ILayerBlendModeEx getAlphaBlendMode()
Get multitexturing alpha blending mode.


getColourBlendFallbackSrc

SceneBlendFactor getColourBlendFallbackSrc()
Get the multipass fallback for colour blending operation source factor.


getColourBlendFallbackDest

SceneBlendFactor getColourBlendFallbackDest()
Get the multipass fallback for colour blending operation destination factor.


setAlphaOperation

void setAlphaOperation(LayerBlendOperationEx op,
                       LayerBlendSource source1,
                       LayerBlendSource source2,
                       float arg1,
                       float arg2,
                       float manualBlend)
Sets the alpha operation to be applied to this texture.


addEffect

void addEffect(ITextureUnitState.ITextureEffect effect)
Generic method for setting up texture effects.


setEnvironmentMap

void setEnvironmentMap(boolean enable,
                       TextureUnitState.EnvMapType envMapType)
Turns on/off texture coordinate effect that makes this layer an environment map.


setScrollAnimation

void setScrollAnimation(float uSpeed,
                        float vSpeed)
Sets up an animated scroll for the texture layer.


setRotateAnimation

void setRotateAnimation(float speed)
Sets up an animated texture rotation for this layer.


setTransformAnimation

void setTransformAnimation(TextureUnitState.TextureTransformType ttype,
                           WaveformType waveType,
                           float base,
                           float frequency,
                           float phase,
                           float amplitude)
Sets up a general time-relative texture modification effect.


setProjectiveTexturing

void setProjectiveTexturing(boolean enabled,
                            IFrustum projectionSettings)
Enables or disables projective texturing on this texture unit.


removeAllEffects

void removeAllEffects()
Removes all effects applied to this texture layer.


removeEffect

void removeEffect(TextureUnitState.TextureEffectType type)
Removes a single effect applied to this texture layer.


isBlank

boolean isBlank()
Determines if this texture layer is currently blank.


setBlank

void setBlank()
Sets this texture layer to be blank.


isTextureLoadFailing

boolean isTextureLoadFailing()
Tests if the texture associated with this unit has failed to load.


retryTextureLoad

void retryTextureLoad()
Tells the unit to retry loading the texture if it had failed to load.


getEffects

ITextureUnitState.IEffectMap getEffects()

getAnimationDuration

float getAnimationDuration()

setTextureFiltering

void setTextureFiltering(TextureFilterOptions filterType)
Set the texture filtering for this unit, using the simplified interface.


setTextureFiltering

void setTextureFiltering(FilterType ftype,
                         FilterOptions opts)
Set a single filtering option on this texture unit. ftype The filtering type to set opts The filtering option to set


setTextureFiltering

void setTextureFiltering(FilterOptions minFilter,
                         FilterOptions magFilter,
                         FilterOptions mipFilter)
Set a the detailed filtering options on this texture unit. minFilter The filtering to use when reducing the size of the texture. Can be FO_POINT, FO_LINEAR or FO_ANISOTROPIC magFilter The filtering to use when increasing the size of the texture Can be FO_POINT, FO_LINEAR or FO_ANISOTROPIC mipFilter The filtering to use between mip levels Can be FO_NONE (turns off mipmapping), FO_POINT or FO_LINEAR (trilinear filtering)


getTextureFiltering

FilterOptions getTextureFiltering(FilterType ftpye)

setTextureAnisotropy

void setTextureAnisotropy(long maxAniso)
Sets the anisotropy level to be used for this texture level.


getTextureAnisotropy

long getTextureAnisotropy()

setTextureMipmapBias

void setTextureMipmapBias(float bias)
Sets the bias value applied to the mipmap calculation.


getTextureMipmapBias

float getTextureMipmapBias()
Gets the bias value applied to the mipmap calculation.


getParent

IPass getParent()

_prepare

void _prepare()
Internal method for preparing this object for load, as part of


_unprepare

void _unprepare()
Internal method for undoing the preparation this object as part of Material::unprepare


_load

void _load()
Internal method for loading this object as part of


_unload

void _unload()
Internal method for unloading this object as part of


hasViewRelativeTextureCoordinateGeneration

boolean hasViewRelativeTextureCoordinateGeneration()

isLoaded

boolean isLoaded()

_notifyNeedsRecompile

void _notifyNeedsRecompile()
Tells the class that it needs recompilation.


setName

void setName(java.lang.String name)
Set the name of the Unit State


getName

java.lang.String getName()

setTextureNameAlias

void setTextureNameAlias(java.lang.String name)
Set the alias name used for texture frame names


getTextureNameAlias

java.lang.String getTextureNameAlias()
gets the Name Alias of the Unit.


applyTextureAliases

boolean applyTextureAliases(IAliasTextureNamePairList aliasList,
                            boolean apply)
Applies texture names to Unit State with matching texture name aliases. If no matching aliases are found then the TUS state does not change.


_notifyParent

void _notifyParent(IPass parent)
Notify this object that its parent has changed


_getTexturePtr

ITexturePtr _getTexturePtr()
Get the texture pointer for the current frame.


_getTexturePtr

ITexturePtr _getTexturePtr(int frame)
Get the texture pointer for a given frame.


_setTexturePtr

void _setTexturePtr(ITexturePtr texptr)
Set the texture pointer for the current frame (internal use only!).


_setTexturePtr

void _setTexturePtr(ITexturePtr texptr,
                    int frame)
Set the texture pointer for a given frame (internal use only!).


_getAnimController

void _getAnimController(IController<java.lang.Float> returnValue)
Gets the animation controller (as created because of setAnimatedTexture) if it exists.



Copyright © 2007 netAllied GmbH. All Rights Reserved.