tcod-haskell-0.1.0.0: Bindings to libtcod roguelike engine

Safe HaskellNone
LanguageHaskell2010

Game.TCOD.Noise

Synopsis

Documentation

newtype TCODNoise Source #

Reference to TCOD noise object

Constructors

TCODNoise 

Fields

Instances

Eq TCODNoise Source # 
Ord TCODNoise Source # 
Show TCODNoise Source # 
Generic TCODNoise Source # 

Associated Types

type Rep TCODNoise :: * -> * #

type Rep TCODNoise Source # 
type Rep TCODNoise = D1 (MetaData "TCODNoise" "Game.TCOD.Noise" "tcod-haskell-0.1.0.0-9JdFGODCf32GFoGmrQ4wdi" True) (C1 (MetaCons "TCODNoise" PrefixI True) (S1 (MetaSel (Just Symbol "unTCODNoise") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ptr ()))))

data TCODNoiseType Source #

Supported noise generator types

Instances

Bounded TCODNoiseType Source # 
Enum TCODNoiseType Source # 
Eq TCODNoiseType Source # 
Ord TCODNoiseType Source # 
Read TCODNoiseType Source # 
Show TCODNoiseType Source # 
Generic TCODNoiseType Source # 

Associated Types

type Rep TCODNoiseType :: * -> * #

type Rep TCODNoiseType Source # 
type Rep TCODNoiseType = D1 (MetaData "TCODNoiseType" "Game.TCOD.Noise" "tcod-haskell-0.1.0.0-9JdFGODCf32GFoGmrQ4wdi" False) ((:+:) ((:+:) (C1 (MetaCons "NoiseDefault" PrefixI False) U1) (C1 (MetaCons "NoisePerlin" PrefixI False) U1)) ((:+:) (C1 (MetaCons "NoiseSimplex" PrefixI False) U1) (C1 (MetaCons "NoiseWavelet" PrefixI False) U1)))

noiseNew Source #

Arguments

:: Int

Dimensions

-> Double

hurst

-> Double

lacunarity

-> TCODRandom

random number generator

-> IO TCODNoise 

Create a new noise object

noiseDelete :: TCODNoise -> IO () Source #

Delete noise object

noiseSetType :: TCODNoise -> TCODNoiseType -> IO () Source #

Choosing a noise type

Use this function to define the default algorithm used by the noise functions. The default algorithm is simplex. It's much faster than Perlin, especially in 4 dimensions. It has a better contrast too.

noiseGetEx Source #

Arguments

:: TCODNoise

the generator handler, returned by the initialization function.

-> Vector Double

An array of coordinates, depending on the generator dimensions (between 1 and 4). The same array of coordinates will always return the same value.

-> TCODNoiseType

The algorithm to use. If not defined, use the default one (set with setType or simplex if not set)

-> IO Double 

Getting flat noise

his function returns the noise function value between -1.0 and 1.0 at given coordinates.

noiseGetFbmEx Source #

Arguments

:: TCODNoise

the generator handler, returned by the initialization function.

-> Vector Double

An array of coordinates, depending on the generator dimensions (between 1 and 4). The same array of coordinates will always return the same value.

-> Float

Number of iterations. Must be < TCOD_NOISE_MAX_OCTAVES = 128

-> TCODNoiseType

The algorithm to use

-> IO Float 

This function returns the fbm function value between -1.0 and 1.0 at given coordinates, using fractal hurst and lacunarity defined when the generator has been created.

noiseGetTurbulenceEx Source #

Arguments

:: TCODNoise

the generator handler, returned by the initialization function.

-> Vector Double

An array of coordinates, depending on the generator dimensions (between 1 and 4). The same array of coordinates will always return the same value.

-> Float

Number of iterations. Must be < TCOD_NOISE_MAX_OCTAVES = 128

-> TCODNoiseType

The algorithm to use

-> IO Float 

Getting turbulence

This function returns the turbulence function value between -1.0 and 1.0 at given coordinates, using fractal hurst and lacunarity defined when the generator has been created.

noiseGet Source #

Arguments

:: TCODNoise

the generator handler, returned by the initialization function.

-> Vector Double

An array of coordinates, depending on the generator dimensions (between 1 and 4). The same array of coordinates will always return the same value.

-> IO Double 

Getting flat noise

his function returns the noise function value between -1.0 and 1.0 at given coordinates.

noiseGetFbm Source #

Arguments

:: TCODNoise

the generator handler, returned by the initialization function.

-> Vector Double

An array of coordinates, depending on the generator dimensions (between 1 and 4). The same array of coordinates will always return the same value.

-> Float

Number of iterations. Must be < TCOD_NOISE_MAX_OCTAVES = 128

-> IO Float 

This function returns the fbm function value between -1.0 and 1.0 at given coordinates, using fractal hurst and lacunarity defined when the generator has been created.

noiseGetTurbulence Source #

Arguments

:: TCODNoise

the generator handler, returned by the initialization function.

-> Vector Double

An array of coordinates, depending on the generator dimensions (between 1 and 4). The same array of coordinates will always return the same value.

-> Float

Number of iterations. Must be < TCOD_NOISE_MAX_OCTAVES = 128

-> IO Float 

Getting turbulence

This function returns the turbulence function value between -1.0 and 1.0 at given coordinates, using fractal hurst and lacunarity defined when the generator has been created.