Go to the documentation of this file.
28 #ifndef __TextureUnitState_H__
29 #define __TextureUnitState_H__
205 const String& getTextureName(
void)
const;
267 void setCubicTextureName(
const String& name,
bool forUVW =
false );
313 void setCubicTextureName(
const String*
const names,
bool forUVW =
false );
359 void setCubicTexture(
const TexturePtr*
const texPtrs,
bool forUVW =
false );
382 void setAnimatedTextureName(
const String& name,
unsigned int numFrames,
Real duration = 0 );
405 void setAnimatedTextureName(
const String*
const names,
unsigned int numFrames,
Real duration = 0 );
409 std::pair< size_t, size_t > getTextureDimensions(
unsigned int frame = 0 )
const;
418 void setCurrentFrame(
unsigned int frameNumber );
424 unsigned int getCurrentFrame(
void)
const;
431 const String& getFrameTextureName(
unsigned int frameNumber)
const;
442 void setFrameTextureName(
const String& name,
unsigned int frameNumber);
450 void addFrameTextureName(
const String& name);
459 void deleteFrameTextureName(
const size_t frameNumber);
464 unsigned int getNumFrames(
void)
const;
479 BT_TESSELATION_HULL = 3,
481 BT_TESSELATION_DOMAIN = 4,
494 CONTENT_COMPOSITOR = 2
506 void setBindingType(BindingType bt);
510 BindingType getBindingType(
void)
const;
517 void setContentType(ContentType ct);
519 ContentType getContentType(
void)
const;
527 bool isCubic(
void)
const;
533 bool is3D(
void)
const;
551 void setNumMipmaps(
int numMipmaps);
555 int getNumMipmaps(
void)
const;
559 void setIsAlpha(
bool isAlpha);
563 bool getIsAlpha(
void)
const;
571 void setHardwareGammaEnabled(
bool enabled);
573 bool isHardwareGammaEnabled()
const;
579 unsigned int getTextureCoordSet(
void)
const;
588 void setTextureCoordSet(
unsigned int set);
605 void setTextureTransform(
const Matrix4& xform);
614 const Matrix4& getTextureTransform(
void)
const;
630 void setTextureScroll(
Real u,
Real v);
636 void setTextureUScroll(
Real value);
638 Real getTextureUScroll(
void)
const;
644 void setTextureVScroll(
Real value);
646 Real getTextureVScroll(
void)
const;
652 void setTextureUScale(
Real value);
654 Real getTextureUScale(
void)
const;
660 void setTextureVScale(
Real value);
662 Real getTextureVScale(
void)
const;
677 void setTextureScale(
Real uScale,
Real vScale);
688 void setTextureRotate(
const Radian& angle);
690 const Radian& getTextureRotate(
void)
const;
697 const UVWAddressingMode& getTextureAddressingMode(
void)
const;
712 void setTextureAddressingMode( TextureAddressingMode tam);
720 void setTextureAddressingMode( TextureAddressingMode u,
721 TextureAddressingMode v, TextureAddressingMode w);
729 void setTextureAddressingMode(
const UVWAddressingMode& uvw);
738 void setTextureBorderColour(
const ColourValue& colour);
745 const ColourValue& getTextureBorderColour(
void)
const;
811 void setColourOperationEx(
819 Real manualBlend = 0.0);
908 Real manualBlend = 0.0);
921 void addEffect(TextureEffect& effect);
949 void setEnvironmentMap(
bool enable, EnvMapType envMapType = ENV_CURVED);
961 void setScrollAnimation(
Real uSpeed,
Real vSpeed);
971 void setRotateAnimation(
Real speed);
992 void setTransformAnimation(
const TextureTransformType ttype,
1016 void setProjectiveTexturing(
bool enabled,
const Frustum* projectionSettings = 0);
1020 void removeAllEffects(
void);
1027 void removeEffect(
const TextureEffectType type );
1034 bool isBlank(
void)
const;
1038 void setBlank(
void);
1049 const EffectMap& getEffects(
void)
const;
1051 Real getAnimationDuration(
void)
const;
1086 void setTextureCompareEnabled(
bool enabled);
1087 bool getTextureCompareEnabled()
const;
1099 void setTextureAnisotropy(
unsigned int maxAniso);
1101 unsigned int getTextureAnisotropy()
const;
1132 void setCompositorReference(
const String& compositorName,
const String& textureName,
size_t mrtIndex = 0);
1145 void _prepare(
void);
1147 void _unprepare(
void);
1153 bool hasViewRelativeTextureCoordinateGeneration(
void)
const;
1156 bool isLoaded(
void)
const;
1158 void _notifyNeedsRecompile(
void);
1165 void setName(
const String& name);
1173 void setTextureNameAlias(
const String& name);
1195 void _notifyParent(
Pass* parent);
1198 const TexturePtr& _getTexturePtr(
void)
const;
1200 const TexturePtr& _getTexturePtr(
size_t frame)
const;
1203 void _setTexturePtr(
const TexturePtr& texptr);
1205 void _setTexturePtr(
const TexturePtr& texptr,
size_t frame);
1207 size_t calculateSize(
void)
const;
1295 void recalcTextureMatrix(
void)
const;
1299 void createAnimController(
void);
1306 void ensurePrepared(
size_t frame)
const;
1308 void ensureLoaded(
size_t frame)
const;
1320 #endif // __TextureUnitState_H__
Texture coordinates outside the range [0.0, 1.0] are set to the border colour.
Pass * getParent(void) const
Gets the parent Pass object.
UVWAddressingMode mAddressMode
TextureAddressingMode
Texture addressing modes - default is TAM_WRAP.
Class representing the state of a single texture unit during a Pass of a Technique,...
Defines the functionality of a 3D API.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
BindingType
The type of unit to bind the texture settings to.
bool isTextureLoadFailing() const
Tests if the texture associated with this unit has failed to load.
void setTextureMipmapBias(float bias)
Sets the bias value applied to the mipmap calculation.
LayerBlendModeEx mAlphaBlendMode
Real mAnimDuration
Duration of animation in seconds.
FilterOptions mMinFilter
Texture filtering - minification.
LayerBlendSource
List of valid sources of values for blending operations used in TextureUnitState::setColourOperation ...
const String & getTextureNameAlias(void) const
Gets the Texture Name Alias of the Texture Unit.
String mCompositorRefName
The data that references the compositor.
Envmap based on vector from camera to vertex position, good for planar geometry.
float mMipmapBias
Mipmap bias (always float, not Real).
the colour derived from the texture assigned to this layer
TextureFilterOptions
High-level filtering options providing shortcuts to settings the minification, magnification and mip ...
WaveformType
Enumerates the wave types usable with the Ogre engine.
void retryTextureLoad()
Tells the unit to retry loading the texture if it had failed to load.
FilterOptions mMipFilter
Texture filtering - mipmapping.
Class defining a single pass of a Technique (of a Material), i.e.
PixelFormat mDesiredFormat
Class which manages blending of both colour and alpha components.
BindingType mBindingType
Binding type (fragment or vertex pipeline).
Texture mirrors (flips) at joins over 1.0.
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
unsigned int mMaxAniso
Texture anisotropy.
Class encapsulating a standard 4x4 homogeneous matrix.
CompareFunction mCompareFunc
SceneBlendFactor
Blending factors for manually blending objects with the scene.
PixelFormat
The pixel format used for images, textures, and render surfaces.
Envmap based on dot of vector from camera to vertex and vertex normal, good for curves.
Controller< Real > * mAnimController
vector< TexturePtr >::type mFramePtrs
ContentType
Enum identifying the type of content this texture unit contains.
Generate texture coords based on a frustum.
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
TextureType mTextureType
Is this a series of 6 2D textures to make up a cube?
size_t mCompositorRefMrtIndex
The index of the referenced texture if referencing an MRT in a compositor.
FilterOptions
Filtering options for textures / mipmaps.
Wrapper class which indicates a given angle value is in Radians.
TextureEffectType
Definition of the broad types of texture effect you can apply to a texture unit.
FilterOptions mMagFilter
Texture filtering - magnification.
Constant u/v scrolling effect.
String mCompositorRefTexName
LayerBlendOperation
List of valid texture blending operations, for use with TextureUnitState::setColourOperation.
const String & getReferencedTextureName() const
Gets the name of the texture in the compositor that this texture references.
float getTextureMipmapBias(void) const
Gets the bias value applied to the mipmap calculation.
ContentType mContentType
Content type of texture (normal loaded texture, auto-texture).
const String & getName(void) const
Get the name of the Texture Unit State.
static const ColourValue White
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
ColourValue mBorderColour
TextureTransformType
Useful enumeration when dealing with procedural transforms.
Generate all texture coords based on angle between camera and vertex.
Class representing colour.
unsigned int mTextureCoordSetIndex
Request number of mipmaps.
the colour as built up from previous stages
Envmap intended to supply reflection vectors for cube mapping.
Constant u scrolling effect.
Texture addressing mode for each texture coordinate.
float Real
Software floating point type.
String mName
Optional name for the TUS.
TextureCubeFace
Enum identifying the frame indexes for faces of a cube map (not the composite 3D type.
Texture wraps at values over 1.0.
LayerBlendOperationEx
Expert list of valid texture blending operations, for use with TextureUnitState::setColourOperationEx...
vector< String >::type mFrames
TextureType
Enum identifying the texture type.
void setGamma(Real gamma)
Sets the gamma adjustment factor applied to this texture on loading the data.
const String & getReferencedCompositorName() const
Gets the name of the compositor that this texture referneces.
SceneBlendFactor mColourBlendFallbackSrc
Controller< Real > * controller
multimap< TextureEffectType, TextureEffect >::type EffectMap
Texture effects in a multimap paired array.
size_t getReferencedMRTIndex() const
Gets the MRT index of the texture in the compositor that this texture references.
SceneBlendFactor mColourBlendFallbackDest
2D texture, used in combination with 2D texture coordinates (default)
Controller< Real > * _getAnimController() const
Gets the animation controller (as created because of setAnimatedTexture) if it exists.
String mTextureNameAlias
Optional alias for texture frames.
unsigned int mCurrentFrame
The current animation frame.
Real getGamma() const
Returns the gamma adjustment factor applied to this texture on loading.
LayerBlendModeEx mColourBlendMode
EnvMapType
Enumeration to specify type of envmap.
Internal structure defining a texture effect.
Constant u/v scrolling effect.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.