Cortex  10.0.0-a4
Public Types | Public Member Functions | List of all members
IECore::Turbulence< N > Class Template Reference

#include <Turbulence.h>

Public Types

typedef N Noise
 
typedef N::Point Point
 
typedef VectorTraits< Point >::BaseType PointBaseType
 
typedef N::Value Value
 
typedef VectorTraits< Value >::BaseType ValueBaseType
 

Public Member Functions

 Turbulence (const unsigned int octaves=4, const Value &gain=Value(0.5), PointBaseType lacunarity=2.0, bool turbulent=true, const N &noise=N())
 
 Turbulence (const Turbulence &other)
 Copy constructor.
 
Value turbulence (const Point &p) const
 
Value turbulence (const Point &p, PointBaseType filterWidth) const
 As above but performs antialiasing using frequency clamping.
 
Property access

These functions let you modify the properties of the turbulence.

void setOctaves (unsigned int octaves)
 
unsigned int getOctaves () const
 
void setGain (const Value &gain)
 
const Value & getGain () const
 
void setLacunarity (PointBaseType lacunarity)
 
PointBaseType getLacunarity () const
 
void setTurbulent (bool turbulent)
 
bool getTurbulent () const
 
void setNoise (const Noise &n)
 
const Noise & getNoise () const
 

Detailed Description

template<typename N>
class IECore::Turbulence< N >

The Turbulence class template provides a pretty standard turbulence/fbm implementation on top of the PerlinNoise class. Like the PerlinNoise class it can operate across a broad range of input and output types. The template parameter N is simply the type of a PerlinNoise instantiation to be used in generating the turbulence.

Constructor & Destructor Documentation

template<typename N >
IECore::Turbulence< N >::Turbulence ( const unsigned int  octaves = 4,
const Value &  gain = Value(0.5),
PointBaseType  lacunarity = 2.0,
bool  turbulent = true,
const N &  noise = N() 
)

Constructor. All the arguments are as you would expect. Vector values are used for lacunarity and gain so that they can be different in each dimension. If turbulent is true you get turbulence if it's false you get fbm.

Member Function Documentation

template<typename N >
Value IECore::Turbulence< N >::turbulence ( const Point &  p) const

Returns the turbulence value at the specified point. The range of the components of the returned value is from -0.5 to 0.5.


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