rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Types | Public Member Functions
IlvTurbulenceFilter Class Reference

Turbulence filter. More...

#include <ilviews/bitmaps/filters/turbulence.h>

Inheritance diagram for IlvTurbulenceFilter:
IlvBitmapFilter

Public Types

enum  NoiseMode { Fractal, Turbulence }
 This enumeration defines the possible values for the noise mode. More...
 

Public Member Functions

 IlvTurbulenceFilter (IlFloat baseFrequencyX=0.05, IlFloat baseFrequencyY=0.05, IlUInt numOctaves=1, IlFloat seed=0.0, NoiseMode=Turbulence, IlBoolean stitch=IlFalse)
 Constructor. More...
 
IlvBitmapDataapply (IlUInt count=0, const IlvBitmapData **datas=0)
 Applies the turbulence.
 
IlFloat getBaseFrequencyX () const
 Returns the frequency in the x direction. More...
 
IlFloat getBaseFrequencyY () const
 Returns the frequency in the y direction. More...
 
NoiseMode getNoiseMode () const
 Returns the noise generator mode. More...
 
IlUInt getNumOctaves () const
 Returns the octaves. More...
 
IlFloat getSeed () const
 Returns the seed value. More...
 
void setBaseFrequencyX (IlFloat frequency)
 Sets the frequency in the x direction. More...
 
void setBaseFrequencyY (IlFloat frequency)
 Sets the frequency in the y direction. More...
 
void setNoiseMode (NoiseMode mode)
 
void setNumOctaves (IlUInt octaves)
 Sets the octaves. More...
 
void setSeed (IlFloat seed)
 Sets the seed value for the random functions used by the filter. More...
 
- Public Member Functions inherited from IlvBitmapFilter
 IlvBitmapFilter ()
 Constructor. More...
 
virtual ~IlvBitmapFilter ()
 Destructor. More...
 
IlvBitmapDataapplyUnary (const IlvBitmapData *data)
 Convenience method for unary filters. More...
 
virtual const char * getClassName () const
 Returns the class name of the filter. More...
 
IlUInt getHeight () const
 Returns the height of the filter effect region. More...
 
const char *const * getInputs (IlUInt &count) const
 Returns the name of the input bitmap data. More...
 
const char * getName () const
 Returns the name of the filter. More...
 
IlUInt getRefCount () const
 Returns the reference count for this instance.
 
const char * getResult () const
 Returns the name of the result bitmap data. More...
 
IlUInt getWidth () const
 Returns the width of the filter effect region. More...
 
IlInt getX () const
 Returns the left coordinate of the filter effect region. More...
 
IlInt getY () const
 Returns the top coordinate of the filter effect region. More...
 
void lock ()
 Locks the current instance.
 
void setHeight (IlUInt height)
 Sets the height of the filter effect region. More...
 
void setInputs (IlUInt count, const char *const *name)
 Sets the input names of the filter. More...
 
void setName (const char *id)
 Sets the name of the filter. More...
 
void setResult (const char *name)
 Sets the result name of the filter. More...
 
void setWidth (IlUInt width)
 Sets the width of the filter effect region. More...
 
void setX (IlInt x)
 Sets the left coordinate of the filter effect region. More...
 
void setY (IlInt y)
 Sets the top coordinate of the filter effect region. More...
 
void unLock ()
 Unlocks the current instance. When the reference count is 0, the instance is deleted.
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvBitmapFilter
static IlvBitmapFilterCreate (const char *classname, IlBoolean forceLoad=IlTrue)
 This static method creates an instance of a bitmap filter of given classname. If the filter class is not registered and forceLoad is IlTrue, an attempt to load a dynamic module for this filter is made. More...
 
static const char ** GetRegisteredFilters (IlUInt &num)
 This static method returns an array of registered filter class names. More...
 

Detailed Description

Turbulence filter.

Library: ilvbmpflt

This bitmap filter lets you create images using the Ken Perlin turbulence function. It allows synthesis of natural textures such as cloud or marble. The basic algorithm sums for each pixel the values of a pseudo-random function using different scales and frequencies. You can specify the number of repetitions (octaves), the frequencies in each direction, and whether the filter generates turbulence of fractal noise. See "Texturing and Modeling", Ebert et al, AP Professional, 1994.

See Also
IlvRGBBitmapData, IlvBitmapFilter

Member Enumeration Documentation

This enumeration defines the possible values for the noise mode.

Enumerator
Fractal 

The mode is Fractal.

Turbulence 

The mode is Turbulence.

Constructor & Destructor Documentation

IlvTurbulenceFilter::IlvTurbulenceFilter ( IlFloat  baseFrequencyX = 0.05,
IlFloat  baseFrequencyY = 0.05,
IlUInt  numOctaves = 1,
IlFloat  seed = 0.0,
NoiseMode  = Turbulence,
IlBoolean  stitch = IlFalse 
)

Constructor.

Initializes a new instance of the class IlvTurbulenceFilter.

Member Function Documentation

IlFloat IlvTurbulenceFilter::getBaseFrequencyX ( ) const

Returns the frequency in the x direction.

Returns
The frequency in the x direction.
IlFloat IlvTurbulenceFilter::getBaseFrequencyY ( ) const

Returns the frequency in the y direction.

Returns
The frequency in the y direction.
NoiseMode IlvTurbulenceFilter::getNoiseMode ( ) const

Returns the noise generator mode.

Returns
The noise generator mode.
IlUInt IlvTurbulenceFilter::getNumOctaves ( ) const

Returns the octaves.

Returns
The octaves.
IlFloat IlvTurbulenceFilter::getSeed ( ) const

Returns the seed value.

Returns
The seed value.
void IlvTurbulenceFilter::setBaseFrequencyX ( IlFloat  frequency)

Sets the frequency in the x direction.

Parameters
frequencyThe new frequency.
void IlvTurbulenceFilter::setBaseFrequencyY ( IlFloat  frequency)

Sets the frequency in the y direction.

Parameters
frequencyThe new frequency.
void IlvTurbulenceFilter::setNoiseMode ( NoiseMode  mode)

Specifies whether the generated image should exhibit fractal or turbulence aspect.

Parameters
isfractalA Boolean value specifying whether the generated image should exhibit fractal (IlTrue) or turbulence IlFalse) patterns.
void IlvTurbulenceFilter::setNumOctaves ( IlUInt  octaves)

Sets the octaves.

Parameters
octavesThe new octaves.
void IlvTurbulenceFilter::setSeed ( IlFloat  seed)

Sets the seed value for the random functions used by the filter.

Parameters
seedThe new seed.

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.