FastLED 3.10.8
Loading...
Searching...
No Matches
animartrix_detail.h
Go to the documentation of this file.
1#pragma once
2
3#include "fl/stl/noexcept.h"
4// IWYU pragma: private, include "fl/fx/2d/animartrix.hpp"
5// allow-include-after-namespace
6
7// Animartrix detail: Modular implementation of Animartrix effects.
8// Original concept by Stefan Petrick 2023. Adapted to C++ by Netmindz 2023.
9// Adapted to FastLED by Zach Vorhies 2024.
10// Refactored to free-function architecture 2026.
11// Fixed-point optimization migration 2026.
12//
13// Licensed under the MIT License.
14// See LICENSE file in the root of this repository.
15//
16// Architecture: Context struct holds all shared state. Each animation is an
17// IAnimartrix2Viz subclass with a draw(Context&) method. Internally delegates
18// to animartrix_detail::ANIMartRIX for bit-identical output.
19//
20// NOTE: This is an internal implementation header. Do not include directly.
21// Include "fl/fx/2d/animartrix.hpp" instead.
22
23// IWYU pragma: begin_exports
24// Include standalone Animartrix core functionality
28
29#include "crgb.h"
30#include "fl/stl/vector.h"
31#include "fl/math/math.h"
32#include "fl/stl/optional.h"
33#include "fl/stl/stdint.h"
34#include "fl/math/sin32.h"
36#include "fl/math/simd.h"
37
38
39#ifndef PI
40#define PI 3.1415926535897932384626433832795
41#endif
42
43#ifndef FL_ANIMARTRIX_USES_FAST_MATH
44#define FL_ANIMARTRIX_USES_FAST_MATH 1
45#endif
46
47#if FL_ANIMARTRIX_USES_FAST_MATH
50#endif
51
52// Helper structs extracted to separate headers for better organization
62
63// Visualizer declarations (implementations in viz/*.cpp.hpp via unity build)
116// IWYU pragma: end_exports
117
118namespace fl {
119
120// Namespace wrappers for backwards compatibility with test code
121
122namespace q31 {
123 using fl::Chasing_Spirals_Q31; // ok bare using
124 using fl::Chasing_Spirals_Q31_SIMD; // ok bare using
125}
126
127namespace q16 {
128 // Q16 implementation aliased to Q31 (Q16 was removed, use Q31 instead)
132}
133
134
135#if FL_ANIMARTRIX_USES_FAST_MATH
138#endif
139
140} // namespace fl
void draw(Context &ctx) FL_NO_EXCEPT override
#define FL_OPTIMIZATION_LEVEL_O3_BEGIN
#define FL_FAST_MATH_BEGIN
#define FL_FAST_MATH_END
#define FL_OPTIMIZATION_LEVEL_O3_END
void Chasing_Spirals_Q16_Batch4_ColorGrouped(Context &ctx) FL_NO_EXCEPT
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition blur.h:186
Base definition for an LED controller.
Definition crgb.hpp:179
Umbrella header for SIMD subsystem.