#include <OgreTextureUnitState.h>
Public Types | |
typedef std::multimap< TextureEffectType, TextureEffect > | EffectMap |
Texture effects in a multimap paired array. | |
enum | TextureEffectType { ET_ENVIRONMENT_MAP, ET_PROJECTIVE_TEXTURE, ET_UVSCROLL, ET_USCROLL, ET_VSCROLL, ET_ROTATE, ET_TRANSFORM } |
Definition of the broad types of texture effect you can apply to a texture unit. More... | |
enum | EnvMapType { ENV_PLANAR, ENV_CURVED, ENV_REFLECTION, ENV_NORMAL } |
Enumeration to specify type of envmap. More... | |
enum | TextureTransformType { TT_TRANSLATE_U, TT_TRANSLATE_V, TT_SCALE_U, TT_SCALE_V, TT_ROTATE } |
Useful enumeration when dealing with procedural transforms. More... | |
enum | TextureAddressingMode { TAM_WRAP, TAM_MIRROR, TAM_CLAMP, TAM_BORDER } |
Texture addressing modes - default is TAM_WRAP. More... | |
enum | TextureCubeFace { CUBE_FRONT = 0, CUBE_BACK = 1, CUBE_LEFT = 2, CUBE_RIGHT = 3, CUBE_UP = 4, CUBE_DOWN = 5 } |
Enum identifying the frame indexes for faces of a cube map (not the composite 3D type. More... | |
Public Member Functions | |
TextureUnitState (Pass *parent) | |
Default constructor. | |
TextureUnitState (Pass *parent, const TextureUnitState &oth) | |
TextureUnitState & | operator= (const TextureUnitState &oth) |
~TextureUnitState () | |
Default destructor. | |
TextureUnitState (Pass *parent, const String &texName, unsigned int texCoordSet=0) | |
Name-based constructor. | |
const String & | getTextureName (void) const |
Get the name of current texture image for this layer. | |
void | setTextureName (const String &name, TextureType ttype=TEX_TYPE_2D, int mipmaps=-1, bool isAlpha=false) |
Sets this texture layer to use a single texture, given the name of the texture to use on this layer. | |
void | setCubicTextureName (const String &name, bool forUVW=false) |
Sets this texture layer to use a combination of 6 texture maps, each one relating to a face of a cube. | |
void | setCubicTextureName (const String *const names, bool forUVW=false) |
Sets this texture layer to use a combination of 6 texture maps, each one relating to a face of a cube. | |
void | setAnimatedTextureName (const String &name, unsigned int numFrames, Real duration=0) |
Sets the names of the texture images for an animated texture. | |
void | setAnimatedTextureName (const String *const names, unsigned int numFrames, Real duration=0) |
Sets the names of the texture images for an animated texture. | |
std::pair< uint, uint > | getTextureDimensions (unsigned int frame=0) const |
Returns the width and height of the texture in the given frame. | |
void | setCurrentFrame (unsigned int frameNumber) |
Changes the active frame in an animated or multi-image texture. | |
unsigned int | getCurrentFrame (void) const |
Gets the active frame in an animated or multi-image texture layer. | |
const String & | getFrameTextureName (unsigned int frameNumber) const |
Gets the name of the texture associated with a frame number. | |
void | setFrameTextureName (const String &name, unsigned int frameNumber) |
Sets the name of the texture associated with a frame. | |
void | addFrameTextureName (const String &name) |
Add a Texture name to the end of the frame container. | |
void | deleteFrameTextureName (const size_t frameNumber) |
deletes a specific texture frame. | |
unsigned int | getNumFrames (void) const |
Gets the number of frames for a texture. | |
bool | isCubic (void) const |
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. | |
bool | is3D (void) const |
Returns true if this texture layer uses a composite 3D cubic texture. | |
TextureType | getTextureType (void) const |
Returns the type of this texture. | |
unsigned int | getTextureCoordSet (void) const |
Gets the index of the set of texture co-ords this layer uses. | |
void | setTextureCoordSet (unsigned int set) |
Sets the index of the set of texture co-ords this layer uses. | |
void | setTextureTransform (const Matrix4 &xform) |
Sets a matrix used to transform any texture coordinates on this layer. | |
const Matrix4 & | getTextureTransform (void) const |
Gets the current texture transformation matrix. | |
void | setTextureScroll (Real u, Real v) |
Sets the translation offset of the texture, ie scrolls the texture. | |
void | setTextureUScroll (Real value) |
As setTextureScroll, but sets only U value. | |
Real | getTextureUScroll (void) const |
void | setTextureVScroll (Real value) |
As setTextureScroll, but sets only V value. | |
Real | getTextureVScroll (void) const |
void | setTextureUScale (Real value) |
As setTextureScale, but sets only U value. | |
Real | getTextureUScale (void) const |
void | setTextureVScale (Real value) |
As setTextureScale, but sets only V value. | |
Real | getTextureVScale (void) const |
void | setTextureScale (Real uScale, Real vScale) |
Sets the scaling factor applied to texture coordinates. | |
void | setTextureRotate (const Radian &angle) |
Sets the anticlockwise rotation factor applied to texture coordinates. | |
const Radian & | getTextureRotate (void) const |
const UVWAddressingMode & | getTextureAddressingMode (void) const |
Gets the texture addressing mode for a given coordinate, i.e. | |
void | setTextureAddressingMode (TextureAddressingMode tam) |
Sets the texture addressing mode, i.e. | |
void | setTextureAddressingMode (TextureAddressingMode u, TextureAddressingMode v, TextureAddressingMode w) |
Sets the texture addressing mode, i.e. | |
void | setTextureAddressingMode (const UVWAddressingMode &uvw) |
Sets the texture addressing mode, i.e. | |
void | setTextureBorderColour (const ColourValue &colour) |
Sets the texture border colour. | |
const ColourValue & | getTextureBorderColour (void) const |
Sets the texture border colour. | |
void | setColourOperationEx (LayerBlendOperationEx op, LayerBlendSource source1=LBS_TEXTURE, LayerBlendSource source2=LBS_CURRENT, const ColourValue &arg1=ColourValue::White, const ColourValue &arg2=ColourValue::White, Real manualBlend=0.0) |
Setting advanced blending options. | |
void | setColourOperation (const 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 | setColourOpMultipassFallback (const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor) |
Sets the multipass fallback operation for this layer, if you used TextureUnitState::setColourOperationEx and not enough multitexturing hardware is available. | |
const LayerBlendModeEx & | getColourBlendMode (void) const |
Get multitexturing colour blending mode. | |
const LayerBlendModeEx & | getAlphaBlendMode (void) const |
Get multitexturing alpha blending mode. | |
SceneBlendFactor | getColourBlendFallbackSrc (void) const |
Get the multipass fallback for colour blending operation source factor. | |
SceneBlendFactor | getColourBlendFallbackDest (void) const |
Get the multipass fallback for colour blending operation destination factor. | |
void | setAlphaOperation (LayerBlendOperationEx op, LayerBlendSource source1=LBS_TEXTURE, LayerBlendSource source2=LBS_CURRENT, Real arg1=1.0, Real arg2=1.0, Real manualBlend=0.0) |
Sets the alpha operation to be applied to this texture. | |
void | addEffect (TextureEffect &effect) |
Generic method for setting up texture effects. | |
void | setEnvironmentMap (bool enable, EnvMapType envMapType=ENV_CURVED) |
Turns on/off texture coordinate effect that makes this layer an environment map. | |
void | setScrollAnimation (Real uSpeed, Real vSpeed) |
Sets up an animated scroll for the texture layer. | |
void | setRotateAnimation (Real speed) |
Sets up an animated texture rotation for this layer. | |
void | setTransformAnimation (const TextureTransformType ttype, const WaveformType waveType, Real base=0, Real frequency=1, Real phase=0, Real amplitude=1) |
Sets up a general time-relative texture modification effect. | |
void | setProjectiveTexturing (bool enabled, const Frustum *projectionSettings=0) |
Enables or disables projective texturing on this texture unit. | |
void | removeAllEffects (void) |
Removes all effects applied to this texture layer. | |
void | removeEffect (const TextureEffectType type) |
Removes a single effect applied to this texture layer. | |
bool | isBlank (void) const |
Determines if this texture layer is currently blank. | |
void | setBlank (void) |
Sets this texture layer to be blank. | |
const EffectMap & | getEffects (void) const |
Real | getAnimationDuration (void) const |
void | setTextureFiltering (TextureFilterOptions filterType) |
Set the texture filtering for this unit, using the simplified interface. | |
void | setTextureFiltering (FilterType ftype, FilterOptions opts) |
Set a single filtering option on this texture unit. | |
void | setTextureFiltering (FilterOptions minFilter, FilterOptions magFilter, FilterOptions mipFilter) |
Set a the detailed filtering options on this texture unit. | |
FilterOptions | getTextureFiltering (FilterType ftpye) const |
void | setTextureAnisotropy (unsigned int maxAniso) |
Sets the anisotropy level to be used for this texture level. | |
unsigned int | getTextureAnisotropy () const |
Pass * | getParent (void) const |
Gets the parent Pass object. | |
void | _load (void) |
Internal method for loading this object as part of Material::load. | |
void | _unload (void) |
Internal method for unloading this object as part of Material::unload. | |
bool | hasViewRelativeTextureCoordinateGeneration (void) |
Returns whether this unit has texture coordinate generation that depends on the camera. | |
bool | isLoaded (void) |
void | _notifyNeedsRecompile (void) |
Tells the class that it needs recompilation. | |
void | setName (const String &name) |
Set the name of the Texture Unit State. | |
const String & | getName (void) const |
get the name of the Texture Unit State | |
void | setTextureNameAlias (const String &name) |
Set the alias name used for texture frame names. | |
const String & | getTextureNameAlias (void) const |
gets the Texture Name Alias of the Texture Unit. | |
bool | applyTextureAliases (const AliasTextureNamePairList &aliasList, const bool apply=true) |
Applies texture names to Texture Unit State with matching texture name aliases. | |
void | _notifyParent (Pass *parent) |
Notify this object that its parent has changed. | |
Protected Member Functions | |
void | recalcTextureMatrix (void) const |
Internal method for calculating texture matrix. | |
void | createAnimController (void) |
Internal method for creating animation controller. | |
void | createEffectController (TextureEffect &effect) |
Internal method for creating texture effect controller. | |
Protected Attributes | |
unsigned int | mCurrentFrame |
The current animation frame. | |
Real | mAnimDuration |
Duration of animation in seconds. | |
bool | mCubic |
TextureType | mTextureType |
int | mTextureSrcMipmaps |
unsigned int | mTextureCoordSetIndex |
UVWAddressingMode | mAddressMode |
ColourValue | mBorderColour |
LayerBlendModeEx | colourBlendMode |
SceneBlendFactor | colourBlendFallbackSrc |
SceneBlendFactor | colourBlendFallbackDest |
LayerBlendModeEx | alphaBlendMode |
bool | mIsBlank |
bool | mIsAlpha |
bool | mRecalcTexMatrix |
Real | mUMod |
Real | mVMod |
Real | mUScale |
Real | mVScale |
Radian | mRotate |
Matrix4 | mTexModMatrix |
Real | mUScrollAnim |
Real | mVScrollAnim |
Real | mRotateAnim |
FilterOptions | mMinFilter |
Texture filtering - minification. | |
FilterOptions | mMagFilter |
Texture filtering - magnification. | |
FilterOptions | mMipFilter |
Texture filtering - mipmapping. | |
unsigned int | mMaxAniso |
Texture anisotropy. | |
bool | mIsDefaultAniso |
bool | mIsDefaultFiltering |
std::vector< String > | mFrames |
String | mName |
String | mTextureNameAlias |
EffectMap | mEffects |
Pass * | mParent |
Controller< Real > * | mAnimController |
Friends | |
class | RenderSystem |
Definition at line 52 of file OgreTextureUnitState.h.
|
Texture effects in a multimap paired array.
Definition at line 163 of file OgreTextureUnitState.h. |
|
Enumeration to specify type of envmap.
Definition at line 85 of file OgreTextureUnitState.h. |
|
Texture addressing modes - default is TAM_WRAP.
Definition at line 116 of file OgreTextureUnitState.h. |
|
Enum identifying the frame indexes for faces of a cube map (not the composite 3D type.
Definition at line 136 of file OgreTextureUnitState.h. |
|
Definition of the broad types of texture effect you can apply to a texture unit.
Definition at line 61 of file OgreTextureUnitState.h. |
|
Useful enumeration when dealing with procedural transforms.
Definition at line 102 of file OgreTextureUnitState.h. |
|
Default constructor.
|
|
|
|
Default destructor.
|
|
Name-based constructor.
|
|
Internal method for loading this object as part of Material::load.
|
|
Tells the class that it needs recompilation.
|
|
Notify this object that its parent has changed.
|
|
Internal method for unloading this object as part of Material::unload.
|
|
Generic method for setting up texture effects.
|
|
Add a Texture name to the end of the frame container.
|
|
Applies texture names to Texture Unit State with matching texture name aliases. If no matching aliases are found then the TUS state does not change.
|
|
Internal method for creating animation controller.
|
|
Internal method for creating texture effect controller.
|
|
deletes a specific texture frame. The texture used is not deleted but the texture will no longer be used by the Texture Unit. An exception is raised if the frame number exceeds the number of actual frames.
|
|
Get multitexturing alpha blending mode.
|
|
|
|
Get the multipass fallback for colour blending operation destination factor.
|
|
Get the multipass fallback for colour blending operation source factor.
|
|
Get multitexturing colour blending mode.
|
|
Gets the active frame in an animated or multi-image texture layer.
|
|
|
|
Gets the name of the texture associated with a frame number. Throws an exception if frameNumber exceeds the number of stored frames.
|
|
get the name of the Texture Unit State
Definition at line 945 of file OgreTextureUnitState.h. References Ogre::String. |
|
Gets the number of frames for a texture.
|
|
Gets the parent Pass object.
Definition at line 924 of file OgreTextureUnitState.h. |
|
Gets the texture addressing mode for a given coordinate, i.e. what happens at uv values above 1.0.
|
|
|
|
Sets the texture border colour.
|
|
Gets the index of the set of texture co-ords this layer uses.
|
|
Returns the width and height of the texture in the given frame.
|
|
|
|
Get the name of current texture image for this layer.
|
|
gets the Texture Name Alias of the Texture Unit.
Definition at line 953 of file OgreTextureUnitState.h. References Ogre::String. |
|
|
|
Gets the current texture transformation matrix.
|
|
Returns the type of this texture.
|
|
|
|
|
|
|
|
|
|
Returns whether this unit has texture coordinate generation that depends on the camera.
|
|
Returns true if this texture layer uses a composite 3D cubic texture.
|
|
Determines if this texture layer is currently blank.
|
|
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.
|
|
|
|
|
|
Internal method for calculating texture matrix.
|
|
Removes all effects applied to this texture layer.
|
|
Removes a single effect applied to this texture layer.
|
|
Sets the alpha operation to be applied to this texture.
|
|
Sets the names of the texture images for an animated texture.
|
|
Sets the names of the texture images for an animated texture.
|
|
Sets this texture layer to be blank.
|
|
Determines how this texture layer is combined with the one below it (or the diffuse colour of the geometry if this is layer 0).
|
|
Setting advanced blending options.
|
|
Sets the multipass fallback operation for this layer, if you used TextureUnitState::setColourOperationEx and not enough multitexturing hardware is available.
|
|
Sets this texture layer to use a combination of 6 texture maps, each one relating to a face of a cube.
|
|
Sets this texture layer to use a combination of 6 texture maps, each one relating to a face of a cube.
|
|
Changes the active frame in an animated or multi-image texture.
|
|
Turns on/off texture coordinate effect that makes this layer an environment map.
|
|
Sets the name of the texture associated with a frame.
|
|
Set the name of the Texture Unit State.
|
|
Enables or disables projective texturing on this texture unit.
|
|
Sets up an animated texture rotation for this layer.
|
|
Sets up an animated scroll for the texture layer.
|
|
Sets the texture addressing mode, i.e. what happens at uv values above 1.0.
|
|
Sets the texture addressing mode, i.e. what happens at uv values above 1.0.
|
|
Sets the texture addressing mode, i.e. what happens at uv values above 1.0.
|
|
Sets the anisotropy level to be used for this texture level.
|
|
Sets the texture border colour.
|
|
Sets the index of the set of texture co-ords this layer uses.
|
|
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) |
|
Set a single filtering option on this texture unit. ftype The filtering type to set opts The filtering option to set |
|
Set the texture filtering for this unit, using the simplified interface.
|
|
Sets this texture layer to use a single texture, given the name of the texture to use on this layer.
|
|
Set the alias name used for texture frame names.
|
|
Sets the anticlockwise rotation factor applied to texture coordinates.
|
|
Sets the scaling factor applied to texture coordinates.
|
|
Sets the translation offset of the texture, ie scrolls the texture.
|
|
Sets a matrix used to transform any texture coordinates on this layer.
|
|
As setTextureScale, but sets only U value.
|
|
As setTextureScroll, but sets only U value.
|
|
As setTextureScale, but sets only V value.
|
|
As setTextureScroll, but sets only V value.
|
|
Sets up a general time-relative texture modification effect.
|
|
Definition at line 54 of file OgreTextureUnitState.h. |
|
Definition at line 994 of file OgreTextureUnitState.h. |
|
Definition at line 992 of file OgreTextureUnitState.h. |
|
Definition at line 991 of file OgreTextureUnitState.h. |
|
Definition at line 990 of file OgreTextureUnitState.h. |
|
Definition at line 987 of file OgreTextureUnitState.h. |
|
Definition at line 1036 of file OgreTextureUnitState.h. |
|
Duration of animation in seconds.
Definition at line 980 of file OgreTextureUnitState.h. |
|
Definition at line 988 of file OgreTextureUnitState.h. |
|
Definition at line 981 of file OgreTextureUnitState.h. |
|
The current animation frame.
Definition at line 977 of file OgreTextureUnitState.h. |
|
Definition at line 1028 of file OgreTextureUnitState.h. |
|
Definition at line 1025 of file OgreTextureUnitState.h. |
|
Definition at line 996 of file OgreTextureUnitState.h. |
|
Definition at line 995 of file OgreTextureUnitState.h. |
|
Definition at line 1017 of file OgreTextureUnitState.h. |
|
Definition at line 1018 of file OgreTextureUnitState.h. |
|
Texture filtering - magnification.
Definition at line 1011 of file OgreTextureUnitState.h. |
|
Texture anisotropy.
Definition at line 1015 of file OgreTextureUnitState.h. |
|
Texture filtering - minification.
Definition at line 1009 of file OgreTextureUnitState.h. |
|
Texture filtering - mipmapping.
Definition at line 1013 of file OgreTextureUnitState.h. |
|
Definition at line 1026 of file OgreTextureUnitState.h. |
|
Definition at line 1035 of file OgreTextureUnitState.h. |
|
Definition at line 998 of file OgreTextureUnitState.h. |
|
Definition at line 1001 of file OgreTextureUnitState.h. |
|
Definition at line 1006 of file OgreTextureUnitState.h. |
|
Definition at line 1002 of file OgreTextureUnitState.h. |
|
Definition at line 986 of file OgreTextureUnitState.h. |
|
Definition at line 1027 of file OgreTextureUnitState.h. |
|
Definition at line 984 of file OgreTextureUnitState.h. |
|
Definition at line 983 of file OgreTextureUnitState.h. |
|
Definition at line 999 of file OgreTextureUnitState.h. |
|
Definition at line 1000 of file OgreTextureUnitState.h. |
|
Definition at line 1005 of file OgreTextureUnitState.h. |
|
Definition at line 999 of file OgreTextureUnitState.h. |
|
Definition at line 1000 of file OgreTextureUnitState.h. |
|
Definition at line 1005 of file OgreTextureUnitState.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:45:49 2006