28 #ifndef __TextureUnitState_H__
29 #define __TextureUnitState_H__
203 const String& getTextureName(
void)
const;
265 void setCubicTextureName(
const String& name,
bool forUVW =
false );
311 void setCubicTextureName(
const String*
const names,
bool forUVW =
false );
357 void setCubicTexture(
const TexturePtr*
const texPtrs,
bool forUVW =
false );
380 void setAnimatedTextureName(
const String& name,
unsigned int numFrames,
Real duration = 0 );
403 void setAnimatedTextureName(
const String*
const names,
unsigned int numFrames,
Real duration = 0 );
407 std::pair< size_t, size_t > getTextureDimensions(
unsigned int frame = 0 )
const;
416 void setCurrentFrame(
unsigned int frameNumber );
422 unsigned int getCurrentFrame(
void)
const;
429 const String& getFrameTextureName(
unsigned int frameNumber)
const;
438 void setFrameTextureName(
const String& name,
unsigned int frameNumber);
445 void addFrameTextureName(
const String& name);
453 void deleteFrameTextureName(
const size_t frameNumber);
458 unsigned int getNumFrames(
void)
const;
480 CONTENT_COMPOSITOR = 2
492 void setBindingType(BindingType bt);
496 BindingType getBindingType(
void)
const;
503 void setContentType(ContentType ct);
505 ContentType getContentType(
void)
const;
513 bool isCubic(
void)
const;
519 bool is3D(
void)
const;
537 void setNumMipmaps(
int numMipmaps);
541 int getNumMipmaps(
void)
const;
545 void setIsAlpha(
bool isAlpha);
549 bool getIsAlpha(
void)
const;
552 void setHardwareGammaEnabled(
bool enabled);
554 bool isHardwareGammaEnabled()
const;
560 unsigned int getTextureCoordSet(
void)
const;
569 void setTextureCoordSet(
unsigned int set);
586 void setTextureTransform(
const Matrix4& xform);
595 const Matrix4& getTextureTransform(
void)
const;
609 void setTextureScroll(
Real u,
Real v);
615 void setTextureUScroll(
Real value);
617 Real getTextureUScroll(
void)
const;
623 void setTextureVScroll(
Real value);
625 Real getTextureVScroll(
void)
const;
631 void setTextureUScale(
Real value);
633 Real getTextureUScale(
void)
const;
639 void setTextureVScale(
Real value);
641 Real getTextureVScale(
void)
const;
656 void setTextureScale(
Real uScale,
Real vScale);
667 void setTextureRotate(
const Radian& angle);
669 const Radian& getTextureRotate(
void)
const;
676 const UVWAddressingMode& getTextureAddressingMode(
void)
const;
687 void setTextureAddressingMode( TextureAddressingMode tam);
695 void setTextureAddressingMode( TextureAddressingMode u,
696 TextureAddressingMode v, TextureAddressingMode w);
704 void setTextureAddressingMode(
const UVWAddressingMode& uvw);
713 void setTextureBorderColour(
const ColourValue& colour);
720 const ColourValue& getTextureBorderColour(
void)
const;
786 void setColourOperationEx(
794 Real manualBlend = 0.0);
883 Real manualBlend = 0.0);
896 void addEffect(TextureEffect& effect);
925 void setEnvironmentMap(
bool enable, EnvMapType envMapType = ENV_CURVED);
937 void setScrollAnimation(
Real uSpeed,
Real vSpeed);
947 void setRotateAnimation(
Real speed);
968 void setTransformAnimation(
const TextureTransformType ttype,
990 void setProjectiveTexturing(
bool enabled,
const Frustum* projectionSettings = 0);
994 void removeAllEffects(
void);
1001 void removeEffect(
const TextureEffectType type );
1008 bool isBlank(
void)
const;
1012 void setBlank(
void);
1023 const EffectMap& getEffects(
void)
const;
1025 Real getAnimationDuration(
void)
const;
1059 void setTextureAnisotropy(
unsigned int maxAniso);
1061 unsigned int getTextureAnisotropy()
const;
1088 void setCompositorReference(
const String& compositorName,
const String& textureName,
size_t mrtIndex = 0);
1101 void _prepare(
void);
1103 void _unprepare(
void);
1109 bool hasViewRelativeTextureCoordinateGeneration(
void)
const;
1112 bool isLoaded(
void)
const;
1114 void _notifyNeedsRecompile(
void);
1121 void setName(
const String& name);
1128 void setTextureNameAlias(
const String& name);
1150 void _notifyParent(
Pass* parent);
1153 const TexturePtr& _getTexturePtr(
void)
const;
1155 const TexturePtr& _getTexturePtr(
size_t frame)
const;
1158 void _setTexturePtr(
const TexturePtr& texptr);
1160 void _setTexturePtr(
const TexturePtr& texptr,
size_t frame);
1243 void recalcTextureMatrix(
void)
const;
1247 void createAnimController(
void);
1254 void ensurePrepared(
size_t frame)
const;
1256 void ensureLoaded(
size_t frame)
const;
void setTextureMipmapBias(float bias)
Sets the bias value applied to the mipmap calculation.
Class encapsulating a standard 4x4 homogeneous matrix.
float Real
Software floating point type.
Generate texture coords based on a frustum.
Generate all texture coords based on angle between camera and vertex.
PixelFormat mDesiredFormat
WaveformType
Enumerates the wave types usable with the Ogre engine.
float mMipmapBias
Mipmap bias (always float, not Real)
Controller< Real > * mAnimController
Controller< Real > * _getAnimController() const
Gets the animation controller (as created because of setAnimatedTexture) if it exists.
Class representing colour.
static const ColourValue White
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
Internal structure defining a texture effect.
FilterOptions mMipFilter
Texture filtering - mipmapping.
Envmap intended to supply reflection vectors for cube mapping.
FilterOptions mMinFilter
Texture filtering - minification.
multimap< TextureEffectType, TextureEffect >::type EffectMap
Texture effects in a multimap paired array.
bool isTextureLoadFailing() const
Tests if the texture associated with this unit has failed to load.
ContentType mContentType
Content type of texture (normal loaded texture, auto-texture)
SceneBlendFactor
Blending factors for manually blending objects with the scene.
BindingType
The type of unit to bind the texture settings to.
unsigned int mTextureCoordSetIndex
TextureCubeFace
Enum identifying the frame indexes for faces of a cube map (not the composite 3D type.
EnvMapType
Enumeration to specify type of envmap.
unsigned int mMaxAniso
Texture anisotropy.
Pass * getParent(void) const
Gets the parent Pass object.
Class defining a single pass of a Technique (of a Material), i.e.
the colour derived from the texture assigned to this layer
Real mAnimDuration
Duration of animation in seconds.
LayerBlendOperation
List of valid texture blending operations, for use with TextureUnitState::setColourOperation.
vector< String >::type mFrames
BindingType mBindingType
Binding type (fragment or vertex pipeline)
PixelFormat
The pixel format used for images, textures, and render surfaces.
Texture addressing mode for each texture coordinate.
TextureAddressingMode
Texture addressing modes - default is TAM_WRAP.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
size_t getReferencedMRTIndex() const
Gets the MRT index of the texture in the compositor that this texture references. ...
TextureEffectType
Definition of the broad types of texture effect you can apply to a texture unit.
Specialisation of SharedPtr to allow SharedPtr to be assigned to TexturePtr.
Envmap based on dot of vector from camera to vertex and vertex normal, good for curves.
const String & getReferencedTextureName() const
Gets the name of the texture in the compositor that this texture references.
UVWAddressingMode mAddressMode
String mCompositorRefTexName
LayerBlendSource
List of valid sources of values for blending operations used in TextureUnitState::setColourOperation ...
unsigned int mCurrentFrame
The current animation frame.
Constant u/v scrolling effect.
const String & getReferencedCompositorName() const
Gets the name of the compositor that this texture referneces.
SceneBlendFactor mColourBlendFallbackDest
ColourValue mBorderColour
FilterOptions mMagFilter
Texture filtering - magnification.
SceneBlendFactor mColourBlendFallbackSrc
const String & getName(void) const
Get the name of the Texture Unit State.
Constant u scrolling effect.
Wrapper class which indicates a given angle value is in Radians.
size_t mCompositorRefMrtIndex
The index of the referenced texture if referencing an MRT in a compositor.
TextureTransformType
Useful enumeration when dealing with procedural transforms.
TextureType
Enum identifying the texture type.
Texture wraps at values over 1.0.
the colour as built up from previous stages
2D texture, used in combination with 2D texture coordinates (default)
Constant u/v scrolling effect.
const String & getTextureNameAlias(void) const
Gets the Texture Name Alias of the Texture Unit.
LayerBlendOperationEx
Expert list of valid texture blending operations, for use with TextureUnitState::setColourOperationEx...
void retryTextureLoad()
Tells the unit to retry loading the texture if it had failed to load.
FilterOptions
Filtering options for textures / mipmaps.
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
Defines the functionality of a 3D API.
Envmap based on vector from camera to vertex position, good for planar geometry.
Controller< Real > * controller
Class representing the state of a single texture unit during a Pass of a Technique, of a Material.
LayerBlendModeEx mColourBlendMode
Class which manages blending of both colour and alpha components.
ContentType
Enum identifying the type of content this texture unit contains.
vector< TexturePtr >::type mFramePtrs
LayerBlendModeEx mAlphaBlendMode
Texture mirrors (flips) at joins over 1.0.
String mCompositorRefName
The data that references the compositor.
TextureFilterOptions
High-level filtering options providing shortcuts to settings the minification, magnification and mip ...
float getTextureMipmapBias(void) const
Gets the bias value applied to the mipmap calculation.