STIRA  0.1
Public Types | Public Member Functions | List of all members
stira::imagetools::TextureGenerator Class Reference

class to generate different kinds of textures code slightly adapted from http://lodev.org/cgtutor/randomnoise.html More...

#include <TextureGenerator.h>

Public Types

enum  TextureType { TEXTURE_PERLIN, TEXTURE_WOOD, TEXTURE_MARBLE }
 

Public Member Functions

 TextureGenerator (int width, int height, TextureType myTextureType)
 constructor
 
 ~TextureGenerator ()
 destructor
 
ImageGenerateClouds ()
 
ImageGenerateMarble (double xPeriod, double yPeriod, double turbPower, double turbSize)
 Generates marble like texture. More...
 
ImageGenerateWood (double xyPeriod, double turbPower, double turbSize)
 

Detailed Description

class to generate different kinds of textures code slightly adapted from http://lodev.org/cgtutor/randomnoise.html

Member Function Documentation

Image * stira::imagetools::TextureGenerator::GenerateMarble ( double  xPeriod,
double  yPeriod,
double  turbPower,
double  turbSize 
)

Generates marble like texture.

Parameters
xPerioddefines repetition of marble lines in x direction
yPerioddefines repetition of marble lines in y direction
turbPowermakes twists
turbSizeinitial size of the turbulence

References stira::imagedata::Image::SetColor().

Image * stira::imagetools::TextureGenerator::GenerateWood ( double  xyPeriod,
double  turbPower,
double  turbSize 
)

Generate wood-like texture

Parameters
xyPeriodnumber of rings
turbPowermakes twists
turbSizeinitial size of the turbulence

References stira::imagedata::Image::SetColor().


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