Create a texture consisting of cells aligned in a grid, or a chessboard.
More...
#include <ProceduralTextureGenerator.h>
Create a texture consisting of cells aligned in a grid, or a chessboard.
Cells can be irregular. If considered bump map, they have pyramid form.
Examples:
Default (MODE_GRID + PATTERN_BOTH)
MODE_CHESSBOARD + PATTERN_CONE
MODE_GRID + PATTERN_CROSS
◆ CELL_MODE
Mode how to paint cells.
Enumerator |
---|
MODE_GRID | Paint cells on a grid.
|
MODE_CHESSBOARD | Paint cells on a chessboard.
|
◆ CELL_PATTERN
Mode how to construct cells.
Enumerator |
---|
PATTERN_BOTH | PATTERN_CROSS | PATTERN_CONE.
|
PATTERN_CROSS | Construct cells from vertices.
|
PATTERN_CONE | Construct cells from cicles.
|
◆ Cell()
Default constructor.
- Parameters
-
pBuffer | Image buffer where to store the generated image. |
◆ getName()
Get name of the filter as string.
◆ logMsg()
void Procedural::TextureProcessing::logMsg |
( |
Ogre::String |
msg | ) |
|
|
protectedinherited |
◆ process()
◆ setColour() [1/2]
Set the colour of the cell top.
- Parameters
-
◆ setColour() [2/2]
Set the colour of the cell top.
- Parameters
-
red | Red value of the cell top colour [0.0, 1.0] (default 1.0) |
green | Green value of the cell top colour [0.0, 1.0] (default 1.0) |
blue | Blue value of the cell top colour [0.0, 1.0] (default 1.0) |
alpha | Alpha value of the cell top colour [0.0, 1.0] (default 1.0) |
◆ setDensity()
Set the density of cells in texture.
At least you have to set number of rows and columns in the grid to 1 or above.
- Parameters
-
density | New number of columns and rows (default 8) |
◆ setLog()
void Procedural::TextureProcessing::setLog |
( |
bool |
enable = true | ) |
|
|
inherited |
Enable/Disable logging.
- Parameters
-
enable | true enables logging of filter actions |
◆ setMode()
Set the cell mode of texture.
- Parameters
-
mode | New mode for cell ground (default MODE_GRID) |
◆ setPattern()
Set the cell pattern of texture.
- Parameters
-
pattern | New base of cell construction (default PATTERN_BOTH) |
◆ setRegularity()
Set the regularity of texture.
The maximum value of 255 creates identical cells. The minimum 0 creates random forms for each cells.
- Parameters
-
regularity | New value for chaotic cell forms (default 128) |
◆ setSeed()
Set the seed for "random" number generator.
- Parameters
-
seed | Seed value where to set the random number generator (default 5120) |
◆ mBuffer
◆ mLog
bool Procedural::TextureProcessing::mLog |
|
protectedinherited |
◆ mName
The documentation for this class was generated from the following file:
- ProceduralTextureGenerator.h
class to store image data while processing
Definition: ProceduralTextureBuffer.h:50