MCPcopy Create free account
hub / github.com/FastLED/FastLED / Luminova

Method Luminova

src/fl/fx/2d/luminova.cpp.hpp:19–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17namespace fl {
18
19Luminova::Luminova(const XYMap &xyMap, const Params &params)
20 : Fx2d(xyMap), mParams(params) {
21 int cap = params.max_particles;
22 if (cap <= 0) {
23 cap = 1;
24 }
25 mParticles.resize(static_cast<size_t>(cap));
26 // Initialize as dead
27 for (size_t i = 0; i < mParticles.size(); ++i) {
28 mParticles[i].alive = false;
29 }
30}
31
32void Luminova::setMaxParticles(int max_particles) {
33 if (max_particles <= 0) {

Callers

nothing calls this directly

Calls 2

resizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected