FastLED  3.1
noise.h
Go to the documentation of this file.
1 #ifndef __INC_NOISE_H
2 #define __INC_NOISE_H
3 
4 #include "FastLED.h"
5 
6 FASTLED_NAMESPACE_BEGIN
7 
10 
20 
21 extern uint16_t inoise16(uint32_t x, uint32_t y, uint32_t z);
22 extern uint16_t inoise16(uint32_t x, uint32_t y);
23 extern uint16_t inoise16(uint32_t x);
25 
27 
28 extern int16_t inoise16_raw(uint32_t x, uint32_t y, uint32_t z);
31 extern int16_t inoise16_raw(uint32_t x, uint32_t y);
32 extern int16_t inoise16_raw(uint32_t x);
34 
41 extern uint8_t inoise8(uint16_t x, uint16_t y, uint16_t z);
42 extern uint8_t inoise8(uint16_t x, uint16_t y);
43 extern uint8_t inoise8(uint16_t x);
45 
50 extern int8_t inoise8_raw(uint16_t x, uint16_t y, uint16_t z);
51 extern int8_t inoise8_raw(uint16_t x, uint16_t y);
52 extern int8_t inoise8_raw(uint16_t x);
54 
67 void fill_raw_noise8(uint8_t *pData, uint8_t num_points, uint8_t octaves, uint16_t x, int scalex, uint16_t time);
68 void fill_raw_noise16into8(uint8_t *pData, uint8_t num_points, uint8_t octaves, uint32_t x, int scalex, uint32_t time);
69 void fill_raw_2dnoise8(uint8_t *pData, int width, int height, uint8_t octaves, uint16_t x, int scalex, uint16_t y, int scaley, uint16_t time);
70 void fill_raw_2dnoise16into8(uint8_t *pData, int width, int height, uint8_t octaves, uint32_t x, int scalex, uint32_t y, int scaley, uint32_t time);
71 
72 void fill_raw_2dnoise16(uint16_t *pData, int width, int height, uint8_t octaves, q88 freq88, fract16 amplitude, int skip, uint32_t x, int scalex, uint32_t y, int scaley, uint32_t time);
73 void fill_raw_2dnoise16into8(uint8_t *pData, int width, int height, uint8_t octaves, q44 freq44, fract8 amplitude, int skip, uint32_t x, int scalex, uint32_t y, int scaley, uint32_t time);
75 
79 void fill_noise8(CRGB *leds, int num_leds,
80  uint8_t octaves, uint16_t x, int scale,
81  uint8_t hue_octaves, uint16_t hue_x, int hue_scale,
82  uint16_t time);
83 void fill_noise16(CRGB *leds, int num_leds,
84  uint8_t octaves, uint16_t x, int scale,
85  uint8_t hue_octaves, uint16_t hue_x, int hue_scale,
86  uint16_t time, uint8_t hue_shift=0);
87 void fill_2dnoise8(CRGB *leds, int width, int height, bool serpentine,
88  uint8_t octaves, uint16_t x, int xscale, uint16_t y, int yscale, uint16_t time,
89  uint8_t hue_octaves, uint16_t hue_x, int hue_xscale, uint16_t hue_y, uint16_t hue_yscale,uint16_t hue_time,bool blend);
90 void fill_2dnoise16(CRGB *leds, int width, int height, bool serpentine,
91  uint8_t octaves, uint32_t x, int xscale, uint32_t y, int yscale, uint32_t time,
92  uint8_t hue_octaves, uint16_t hue_x, int hue_xscale, uint16_t hue_y, uint16_t hue_yscale,uint16_t hue_time, bool blend, uint16_t hue_shift=0);
93 
94 FASTLED_NAMESPACE_END
96 
97 #endif
Representation of an RGB pixel (Red, Green, Blue)
Definition: pixeltypes.h:90
uint16_t fract16
ANSI: unsigned _Fract.
Definition: lib8tion.h:343
uint8_t fract8
ANSI unsigned short _Fract.
Definition: lib8tion.h:335
central include file for FastLED, defines the CFastLED class/object
int16_t inoise16_raw(uint32_t x, uint32_t y, uint32_t z)
16 bit raw versions of the noise functions.
Definition: noise.cpp:276
Template class for represneting fractional ints.
Definition: lib8tion.h:754