#include <OGREInterfaces.h>
Inherits DigitalSpaces::DIObjectBase.
Public Member Functions | |
| const char * | getTextureName () |
| Get the name of current texture image for this layer. | |
| void | setTextureName (const char *name, OGRETextureType ttype=TEX_TYPE_2D) |
| Sets this texture layer to use a single texture, given the name of the texture to use on this layer. | |
| void | setCubicTextureName (const char *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 | setAnimatedTextureName (const char *name, unsigned int numFrames, float duration=0) |
| Sets the names of the texture images for an animated texture. | |
| void | getTextureDimensions (unsigned int *x_out, unsigned int *y_out, unsigned int frame=0) |
| 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 () |
| Gets the active frame in an animated or multi-image texture layer. | |
| const char * | getFrameTextureName (unsigned int frameNumber) |
| Gets the name of the texture associated with a frame. | |
| unsigned int | getNumFrames () |
| Gets the number of frames for a texture. | |
| bool | 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. | |
| bool | is3D () |
| Returns true if this texture layer uses a composite 3D cubic texture. | |
| OGRETextureType | getTextureType () |
| Returns the type of this texture. | |
| unsigned int | getTextureCoordSet () |
| 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 (in_Matrix4f *xform) |
| Sets a matrix used to transform any texture coordinates on this layer. | |
| void | getTextureTransform (out_Matrix4f *xform) |
| Gets the current texture transformation matrix. | |
| void | setTextureScroll (float u, float v) |
| Sets the translation offset of the texture, ie scrolls the texture. | |
| void | setTextureUScroll (float value) |
| As setTextureScroll, but sets only U value. | |
| float | getTextureUScroll () |
| void | setTextureVScroll (float value) |
| As setTextureScroll, but sets only V value. | |
| float | getTextureVScroll () |
| void | setTextureUScale (float value) |
| As setTextureScale, but sets only U value. | |
| float | getTextureUScale () |
| void | setTextureVScale (float value) |
| As setTextureScale, but sets only V value. | |
| float | getTextureVScale () |
| void | setTextureScale (float uScale, float vScale) |
| Sets the scaling factor applied to texture coordinates. | |
| void | setTextureRotateRadians (const float angle) |
| Sets the anticlockwise rotation factor applied to texture coordinates. | |
| float | getTextureRotateRadians () |
| OGRETextureAddressingMode | getTextureAddressingModeU () |
| Gets the texture addressing mode, i.e. | |
| OGRETextureAddressingMode | getTextureAddressingModeV () |
| OGRETextureAddressingMode | getTextureAddressingModeW () |
| void | setTextureAddressingMode (OGRETextureAddressingMode tam) |
| Sets the texture addressing mode, i.e. | |
| void | setColourOperationEx (OGRELayerBlendOperationEx op, OGRELayerBlendSource source1, OGRELayerBlendSource source2, in_Vector3f *arg1, in_Vector3f *arg2, float manualBlend) |
| Setting advanced blending options. | |
| void | setColourOperation (const OGRELayerBlendOperation 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 OGRESceneBlendFactor sourceFactor, const OGRESceneBlendFactor destFactor) |
| Sets the multipass fallback operation for this layer, if you used TextureUnitState::setColourOperationEx and not enough multitexturing hardware is available. | |
| DIOGRELayerBlendModeEx * | getColourBlendMode () |
| Get multitexturing colour blending mode. | |
| DIOGRELayerBlendModeEx * | getAlphaBlendMode () |
| Get multitexturing alpha blending mode. | |
| OGRESceneBlendFactor | getColourBlendFallbackSrc () |
| Get the multipass fallback for colour blending operation source factor. | |
| OGRESceneBlendFactor | getColourBlendFallbackDest () |
| Get the multipass fallback for colour blending operation destination factor. | |
| void | setAlphaOperation (OGRELayerBlendOperationEx op, OGRELayerBlendSource source1=LBS_TEXTURE, OGRELayerBlendSource source2=LBS_CURRENT, float arg1=1.0, float arg2=1.0, float manualBlend=0.0) |
| Sets the alpha operation to be applied to this texture. | |
| void | setEnvironmentMap (bool enable, OGREEnvMapType envMapType=ENV_CURVED) |
| Turns on/off texture coordinate effect that makes this layer an environment map. | |
| void | setScrollAnimation (float uSpeed, float vSpeed) |
| Sets up an animated scroll for the texture layer. | |
| void | setRotateAnimation (float speed) |
| Sets up an animated texture rotation for this layer. | |
| void | setTransformAnimation (const OGRETextureTransformType ttype, const OGREWaveformType waveType, float base=0, float frequency=1, float phase=0, float amplitude=1) |
| Sets up a general time-relative texture modification effect. | |
| void | setProjectiveTexturing (bool enabled, const DIOGREFrustum *projectionSettings=0) |
| Enables or disables projective texturing on this texture unit. | |
| void | removeAllEffects () |
| Removes all effects applied to this texture layer. | |
| void | removeEffect (const OGRETextureEffectType type) |
| Removes a single effect applied to this texture layer. | |
| bool | isBlank () |
| Determines if this texture layer is currently blank. | |
| void | setBlank () |
| Sets this texture layer to be blank. | |
| float | getAnimationDuration () |
| void | setTextureFiltering (OGRETextureFilterOptions filterType) |
| Set the texture filtering for this unit, using the simplified interface. | |
| void | setTextureFiltering (OGREFilterType ftype, OGREFilterOptions opts) |
| Set a single filtering option on this texture unit. | |
| void | setTextureFiltering (OGREFilterOptions minFilter, OGREFilterOptions magFilter, OGREFilterOptions mipFilter) |
| Set a the detailed filtering options on this texture unit. | |
| OGREFilterOptions | getTextureFiltering (OGREFilterType ftpye) |
| void | setTextureAnisotropy (unsigned int maxAniso) |
| Sets the anisotropy level to be used for this texture level. | |
| unsigned int | getTextureAnisotropy () |
| DIOGREPass * | getParent () |
| Gets the parent Pass object. | |
| bool | hasViewRelativeTextureCoordinateGeneration () |
| Returns whether this unit has texture coordinate generation that depends on the camera. | |
| const char* DigitalSpaces::DIOGRETextureUnitState::getTextureName | ( | ) |
Get the name of current texture image for this layer.
| void DigitalSpaces::DIOGRETextureUnitState::setTextureName | ( | const char * | name, | |
| OGRETextureType | ttype = TEX_TYPE_2D | |||
| ) |
Sets this texture layer to use a single texture, given the name of the texture to use on this layer.
| void DigitalSpaces::DIOGRETextureUnitState::setCubicTextureName | ( | const char * | 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.
for cubic environment maps, the 6 textures are combined into a single 'cubic' texture map which is then addressed using 3D texture coordinates. This is required because you don't know what face of the box you're going to need to address when you render an object, and typically you need to reflect more than one face on the one object, so all 6 textures are needed to be 'active' at once. Cubic environment maps are enabled by calling this method with the forUVW parameter set to true, and then calling setEnvironmentMap(true).
Note that not all cards support cubic environment mapping.
for skyboxes, the 6 textures are kept separate and used independently for each face of the skybox. This is done because not all cards support 3D cubic maps and skyboxes do not need to use 3D texture coordinates so it is simpler to render each face of the box with 2D coordinates, changing texture between faces.
Skyboxes are created by calling SceneManager::setSkyBox.
| name | The basic name of the texture e.g. brickwall.jpg, stonefloor.png. There must be 6 versions of this texture with the suffixes _fr, _bk, _up, _dn, _lf, and _rt (before the extension) which make up the 6 sides of the box. The textures must all be the same size and be powers of 2 in width & height. If you can't make your texture names conform to this, use the alternative method of the same name which takes an array of texture names instead. | |
| forUVW | Set to true if you want a single 3D texture addressable with 3D texture coordinates rather than 6 separate textures. Useful for cubic environment mapping. |
| void DigitalSpaces::DIOGRETextureUnitState::setAnimatedTextureName | ( | const char * | name, | |
| unsigned int | numFrames, | |||
| float | duration = 0 | |||
| ) |
Sets the names of the texture images for an animated texture.
Applies to both fixed-function and programmable pipeline.
| name | The base name of the textures to use e.g. wall.jpg for frames wall_0.jpg, wall_1.jpg etc. | |
| numFrames | The number of frames in the sequence. | |
| duration | The length of time it takes to display the whole animation sequence, in seconds. If 0, no automatic transition occurs. |
| void DigitalSpaces::DIOGRETextureUnitState::getTextureDimensions | ( | unsigned int * | x_out, | |
| unsigned int * | y_out, | |||
| unsigned int | frame = 0 | |||
| ) |
Returns the width and height of the texture in the given frame.
| void DigitalSpaces::DIOGRETextureUnitState::setCurrentFrame | ( | unsigned int | frameNumber | ) |
Changes the active frame in an animated or multi-image texture.
| unsigned int DigitalSpaces::DIOGRETextureUnitState::getCurrentFrame | ( | ) |
Gets the active frame in an animated or multi-image texture layer.
| const char* DigitalSpaces::DIOGRETextureUnitState::getFrameTextureName | ( | unsigned int | frameNumber | ) |
Gets the name of the texture associated with a frame.
| unsigned int DigitalSpaces::DIOGRETextureUnitState::getNumFrames | ( | ) |
Gets the number of frames for a texture.
| bool DigitalSpaces::DIOGRETextureUnitState::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.
| bool DigitalSpaces::DIOGRETextureUnitState::is3D | ( | ) |
Returns true if this texture layer uses a composite 3D cubic texture.
| OGRETextureType DigitalSpaces::DIOGRETextureUnitState::getTextureType | ( | ) |
Returns the type of this texture.
| unsigned int DigitalSpaces::DIOGRETextureUnitState::getTextureCoordSet | ( | ) |
Gets the index of the set of texture co-ords this layer uses.
| void DigitalSpaces::DIOGRETextureUnitState::setTextureCoordSet | ( | unsigned int | set | ) |
Sets the index of the set of texture co-ords this layer uses.
Applies to both fixed-function and programmable pipeline.
| void DigitalSpaces::DIOGRETextureUnitState::setTextureTransform | ( | in_Matrix4f * | xform | ) |
Sets a matrix used to transform any texture coordinates on this layer.
| void DigitalSpaces::DIOGRETextureUnitState::getTextureTransform | ( | out_Matrix4f * | xform | ) |
Gets the current texture transformation matrix.
| void DigitalSpaces::DIOGRETextureUnitState::setTextureScroll | ( | float | u, | |
| float | v | |||
| ) |
Sets the translation offset of the texture, ie scrolls the texture.
| u | The amount the texture should be moved horizontally (u direction). | |
| v | The amount the texture should be moved vertically (v direction). |
| void DigitalSpaces::DIOGRETextureUnitState::setTextureUScroll | ( | float | value | ) |
As setTextureScroll, but sets only U value.
| float DigitalSpaces::DIOGRETextureUnitState::getTextureUScroll | ( | ) |
| void DigitalSpaces::DIOGRETextureUnitState::setTextureVScroll | ( | float | value | ) |
As setTextureScroll, but sets only V value.
| float DigitalSpaces::DIOGRETextureUnitState::getTextureVScroll | ( | ) |
| void DigitalSpaces::DIOGRETextureUnitState::setTextureUScale | ( | float | value | ) |
As setTextureScale, but sets only U value.
| float DigitalSpaces::DIOGRETextureUnitState::getTextureUScale | ( | ) |
| void DigitalSpaces::DIOGRETextureUnitState::setTextureVScale | ( | float | value | ) |
As setTextureScale, but sets only V value.
| float DigitalSpaces::DIOGRETextureUnitState::getTextureVScale | ( | ) |
| void DigitalSpaces::DIOGRETextureUnitState::setTextureScale | ( | float | uScale, | |
| float | vScale | |||
| ) |
Sets the scaling factor applied to texture coordinates.
| uScale | The value by which the texture is to be scaled horizontally. | |
| vScale | The value by which the texture is to be scaled vertically. |
| void DigitalSpaces::DIOGRETextureUnitState::setTextureRotateRadians | ( | const float | angle | ) |
Sets the anticlockwise rotation factor applied to texture coordinates.
| angle | The angle of rotation (anticlockwise). |
| float DigitalSpaces::DIOGRETextureUnitState::getTextureRotateRadians | ( | ) |
| OGRETextureAddressingMode DigitalSpaces::DIOGRETextureUnitState::getTextureAddressingModeU | ( | ) |
Gets the texture addressing mode, i.e.
what happens at uv values above 1.0.
| OGRETextureAddressingMode DigitalSpaces::DIOGRETextureUnitState::getTextureAddressingModeV | ( | ) |
| OGRETextureAddressingMode DigitalSpaces::DIOGRETextureUnitState::getTextureAddressingModeW | ( | ) |
| void DigitalSpaces::DIOGRETextureUnitState::setTextureAddressingMode | ( | OGRETextureAddressingMode | tam | ) |
Sets the texture addressing mode, i.e.
what happens at uv values above 1.0.
This applies for both the fixed-function and programmable pipelines.
| void DigitalSpaces::DIOGRETextureUnitState::setColourOperationEx | ( | OGRELayerBlendOperationEx | op, | |
| OGRELayerBlendSource | source1, | |||
| OGRELayerBlendSource | source2, | |||
| in_Vector3f * | arg1, | |||
| in_Vector3f * | arg2, | |||
| float | manualBlend | |||
| ) |
Setting advanced blending options.
| If | you wish to avoid having to do this, use the simpler TextureUnitState::setColourOperation method which allows less flexible blending options but sets up the multipass fallback automatically, since it only allows operations which have direct multipass equivalents. | |
| op | The operation to be used, e.g. modulate (multiply), add, subtract | |
| source1 | The source of the first colour to the operation e.g. texture colour | |
| source2 | The source of the second colour to the operation e.g. current surface colour | |
| arg1 | Manually supplied colour value (only required if source1 = LBS_MANUAL) | |
| arg2 | Manually supplied colour value (only required if source2 = LBS_MANUAL) | |
| manualBlend | Manually supplied 'blend' value - only required for operations which require manual blend e.g. LBX_BLEND_MANUAL |
| void DigitalSpaces::DIOGRETextureUnitState::setColourOperation | ( | const OGRELayerBlendOperation | 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).
This option has no effect in the programmable pipeline.
| op | One of the LayerBlendOperation enumerated blending types. |
| void DigitalSpaces::DIOGRETextureUnitState::setColourOpMultipassFallback | ( | const OGRESceneBlendFactor | sourceFactor, | |
| const OGRESceneBlendFactor | destFactor | |||
| ) |
Sets the multipass fallback operation for this layer, if you used TextureUnitState::setColourOperationEx and not enough multitexturing hardware is available.
| DIOGRELayerBlendModeEx* DigitalSpaces::DIOGRETextureUnitState::getColourBlendMode | ( | ) |
Get multitexturing colour blending mode.
| DIOGRELayerBlendModeEx* DigitalSpaces::DIOGRETextureUnitState::getAlphaBlendMode | ( | ) |
Get multitexturing alpha blending mode.
| OGRESceneBlendFactor DigitalSpaces::DIOGRETextureUnitState::getColourBlendFallbackSrc | ( | ) |
Get the multipass fallback for colour blending operation source factor.
| OGRESceneBlendFactor DigitalSpaces::DIOGRETextureUnitState::getColourBlendFallbackDest | ( | ) |
Get the multipass fallback for colour blending operation destination factor.
| void DigitalSpaces::DIOGRETextureUnitState::setAlphaOperation | ( | OGRELayerBlendOperationEx | op, | |
| OGRELayerBlendSource | source1 = LBS_TEXTURE, |
|||
| OGRELayerBlendSource | source2 = LBS_CURRENT, |
|||
| float | arg1 = 1.0, |
|||
| float | arg2 = 1.0, |
|||
| float | manualBlend = 0.0 | |||
| ) |
Sets the alpha operation to be applied to this texture.
| op | The operation to be used, e.g. modulate (multiply), add, subtract | |
| source1 | The source of the first alpha value to the operation e.g. texture alpha | |
| source2 | The source of the second alpha value to the operation e.g. current surface alpha | |
| arg1 | Manually supplied alpha value (only required if source1 = LBS_MANUAL) | |
| arg2 | Manually supplied alpha value (only required if source2 = LBS_MANUAL) | |
| manualBlend | Manually supplied 'blend' value - only required for operations which require manual blend e.g. LBX_BLEND_MANUAL |
| void DigitalSpaces::DIOGRETextureUnitState::setEnvironmentMap | ( | bool | enable, | |
| OGREEnvMapType | envMapType = ENV_CURVED | |||
| ) |
Turns on/off texture coordinate effect that makes this layer an environment map.
| enable | True to enable, false to disable | |
| planar | If set to true, instead of being based on normals the environment effect is based on vertex positions. This is good for planar surfaces. |
| void DigitalSpaces::DIOGRETextureUnitState::setScrollAnimation | ( | float | uSpeed, | |
| float | vSpeed | |||
| ) |
Sets up an animated scroll for the texture layer.
| uSpeed | The number of horizontal loops per second (+ve=moving right, -ve = moving left) | |
| vSpeed | The number of vertical loops per second (+ve=moving up, -ve= moving down) |
| void DigitalSpaces::DIOGRETextureUnitState::setRotateAnimation | ( | float | speed | ) |
Sets up an animated texture rotation for this layer.
| speed | The number of complete anticlockwise revolutions per second (use -ve for clockwise) |
| void DigitalSpaces::DIOGRETextureUnitState::setTransformAnimation | ( | const OGRETextureTransformType | ttype, | |
| const OGREWaveformType | waveType, | |||
| float | base = 0, |
|||
| float | frequency = 1, |
|||
| float | phase = 0, |
|||
| float | amplitude = 1 | |||
| ) |
Sets up a general time-relative texture modification effect.
| ttype | The type of transform, either translate (scroll), scale (stretch) or rotate (spin) | |
| waveType | The shape of the wave, see WaveformType enum for details | |
| base | The base value for the function (range of output = {base, base + amplitude}) | |
| frequency | The speed of the wave in cycles per second | |
| phase | The offset of the start of the wave, e.g. 0.5 to start half-way through the wave | |
| amplitude | Scales the output so that instead of lying within 0..1 it lies within 0..1*amplitude for exaggerated effects |
| void DigitalSpaces::DIOGRETextureUnitState::setProjectiveTexturing | ( | bool | enabled, | |
| const DIOGREFrustum * | projectionSettings = 0 | |||
| ) |
Enables or disables projective texturing on this texture unit.
| enabled | Whether to enable / disable | |
| projectionSettings | The Frustum which will be used to derive the projection parameters. |
| void DigitalSpaces::DIOGRETextureUnitState::removeAllEffects | ( | ) |
Removes all effects applied to this texture layer.
| void DigitalSpaces::DIOGRETextureUnitState::removeEffect | ( | const OGRETextureEffectType | type | ) |
Removes a single effect applied to this texture layer.
| bool DigitalSpaces::DIOGRETextureUnitState::isBlank | ( | ) |
Determines if this texture layer is currently blank.
| void DigitalSpaces::DIOGRETextureUnitState::setBlank | ( | ) |
Sets this texture layer to be blank.
| float DigitalSpaces::DIOGRETextureUnitState::getAnimationDuration | ( | ) |
| void DigitalSpaces::DIOGRETextureUnitState::setTextureFiltering | ( | OGRETextureFilterOptions | filterType | ) |
Set the texture filtering for this unit, using the simplified interface.
| filterType | The high-level filter type to use. |
| void DigitalSpaces::DIOGRETextureUnitState::setTextureFiltering | ( | OGREFilterType | ftype, | |
| OGREFilterOptions | opts | |||
| ) |
Set a single filtering option on this texture unit.
ftype The filtering type to set opts The filtering option to set
| void DigitalSpaces::DIOGRETextureUnitState::setTextureFiltering | ( | OGREFilterOptions | minFilter, | |
| OGREFilterOptions | magFilter, | |||
| OGREFilterOptions | 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)
| OGREFilterOptions DigitalSpaces::DIOGRETextureUnitState::getTextureFiltering | ( | OGREFilterType | ftpye | ) |
| void DigitalSpaces::DIOGRETextureUnitState::setTextureAnisotropy | ( | unsigned int | maxAniso | ) |
Sets the anisotropy level to be used for this texture level.
| unsigned int DigitalSpaces::DIOGRETextureUnitState::getTextureAnisotropy | ( | ) |
| DIOGREPass* DigitalSpaces::DIOGRETextureUnitState::getParent | ( | ) |
Gets the parent Pass object.
| bool DigitalSpaces::DIOGRETextureUnitState::hasViewRelativeTextureCoordinateGeneration | ( | ) |
Returns whether this unit has texture coordinate generation that depends on the camera.
1.5.6