Lightgraph
C++17 light-graph engine API reference
Loading...
Searching...
No Matches
types.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <optional>
5
6namespace lightgraph {
7
16struct Color {
17 uint8_t r = 0;
18 uint8_t g = 0;
19 uint8_t b = 0;
20};
21
25enum class ObjectType {
28 Line,
29 Cross,
31};
32
33enum class LengthMode : uint8_t {
34 Legacy = 0,
35 Centered = 1,
36};
37
39 uint16_t note_id = 0;
40 float visible_length = 0.0f;
41};
42
55
61 int8_t model = 0;
63 float speed = 1.0f;
65 std::optional<uint16_t> length;
67 uint16_t trail = 0;
69 std::optional<uint32_t> color;
71 uint16_t note_id = 0;
73 uint8_t min_brightness = 0;
75 uint8_t max_brightness = 255;
77 uint16_t behaviour_flags = 0;
79 uint8_t emit_groups = 0;
81 uint8_t emit_offset = 0;
83 uint32_t duration_ms = 0;
85 int8_t from = -1;
87 bool linked = true;
91 std::optional<float> visible_length;
92};
93
94} // namespace lightgraph
ObjectType
Built-in object topologies supported by the high-level engine API.
Definition types.hpp:25
8-bit RGB color.
Definition types.hpp:16
One emit request.
Definition types.hpp:59
uint8_t min_brightness
Minimum brightness bound.
Definition types.hpp:73
LengthMode length_mode
List-length behavior. Centered reserves length and changes visible coverage in place.
Definition types.hpp:89
uint16_t behaviour_flags
Legacy behavior-flag bitmask.
Definition types.hpp:77
float speed
Light speed scalar.
Definition types.hpp:63
std::optional< uint32_t > color
Optional packed RGB color (0xRRGGBB); omitted means random color.
Definition types.hpp:69
std::optional< uint16_t > length
Optional explicit list length.
Definition types.hpp:65
uint16_t trail
Trail length.
Definition types.hpp:67
uint8_t emit_offset
Initial emit position offset.
Definition types.hpp:81
std::optional< float > visible_length
Initial visible span for centered lists; omitted means the full reserved length.
Definition types.hpp:91
bool linked
Whether new lights should be linked.
Definition types.hpp:87
uint32_t duration_ms
Optional list duration in milliseconds (0 means library default behavior).
Definition types.hpp:83
int8_t model
Topology model index.
Definition types.hpp:61
uint8_t emit_groups
Optional emit-group mask override.
Definition types.hpp:79
uint16_t note_id
Optional note identifier for list reuse.
Definition types.hpp:71
uint8_t max_brightness
Maximum brightness bound.
Definition types.hpp:75
int8_t from
Optional source index override (-1 means automatic).
Definition types.hpp:85
Engine construction configuration.
Definition types.hpp:46
uint16_t pixel_count
Optional pixel-count override for configurable objects (line/cross/triangle).
Definition types.hpp:51
bool auto_emit
Enable or disable internal automatic emission on each update/tick.
Definition types.hpp:53
ObjectType object_type
Built-in topology implementation to instantiate.
Definition types.hpp:48