PyFastNoiseSIMD C-Extension¶
-
pyfastnoisesimd.extension.
AlignedSize
()¶ AlignedSize(int size) – Rounds the size up to the nearest aligned size for the current SIMD level.
-
class
pyfastnoisesimd.extension.
FNS
¶ FastNoiseSIMD factory
-
FillNoiseSet
()¶ FillNoiseSet(float* noiseSet, int xStart, int yStart, int zStart, int xSize, int ySize, int zSize, float scaleModifier)– Fill a noise set.
-
GetSeed
()¶ int GetSeed() – Returns seed used for all noise types.
-
NoiseFromCoords
()¶ NoiseFromCoords(numpy.ndarray noise, numpy.ndarray coords)– Fill a noise set from arbitrary coordinates. Must be a shape (3,N) array of dtype ‘float32’.
-
SetAxesScales
()¶ SetAxesScales(float zScale, float yScale, float xScale) – Sets scaling factor for individual axis. Defaults: 1.0.
-
SetCellularDistance2Indices
()¶ SetCellularDistance2Indices(int cellularDistanceIndex0, int cellularDistanceIndex1) – Sets the 2 distance indicies used for distance2 return types. Default: 0, 1. Note: index0 should be lower than index1, index1 must be < 4.
-
SetCellularDistanceFunction
()¶ SetCellularDistanceFunction(int cellularDistanceFunction) – Sets distance function used in cellular noise calculations. Default: Euclidean. Use the dict _ext.cellularDistanceFunction to convert names to enums.
-
SetCellularJitter
()¶ SetCellularJitter(float cellularJitter) – Sets relative frequency on the cellular noise lookup return type. Default: 0.2
-
SetCellularNoiseLookupFrequency
()¶ SetCellularNoiseLookupFrequency(float cellularNoiseLookupFrequency) – Sets relative frequency on the cellular noise lookup return type. Default: 0.2
-
SetCellularNoiseLookupType
()¶ SetCellularNoiseLookupType(int cellularNoiseLookupType)– Sets the type of noise used if cellular return type is set to NoiseLookup. Default: Simplex. Use the dict _ext.noiseType to convert names to enums.
-
SetCellularReturnType
()¶ SetCellularReturnType(int cellularReturnType) – Sets return type from cellular noise calculations. Default: Distance. Use the dict _ext.cellularReturnType to convert names to enums.
-
SetFractalGain
()¶ SetFractalGain(float gain) – Sets octave gain for all fractal noise types. Default: 0.5.
-
SetFractalLacunarity
()¶ SetFractalLacunarity(float lacunarity) – Sets octave lacunarity for all fractal noise types. Default: 2.0.
-
SetFractalOctaves
()¶ SetFractalOctaves(int octaves) – Sets octave count for all fractal noise types. Default: 3.
-
SetFractalType
()¶ SetFractalType(int fractalType) – Sets method for combining octaves in all fractal noise types. Default: FBM. Use the dict _ext.fractalType to convert names to enums.
-
SetFrequency
()¶ SetFrequency(float frequency) – Sets frequency for all noise types. Default: 0.01
-
SetNoiseType
()¶ SetNoiseType(NoiseType noiseType) – Sets noise return type of (Get/Fill)NoiseSet(). Default: Simplex. Use the dict _ext.noiseType to convert names to enums.
-
SetPerturbAmp
()¶ SetPerturbAmp(float perturbAmp) – Sets the maximum distance the input position can be perturbed. Default: 1.0.
-
SetPerturbFractalGain
()¶ SetPerturbFractalGain(float perturbGain) – Sets octave gain for perturb fractal types. Default: 0.5.
-
SetPerturbFractalLacunarity
()¶ SetPerturbFractalLacunarity(float perturbLacunarity) – Sets octave lacunarity for perturb fractal types. Default: 2.0.
-
SetPerturbFractalOctaves
()¶ SetPerturbFractalOctaves(int perturbOctaves)– Sets octave count for perturb fractal types. Default: 3.
-
SetPerturbFrequency
()¶ SetPerturbFrequency(float perturbFrequency) – Set the relative frequency for the perturb gradient. Default: 0.5.
-
SetPerturbNormaliseLength
()¶ SetPerturbNormaliseLength(float perturbGain) – Sets the length for vectors after perturb normalising . Default: 1.0.
-
SetPerturbType
()¶ SetPerturbType(int perturbType) – Enables position perturbing for all noise types. Default: None. Use the dict _ext.perturbType to convert names to enums.
-
SetSeed
()¶ SetSeed(int seed) – Sets seed used for all noise types. Default is 42.
-