Ogre Procedural  0.3.0 unstable
Procedural Geometry & Textures for Ogre3D
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Procedural::Lerp Class Reference

Linear interpolation. More...

#include <ProceduralTextureModifiers.h>

Inheritance diagram for Procedural::Lerp:
Inheritance graph
[legend]

Public Member Functions

 Lerp (TextureBufferPtr pBuffer)
 Default constructor. More...
 
Lerp & setImageA (TextureBufferPtr image1)
 Set first image (a). More...
 
Lerp & setImageB (TextureBufferPtr image2)
 Set second image (b). More...
 
TextureBufferPtr process ()
 Run image manipulation. More...
 
Ogre::String getName ()
 Get name of the filter as string. More...
 
void setLog (bool enable=true)
 Enable/Disable logging. More...
 

Protected Member Functions

void logMsg (Ogre::String msg)
 

Protected Attributes

TextureBufferPtr mBuffer
 
Ogre::String mName
 
bool mLog
 

Detailed Description

Linear interpolation.

Mix first two inputs (a, b) in proportions given by base input (c). Each color channel is processed separately. Equation: x = bc + a(1 - c)

Example:

// Image C
Procedural::TextureBuffer bufferCloud(256);
Procedural::Cloud(&bufferCloud).process();
// Image A
Procedural::TextureBuffer bufferGradient(256);
Procedural::Gradient(&bufferGradient).process();
// Image B
Procedural::TextureBuffer bufferCell(256);
// Filter
Procedural::Lerp(&bufferCloud).setImageA(&bufferGradient).setImageB(&bufferCell).process();

dot_texture_18.png

Constructor & Destructor Documentation

◆ Lerp()

Procedural::Lerp::Lerp ( TextureBufferPtr  pBuffer)

Default constructor.

Parameters
pBufferImage buffer where to modify the image.
Note
This is the third image (c).

Member Function Documentation

◆ getName()

Ogre::String Procedural::TextureProcessing::getName ( )
inherited

Get name of the filter as string.

◆ logMsg()

void Procedural::TextureProcessing::logMsg ( Ogre::String  msg)
protectedinherited

◆ process()

TextureBufferPtr Procedural::Lerp::process ( )
virtual

Run image manipulation.

Returns
Pointer to image buffer which has been set in the constructor.

Implements Procedural::TextureProcessing.

◆ setImageA()

Lerp& Procedural::Lerp::setImageA ( TextureBufferPtr  image1)

Set first image (a).

Parameters
image1Pointer to a new first image (default NULL)

◆ setImageB()

Lerp& Procedural::Lerp::setImageB ( TextureBufferPtr  image2)

Set second image (b).

Parameters
image2Pointer to a new second image (default NULL)

◆ setLog()

void Procedural::TextureProcessing::setLog ( bool  enable = true)
inherited

Enable/Disable logging.

Parameters
enabletrue enables logging of filter actions

Member Data Documentation

◆ mBuffer

TextureBufferPtr Procedural::TextureProcessing::mBuffer
protectedinherited

◆ mLog

bool Procedural::TextureProcessing::mLog
protectedinherited

◆ mName

Ogre::String Procedural::TextureProcessing::mName
protectedinherited

The documentation for this class was generated from the following file:
Procedural::Cell::setDensity
Cell & setDensity(Ogre::uint density)
Set the density of cells in texture.
Procedural::Cell::setRegularity
Cell & setRegularity(Ogre::uchar regularity)
Set the regularity of texture.
Procedural::Gradient::process
TextureBufferPtr process()
Run image generation.
Procedural::Cell
Create a texture consisting of cells aligned in a grid, or a chessboard.
Definition: ProceduralTextureGenerator.h:71
Procedural::Cell::process
TextureBufferPtr process()
Run image generation.
Procedural::Lerp
Linear interpolation.
Definition: ProceduralTextureModifiers.h:1785
Procedural::Cloud
Creates a cloud structured image.
Definition: ProceduralTextureGenerator.h:174
Procedural::Lerp::process
TextureBufferPtr process()
Run image manipulation.
Procedural::Gradient
Fills full image with given colour gradients.
Definition: ProceduralTextureGenerator.h:229
Procedural::Cloud::process
TextureBufferPtr process()
Run image generation.
Procedural::Lerp::setImageB
Lerp & setImageB(TextureBufferPtr image2)
Set second image (b).
Procedural::TextureBuffer
class to store image data while processing
Definition: ProceduralTextureBuffer.h:50
Procedural::Lerp::setImageA
Lerp & setImageA(TextureBufferPtr image1)
Set first image (a).