#include <OgreTextureUnitState.h>
Public Types | |
enum | TextureEffectType { ET_ENVIRONMENT_MAP, ET_PROJECTIVE_TEXTURE, ET_SCROLL, 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 } |
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) |
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. | |
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 |
TextureAddressingMode | getTextureAddressingMode (void) const |
Gets the texture addressing mode, i.e. | |
void | setTextureAddressingMode (TextureAddressingMode tam) |
Sets the texture addressing mode, i.e. | |
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. | |
std::multimap< TextureEffectType, TextureEffect > | 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) |
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 | _notifyParent (Pass *parent) |
Notify this object that its parent has changed. | |
Protected Types | |
typedef std::multimap< TextureEffectType, TextureEffect > | EffectMap |
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 | mNumFrames |
Number of frames of animation, or frames making up cubic. | |
unsigned int | mCurrentFrame |
The xurrent animation frame. | |
Real | mAnimDuration |
Duration of animation in seconds. | |
bool | mCubic |
TextureType | mTextureType |
int | mTextureSrcMipmaps |
unsigned int | mTextureCoordSetIndex |
TextureAddressingMode | mAddressMode |
LayerBlendModeEx | colourBlendMode |
SceneBlendFactor | colourBlendFallbackSrc |
SceneBlendFactor | colourBlendFallbackDest |
LayerBlendModeEx | alphaBlendMode |
bool | mIsBlank |
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 |
String | mFrames [OGRE_MAX_TEXTURE_FRAMES] |
EffectMap | mEffects |
Pass * | mParent |
Controller< Real > * | mAnimController |
Friends | |
class | RenderSystem |
Definition at line 52 of file OgreTextureUnitState.h.
|
Definition at line 923 of file OgreTextureUnitState.h. |
|
Enumeration to specify type of envmap.
Definition at line 81 of file OgreTextureUnitState.h. |
|
Texture addressing modes - default is TAM_WRAP.
Definition at line 112 of file OgreTextureUnitState.h. |
|
Enum identifying the frame indexes for faces of a cube map (not the composite 3D type.
Definition at line 124 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 98 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.
|
|
Internal method for creating animation controller.
|
|
Internal method for creating texture effect controller.
|
|
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.
|
|
Gets the number of frames for a texture.
|
|
Gets the parent Pass object.
Definition at line 848 of file OgreTextureUnitState.h. |
|
Gets the texture addressing mode, i.e. what happens at uv values above 1.0.
|
|
|
|
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 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.
|
|
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 anisotropy level to be used for this texture level.
|
|
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.
|
|
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 891 of file OgreTextureUnitState.h. |
|
Definition at line 889 of file OgreTextureUnitState.h. |
|
Definition at line 888 of file OgreTextureUnitState.h. |
|
Definition at line 887 of file OgreTextureUnitState.h. |
|
Definition at line 885 of file OgreTextureUnitState.h. |
|
Definition at line 932 of file OgreTextureUnitState.h. |
|
Duration of animation in seconds.
Definition at line 878 of file OgreTextureUnitState.h. |
|
Definition at line 879 of file OgreTextureUnitState.h. |
|
The xurrent animation frame.
Definition at line 874 of file OgreTextureUnitState.h. |
|
Definition at line 924 of file OgreTextureUnitState.h. |
|
Definition at line 921 of file OgreTextureUnitState.h. |
|
Definition at line 892 of file OgreTextureUnitState.h. |
|
Definition at line 913 of file OgreTextureUnitState.h. |
|
Definition at line 914 of file OgreTextureUnitState.h. |
|
Texture filtering - magnification.
Definition at line 907 of file OgreTextureUnitState.h. |
|
Texture anisotropy.
Definition at line 911 of file OgreTextureUnitState.h. |
|
Texture filtering - minification.
Definition at line 905 of file OgreTextureUnitState.h. |
|
Texture filtering - mipmapping.
Definition at line 909 of file OgreTextureUnitState.h. |
|
Number of frames of animation, or frames making up cubic.
Definition at line 872 of file OgreTextureUnitState.h. |
|
Definition at line 931 of file OgreTextureUnitState.h. |
|
Definition at line 894 of file OgreTextureUnitState.h. |
|
Definition at line 897 of file OgreTextureUnitState.h. |
|
Definition at line 902 of file OgreTextureUnitState.h. |
|
Definition at line 898 of file OgreTextureUnitState.h. |
|
Definition at line 884 of file OgreTextureUnitState.h. |
|
Definition at line 882 of file OgreTextureUnitState.h. |
|
Definition at line 881 of file OgreTextureUnitState.h. |
|
Definition at line 895 of file OgreTextureUnitState.h. |
|
Definition at line 896 of file OgreTextureUnitState.h. |
|
Definition at line 901 of file OgreTextureUnitState.h. |
|
Definition at line 895 of file OgreTextureUnitState.h. |
|
Definition at line 896 of file OgreTextureUnitState.h. |
|
Definition at line 901 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 Feb 12 13:04:49 2006