- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions

# TextureMixer Class Reference

This reference page is linked to from the following overview topics: Textures.

Search for all occurrences

## Detailed Description

Represents a texture mixer.

Definition at line 278 of file material.h.

`#include <material.h>`

Inheritance diagram for TextureMixer:
[legend]

List of all members.

## Public Member Functions
virtual unsigned int | BlendModeCount (void) const
| Returns the number of the blending modes.
virtual QString | BlendModeDisplayName (int iBlendMode) const
| Returns the display name of the specified blending mode.
virtual QString | BlendModeName (int iBlendMode) const
| Returns the programmatic name of the specified blending mode.
virtual void | SetBlendMode (int iBlendMode)
| Sets the current blending mode of the mixer.
virtual void | SetBlendModeParameters (const Store< float > &pParameters)
| Sets parameters specific to the current blending mode.
virtual void | SetLayerCount (unsigned int iLayerCount)
| Set number of layers to blend.
virtual void | SetLayerData (unsigned int iLayerIndex, int iTextureID, float fTransparency, int iMaskID=0, float fMaskTransparency=1.0f)
| Set mix the data for layer at iLayerIndex.
virtual void | Mix (class Texture *d, unsigned int iWidth, unsigned int iHeight, enum Image::Format eFormat)
| Mix the layers setup with the SetLayerData method.
## Protected Member Functions
| TextureMixer (void)
| Constructor.

## Constructor & Destructor Documentation

TextureMixer | ( | void |  | ) | `[protected]`

Constructor.

Do not use it directly; Use CreateInstance() instead.

            TextureMixer *myTextureMixer = CreateInstance<TextureMixer>();

## Member Function Documentation

virtual unsigned int BlendModeCount | ( | void |  | ) | const `[virtual]`

Search for all occurrences

Returns the number of the blending modes.

virtual QString BlendModeDisplayName | ( | int | iBlendMode | ) | const `[virtual]`

Search for all occurrences

Returns the display name of the specified blending mode.

Parameters:

  [in] | iBlendMode | Index of the blending mode

virtual QString BlendModeName | ( | int | iBlendMode | ) | const `[virtual]`

Search for all occurrences

Returns the programmatic name of the specified blending mode.

Parameters:

  [in] | iBlendMode | Index of the blending mode

virtual void SetBlendMode | ( | int | iBlendMode | ) | `[virtual]`

Search for all occurrences

Sets the current blending mode of the mixer.

The blending mode determines how the layers are composited together. They are analogous to Photoshop-style layer blending modes.

Parameters:

  [in] | iBlendMode | The blend mode to set. Valid range is [0,BlendModeCount()]

virtual void SetBlendModeParameters | ( | const Store< float > & | pParameters | ) | `[virtual]`

Search for all occurrences

Sets parameters specific to the current blending mode.

Most blend modes do not require parameters so this method usually does not need to be called.

Parameters:

  [in] | pParameters | An array of parameters for the blend mode.

virtual void SetLayerCount | ( | unsigned int | iLayerCount | ) | `[virtual]`

Search for all occurrences

Set number of layers to blend.

Parameters:

  [in] | iLayerCount | Number of layers that should be blended in a mix operation.

virtual void SetLayerData | ( | unsigned int | iLayerIndex,
|  | int | iTextureID,
|  | float | fTransparency,
|  | int | iMaskID = `0`,
|  | float | fMaskTransparency = `1.0f`
| ) |  | `[virtual]`

Search for all occurrences

Set mix the data for layer at iLayerIndex.

Parameters:

  [in] | iLayerIndex | The index of the layer to be altered
  [in] | iTextureID | The ID of the texture for this layer
  [in] | fTransparency | The transparency of the layer
  [in] | iMaskID | The ID of the texture's mask, if any
  [in] | fMaskTransparency | The transparency of the layer mask

virtual void Mix | ( | class Texture * | d,
|  | unsigned int | iWidth,
|  | unsigned int | iHeight,
|  | enum Image::Format | eFormat
| ) |  | `[virtual]`

Search for all occurrences

Mix the layers setup with the SetLayerData method.

Parameters:

  [out] | d | A pointer to an existing Texture. It will be overridden with the result of the mixing.
  [in] | iWidth | The width of the texture to be mixed
  [in] | iHeight | The height of the texture to be mixed
  [in] | eFormat | The image format desired for the result

The documentation for this class was generated from the following file:

- Mudbox/material.h

TextureMixer TextureMixer TextureMixer TextureMixer TextureMixer TextureMixer TextureMixer TextureMixer TextureMixer TextureMixer
TextureMixer TextureMixer TextureMixer TextureMixer TextureMixer TextureMixer TextureMixer TextureMixer TextureMixer TextureMixer