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

Use alpha channel as an mask for an other image. More...

#include <ProceduralTextureModifiers.h>

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

Public Types

enum  ABNORMALS_COMPENSATION { COMPENSATION_NORMAL, COMPENSATION_HEIGHT, COMPENSATION_QUATERNION }
 Methods how to work with parameter map. More...
 
enum  ABNORMALS_MIRROR { MIRROR_NONE, MIRROR_X_YZ, MIRROR_Y_XZ, MIRROR_X_Y_Z }
 Methods how to fix broken normal maps. More...
 

Public Member Functions

 Abnormals (TextureBufferPtr pBuffer)
 Default constructor. More...
 
AbnormalssetParameterImage (TextureBufferPtr image)
 Set parameter image for compensation. More...
 
AbnormalssetRotation (Ogre::Real rotation)
 Set rotation angle. More...
 
AbnormalssetRotation (Ogre::Radian rotation)
 Set rotation angle. More...
 
AbnormalssetRotation (Ogre::Degree rotation)
 Set rotation angle. More...
 
AbnormalssetAxis (Ogre::Vector3 axis)
 Set rotation axis. More...
 
AbnormalssetAxis (Ogre::Real x, Ogre::Real y, Ogre::Real z=1.0f)
 Set rotation axis. More...
 
AbnormalssetSensitivity (Ogre::uchar sensitivity)
 Set sensitivity. More...
 
AbnormalssetCompensation (ABNORMALS_COMPENSATION compensation)
 Set compensation method. More...
 
AbnormalssetMirror (ABNORMALS_MIRROR mirror)
 Set mirror method. 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

Use alpha channel as an mask for an other image.

Can take normal, height or quaternion map as second input.

Map translations

Options

Example:

dot_texture_02.png

Todo:
Need bugfix

Member Enumeration Documentation

◆ ABNORMALS_COMPENSATION

Methods how to work with parameter map.

Enumerator
COMPENSATION_NORMAL 

Use as a normal map.

COMPENSATION_HEIGHT 

Use as a height map.

COMPENSATION_QUATERNION 

Use as a list of quaternion.

◆ ABNORMALS_MIRROR

Methods how to fix broken normal maps.

Enumerator
MIRROR_NONE 

None.

MIRROR_X_YZ 

X : YZ.

MIRROR_Y_XZ 

Y : XZ.

MIRROR_X_Y_Z 

X+Y : Z.

Constructor & Destructor Documentation

◆ Abnormals()

Procedural::Abnormals::Abnormals ( TextureBufferPtr  pBuffer)

Default constructor.

Parameters
pBufferImage buffer where to modify the image.

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::Abnormals::process ( )
virtual

Run image manipulation.

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

Implements Procedural::TextureProcessing.

◆ setAxis() [1/2]

Abnormals& Procedural::Abnormals::setAxis ( Ogre::Real  x,
Ogre::Real  y,
Ogre::Real  z = 1.0f 
)

Set rotation axis.

Parameters
xNew x coordinate of rotation axis (default 0.0)
yNew y coordinate of rotation axis (default 0.0)
zNew z coordinate of rotation axis (default 1.0)

◆ setAxis() [2/2]

Abnormals& Procedural::Abnormals::setAxis ( Ogre::Vector3  axis)

Set rotation axis.

Parameters
axisNew rotation axis (default Ogre::Vector3(0.0f, 0.0f, 1.0f))

◆ setCompensation()

Abnormals& Procedural::Abnormals::setCompensation ( ABNORMALS_COMPENSATION  compensation)

Set compensation method.

Parameters
compensationCompensation method to use (default COMPENSATION_NORMAL)

◆ setLog()

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

Enable/Disable logging.

Parameters
enabletrue enables logging of filter actions

◆ setMirror()

Abnormals& Procedural::Abnormals::setMirror ( ABNORMALS_MIRROR  mirror)

Set mirror method.

Parameters
mirrorCompensation method to use (default MIRROR_NONE)

◆ setParameterImage()

Abnormals& Procedural::Abnormals::setParameterImage ( TextureBufferPtr  image)

Set parameter image for compensation.

Parameters
imagePointer to second image (default NULL)
Note
If the parameter image is set to NULL there won't be any compensation.

◆ setRotation() [1/3]

Abnormals& Procedural::Abnormals::setRotation ( Ogre::Degree  rotation)

Set rotation angle.

Parameters
rotationNew rotation angle [0, 360] degree (default 0)

◆ setRotation() [2/3]

Abnormals& Procedural::Abnormals::setRotation ( Ogre::Radian  rotation)

Set rotation angle.

Parameters
rotationNew rotation angle [0.0, Ogre::Math::TWO_PI] rad (default 0.0)

◆ setRotation() [3/3]

Abnormals& Procedural::Abnormals::setRotation ( Ogre::Real  rotation)

Set rotation angle.

Parameters
rotationNew rotation angle [0.0, 1.0] (default 0.0)

◆ setSensitivity()

Abnormals& Procedural::Abnormals::setSensitivity ( Ogre::uchar  sensitivity)

Set sensitivity.

Parameters
sensitivityNew sensitivity value [0, 255] (default 127)

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::Abnormals
Use alpha channel as an mask for an other image.
Definition: ProceduralTextureModifiers.h:76
Procedural::Cell::setRegularity
Cell & setRegularity(Ogre::uchar regularity)
Set the regularity of texture.
Procedural::Abnormals::process
TextureBufferPtr process()
Run image manipulation.
Ogre::ColourValue::Red
static const ColourValue Red
Ogre::ColourValue::Black
static const ColourValue Black
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::Gradient::setColours
Gradient & setColours(Ogre::ColourValue colourA, Ogre::ColourValue colourB, Ogre::ColourValue colourC, Ogre::ColourValue colourD)
Sets the colours of the image corners.
Ogre::ColourValue::Blue
static const ColourValue Blue
Procedural::Gradient
Fills full image with given colour gradients.
Definition: ProceduralTextureGenerator.h:229
Ogre::ColourValue::Green
static const ColourValue Green
Procedural::TextureBuffer
class to store image data while processing
Definition: ProceduralTextureBuffer.h:50
Procedural::Abnormals::setParameterImage
Abnormals & setParameterImage(TextureBufferPtr image)
Set parameter image for compensation.