FluxSand 1.0
FluxSand - Interactive Digital Hourglass
Loading...
Searching...
No Matches
CompGuiX Class Reference

LED Matrix GUI Controller with Dual Orientation Support and Sand Animation Physics. More...

#include <comp_gui.hpp>

Collaboration diagram for CompGuiX:

Public Types

enum class  Orientation { Landscape , Portrait }
 
enum class  RegionID { SCREEN_0_LANDSCAPE , SCREEN_1_LANDSCAPE , SCREEN_0_PORTRAIT , SCREEN_1_PORTRAIT }
 

Public Member Functions

 CompGuiX (Max7219< 8 > &display, Orientation ori=Orientation::Portrait)
 Construct with MAX7219 display reference.
 
void SetOrientation (Orientation ori)
 Update display orientation.
 
void Draw (RegionID region, int value)
 Draw 2-digit number in specified region.
 
void Clear ()
 Clear display buffer.
 
void SetGravityDegree (float gravity_angle)
 Set gravity direction for sand physics.
 
void SandEnable ()
 Enable sand simulation.
 
void SandDisable ()
 Disable sand simulation.
 
void ThreadFun ()
 Animation thread entry point.
 
void SetLight (uint8_t light)
 Set display brightness (0-15)
 
void RenderTimeLandscape (uint8_t hour, uint8_t minute)
 Render HH:MM in landscape orientation.
 
void RenderTimeLandscapeMS (uint8_t minutes, uint8_t seconds)
 Render MM:SS with blinking colon.
 
void RenderTimePortrait (uint8_t hour, uint8_t minute)
 Render HH:MM in portrait orientation.
 
void RenderTimePortraitMS (uint8_t minutes, uint8_t seconds)
 Render MM:SS with dynamic colon.
 
void RenderHumidity (uint8_t humidity)
 
void RenderTemperature (uint8_t temperature)
 
void RenderHourglass (SandGrid *up, SandGrid *down)
 
void Reset ()
 Reset sand simulation.
 
void RunUnitTest ()
 

Data Fields

bool sand_enable_ = false
 Sand animation toggle.
 
SandGrid grid_up_
 
SandGrid grid_down_
 Sand particle containers.
 
float gravity_deg_ = 0.0f
 Gravity direction (degrees)
 

Private Member Functions

void DrawDigit (int leftX, int topY, const std::array< std::string, 7 > &bitmap, RegionID region)
 Render digit using 5x7 bitmap.
 
void PlotRotated45 (int lx, int ly, RegionID region, bool on)
 Coordinate transformation for 45° rotated displays.
 

Private Attributes

Max7219< 8 > & display_
 LED matrix driver.
 
Orientation orientation_
 Current orientation.
 
bool reset_ = false
 Reset flag.
 
std::thread thread_
 Animation thread.
 

Static Private Attributes

static constexpr std::array< std::array< std::string, 7 >, 10 > FONT
 
static constexpr std::array< std::pair< int, int >, 4 > REGION_OFFSETSS
 

Detailed Description

LED Matrix GUI Controller with Dual Orientation Support and Sand Animation Physics.

Definition at line 15 of file comp_gui.hpp.

Member Enumeration Documentation

◆ Orientation

enum class CompGuiX::Orientation
strong

Definition at line 18 of file comp_gui.hpp.

18{ Landscape, Portrait };

◆ RegionID

enum class CompGuiX::RegionID
strong

Definition at line 21 of file comp_gui.hpp.

21 {
22 SCREEN_0_LANDSCAPE,
23 SCREEN_1_LANDSCAPE,
24 SCREEN_0_PORTRAIT,
25 SCREEN_1_PORTRAIT
26 };

Constructor & Destructor Documentation

◆ CompGuiX()

CompGuiX::CompGuiX ( Max7219< 8 > &  display,
Orientation  ori = Orientation::Portrait 
)
inlineexplicit

Construct with MAX7219 display reference.

Parameters
displayReference to 8x8 LED matrix driver
oriInitial display orientation

Definition at line 33 of file comp_gui.hpp.

35 : display_(display), orientation_(ori) {
36 thread_ = std::thread(&CompGuiX::ThreadFun, this);
37 }
std::thread thread_
Animation thread.
Definition comp_gui.hpp:123
Orientation orientation_
Current orientation.
Definition comp_gui.hpp:121
void ThreadFun()
Animation thread entry point.
Definition comp_gui.hpp:80
Max7219< 8 > & display_
LED matrix driver.
Definition comp_gui.hpp:120

Member Function Documentation

◆ Clear()

void CompGuiX::Clear ( )
inline

Clear display buffer.

Definition at line 57 of file comp_gui.hpp.

57{ display_.Clear(); }

◆ Draw()

void CompGuiX::Draw ( RegionID  region,
int  value 
)
inline

Draw 2-digit number in specified region.

Parameters
regionTarget display region
valueNumber to display (0-99)

Definition at line 47 of file comp_gui.hpp.

47 {
48 int tens = (value / 10) % 10;
49 int ones = value % 10;
50
51 auto [baseX, baseY] = REGION_OFFSETSS[static_cast<int>(region)];
52 DrawDigit(baseX, baseY, FONT[tens], region);
53 DrawDigit(baseX + 5, baseY, FONT[ones], region); // Right-aligned
54 }
void DrawDigit(int leftX, int topY, const std::array< std::string, 7 > &bitmap, RegionID region)
Render digit using 5x7 bitmap.
Definition comp_gui.hpp:154

◆ DrawDigit()

void CompGuiX::DrawDigit ( int  leftX,
int  topY,
const std::array< std::string, 7 > &  bitmap,
RegionID  region 
)
inlineprivate

Render digit using 5x7 bitmap.

Parameters
leftXLeftmost X coordinate
topYTop Y coordinate
bitmapFont glyph data
regionTarget display region

Definition at line 154 of file comp_gui.hpp.

155 {
156 for (int dy = 0; dy < 7; ++dy) {
157 for (int dx = 0; dx < 5; ++dx) {
158 if (bitmap[6 - dy][dx] == '1') {
159 PlotRotated45(leftX + dx, topY + dy, region, true);
160 }
161 }
162 }
163 }
void PlotRotated45(int lx, int ly, RegionID region, bool on)
Coordinate transformation for 45° rotated displays.
Definition comp_gui.hpp:172

◆ PlotRotated45()

void CompGuiX::PlotRotated45 ( int  lx,
int  ly,
RegionID  region,
bool  on 
)
inlineprivate

Coordinate transformation for 45° rotated displays.

Parameters
lxLogical X coordinate
lyLogical Y coordinate
regionTarget display region
onPixel state (true = on)

Definition at line 172 of file comp_gui.hpp.

172 {
173 int row = 0, col = 0;
174
175 if (orientation_ != Orientation::Landscape) {
176 // Portrait mode transform
177 row = lx + ly;
178 col = -lx + ly;
179
180 if (region == RegionID::SCREEN_0_PORTRAIT) {
181 col += 8;
182 } else if (region == RegionID::SCREEN_1_PORTRAIT) {
183 col += 24;
184 }
185 } else {
186 // Landscape mode transform
187 row = lx - ly;
188 col = lx + ly;
189
190 if (region == RegionID::SCREEN_0_LANDSCAPE) {
191 row += 8;
192 } else if (region == RegionID::SCREEN_1_LANDSCAPE) {
193 col += 16;
194 }
195 }
196
197 if (row >= 0 && row < 16 && col >= 0 && col < 32) {
198 display_.DrawPixelMatrix2(row, col, on);
199 }
200 }

◆ RenderHourglass()

void CompGuiX::RenderHourglass ( SandGrid up,
SandGrid down 
)
inline

Definition at line 363 of file comp_gui.hpp.

363 {
364 display_.Lock();
365 Clear();
366 for (int i = 0; i < 2; i++) {
367 for (int j = 0; j < 2; j++) {
368 for (int k = 0; k < 8; k++) {
369 for (int l = 0; l < 8; l++) {
370 display_.DrawPixel(i * 2 + j + 4, k, l,
371 up->GetGrid()[k + i * 8][l + j * 8]);
372 }
373 }
374 }
375 }
376
377 for (int i = 0; i < 2; i++) {
378 for (int j = 0; j < 2; j++) {
379 for (int k = 0; k < 8; k++) {
380 for (int l = 0; l < 8; l++) {
381 display_.DrawPixel(i * 2 + j, k, l,
382 down->GetGrid()[k + i * 8][l + j * 8]);
383 }
384 }
385 }
386 }
387 display_.Unlock();
388 }
void Clear()
Clear display buffer.
Definition comp_gui.hpp:57

◆ RenderHumidity()

void CompGuiX::RenderHumidity ( uint8_t  humidity)
inline

Definition at line 293 of file comp_gui.hpp.

293 {
294 static constexpr bool ICON[16][16] = {
295 {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
296 {1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
297 {1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
298 {0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0},
299 {0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0},
300 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
301 {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
302 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
303 {0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
304 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0},
305 {0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0},
306 {0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0},
307 {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0},
308 {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0},
309 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0},
310 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
311 };
312 display_.Lock();
313 Clear();
314 SetOrientation(Orientation::Portrait);
315 for (int i = 0; i < 2; i++) {
316 for (int j = 0; j < 2; j++) {
317 for (int k = 0; k < 8; k++) {
318 for (int l = 0; l < 8; l++) {
319 display_.DrawPixel(i * 2 + j + 4, k, l, ICON[k + i * 8][l + j * 8]);
320 }
321 }
322 }
323 }
324 Draw(RegionID::SCREEN_0_PORTRAIT, humidity);
325 display_.Unlock();
326 }
void Draw(RegionID region, int value)
Draw 2-digit number in specified region.
Definition comp_gui.hpp:47
void SetOrientation(Orientation ori)
Update display orientation.
Definition comp_gui.hpp:40

◆ RenderTemperature()

void CompGuiX::RenderTemperature ( uint8_t  temperature)
inline

Definition at line 328 of file comp_gui.hpp.

328 {
329 static constexpr bool ICON[16][16] = {
330 {0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
331 {0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0},
332 {1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0},
333 {1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0},
334 {1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0},
335 {0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0},
336 {0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0},
337 {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0},
338 {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0},
339 {0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0},
340 {0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
341 {0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0},
342 {0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0},
343 {0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0},
344 {0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0},
345 {0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
346 };
347 display_.Lock();
348 Clear();
349 SetOrientation(Orientation::Portrait);
350 for (int i = 0; i < 2; i++) {
351 for (int j = 0; j < 2; j++) {
352 for (int k = 0; k < 8; k++) {
353 for (int l = 0; l < 8; l++) {
354 display_.DrawPixel(i * 2 + j + 4, k, l, ICON[k + i * 8][l + j * 8]);
355 }
356 }
357 }
358 }
359 Draw(RegionID::SCREEN_0_PORTRAIT, temperature);
360 display_.Unlock();
361 }

◆ RenderTimeLandscape()

void CompGuiX::RenderTimeLandscape ( uint8_t  hour,
uint8_t  minute 
)
inline

Render HH:MM in landscape orientation.

Definition at line 207 of file comp_gui.hpp.

207 {
208 display_.Lock();
209 Clear();
210 SetOrientation(Orientation::Landscape);
211 display_.DrawPixel(3, 7, 4, true); // Colon top
212 display_.DrawPixel(3, 4, 7, true); // Colon bottom
213 Draw(RegionID::SCREEN_0_LANDSCAPE, hour);
214 Draw(RegionID::SCREEN_1_LANDSCAPE, minute);
215 display_.Unlock();
216 }

◆ RenderTimeLandscapeMS()

void CompGuiX::RenderTimeLandscapeMS ( uint8_t  minutes,
uint8_t  seconds 
)
inline

Render MM:SS with blinking colon.

Definition at line 219 of file comp_gui.hpp.

219 {
220 display_.Lock();
221 Clear();
222 SetOrientation(Orientation::Landscape);
223 if (seconds % 2 == 1) {
224 display_.DrawPixel(3, 7, 4, true);
225 display_.DrawPixel(3, 4, 7, true);
226 }
227 Draw(RegionID::SCREEN_0_LANDSCAPE, minutes);
228 Draw(RegionID::SCREEN_1_LANDSCAPE, seconds);
229 display_.Unlock();
230 }

◆ RenderTimePortrait()

void CompGuiX::RenderTimePortrait ( uint8_t  hour,
uint8_t  minute 
)
inline

Render HH:MM in portrait orientation.

Definition at line 233 of file comp_gui.hpp.

233 {
234 display_.Lock();
235 Clear();
236 SetOrientation(Orientation::Portrait);
237
238 // Complex colon design
239 display_.DrawPixel(4, 2, 0, true);
240 display_.DrawPixel(4, 3, 1, true);
241 display_.DrawPixel(4, 4, 2, true);
242 display_.DrawPixel(4, 2, 2, true);
243 display_.DrawPixel(4, 0, 2, true);
244 display_.DrawPixel(4, 1, 3, true);
245 display_.DrawPixel(4, 2, 4, true);
246
247 display_.DrawPixel(0, 4, 0, true);
248 display_.DrawPixel(0, 4, 1, true);
249 display_.DrawPixel(0, 4, 2, true);
250 display_.DrawPixel(0, 3, 2, true);
251 display_.DrawPixel(0, 2, 2, true);
252 display_.DrawPixel(0, 2, 3, true);
253 display_.DrawPixel(0, 2, 4, true);
254 display_.DrawPixel(0, 1, 4, true);
255 display_.DrawPixel(0, 0, 4, true);
256
257 Draw(RegionID::SCREEN_0_PORTRAIT, minute);
258 Draw(RegionID::SCREEN_1_PORTRAIT, hour);
259 display_.Unlock();
260 }

◆ RenderTimePortraitMS()

void CompGuiX::RenderTimePortraitMS ( uint8_t  minutes,
uint8_t  seconds 
)
inline

Render MM:SS with dynamic colon.

Definition at line 263 of file comp_gui.hpp.

263 {
264 display_.Lock();
265 Clear();
266 SetOrientation(Orientation::Portrait);
267
268 if (seconds % 2 == 1) {
269 display_.DrawPixel(4, 4, 0, true);
270 display_.DrawPixel(4, 4, 1, true);
271 display_.DrawPixel(4, 4, 2, true);
272 display_.DrawPixel(4, 3, 2, true);
273 display_.DrawPixel(4, 2, 2, true);
274 display_.DrawPixel(4, 2, 3, true);
275 display_.DrawPixel(4, 2, 4, true);
276 display_.DrawPixel(4, 1, 4, true);
277 display_.DrawPixel(4, 0, 4, true);
278 }
279
280 if (seconds % 2 != 1) {
281 display_.DrawPixel(0, 0, 0, true);
282 display_.DrawPixel(0, 1, 0, true);
283 display_.DrawPixel(0, 1, 1, true);
284 display_.DrawPixel(0, 1, 2, true);
285 display_.DrawPixel(0, 2, 2, true);
286 }
287
288 Draw(RegionID::SCREEN_0_PORTRAIT, seconds);
289 Draw(RegionID::SCREEN_1_PORTRAIT, minutes);
290 display_.Unlock();
291 }

◆ Reset()

void CompGuiX::Reset ( )
inline

Reset sand simulation.

Definition at line 391 of file comp_gui.hpp.

391{ reset_ = true; }
bool reset_
Reset flag.
Definition comp_gui.hpp:122

◆ RunUnitTest()

void CompGuiX::RunUnitTest ( )
inline

Definition at line 393 of file comp_gui.hpp.

393 {
394 std::cout << "[CompGuiX::UnitTest] Starting GUI unit test...\n";
395
396 SetLight(5); // Set medium brightness
397 SetOrientation(Orientation::Portrait);
398
399 // Test digit drawing
400 std::cout << "[Test] Draw number 42 in portrait...\n";
401 Draw(RegionID::SCREEN_0_PORTRAIT, 42);
402 std::this_thread::sleep_for(std::chrono::milliseconds(500));
403
404 std::cout << "[Test] Draw time 12:34 in portrait...\n";
405 RenderTimePortrait(12, 34);
406 std::this_thread::sleep_for(std::chrono::milliseconds(500));
407
408 std::cout << "[Test] Draw time 12:34 in landscape...\n";
409 RenderTimeLandscape(12, 34);
410 std::this_thread::sleep_for(std::chrono::milliseconds(500));
411
412 std::cout << "[Test] Render humidity icon...\n";
413 RenderHumidity(65);
414 std::this_thread::sleep_for(std::chrono::milliseconds(500));
415
416 std::cout << "[Test] Render temperature icon...\n";
417 RenderTemperature(23);
418 std::this_thread::sleep_for(std::chrono::milliseconds(500));
419
420 std::cout << "[Test] Enable sand...\n";
421 SandEnable();
422 std::this_thread::sleep_for(std::chrono::milliseconds(500));
423 std::cout << "[Test] Reset sand...\n";
424 Reset();
425 std::this_thread::sleep_for(std::chrono::milliseconds(500));
426 std::cout << "[Test] Disable sand...\n";
427 SandDisable();
428
429 std::cout << "[CompGuiX::UnitTest] ✅ Test complete.\n";
430 }
void Reset()
Reset sand simulation.
Definition comp_gui.hpp:391
void SandDisable()
Disable sand simulation.
Definition comp_gui.hpp:77
void RenderTimePortrait(uint8_t hour, uint8_t minute)
Render HH:MM in portrait orientation.
Definition comp_gui.hpp:233
void RenderTimeLandscape(uint8_t hour, uint8_t minute)
Render HH:MM in landscape orientation.
Definition comp_gui.hpp:207
void SandEnable()
Enable sand simulation.
Definition comp_gui.hpp:74
void SetLight(uint8_t light)
Set display brightness (0-15)
Definition comp_gui.hpp:204

◆ SandDisable()

void CompGuiX::SandDisable ( )
inline

Disable sand simulation.

Definition at line 77 of file comp_gui.hpp.

77{ sand_enable_ = false; }
bool sand_enable_
Sand animation toggle.
Definition comp_gui.hpp:69

◆ SandEnable()

void CompGuiX::SandEnable ( )
inline

Enable sand simulation.

Definition at line 74 of file comp_gui.hpp.

74{ sand_enable_ = true; }

◆ SetGravityDegree()

void CompGuiX::SetGravityDegree ( float  gravity_angle)
inline

Set gravity direction for sand physics.

Parameters
gravity_angleInput angle in radians

Definition at line 63 of file comp_gui.hpp.

63 {
64 float deg = fmodf(
65 630.0f - gravity_angle * 180.0f / static_cast<float>(M_PI), 360.0f);
66 gravity_deg_ = deg;
67 }
float gravity_deg_
Gravity direction (degrees)
Definition comp_gui.hpp:71

◆ SetLight()

void CompGuiX::SetLight ( uint8_t  light)
inline

Set display brightness (0-15)

Definition at line 204 of file comp_gui.hpp.

204{ display_.SetIntensity(light); }

◆ SetOrientation()

void CompGuiX::SetOrientation ( Orientation  ori)
inline

Update display orientation.

Definition at line 40 of file comp_gui.hpp.

40{ orientation_ = ori; }

◆ ThreadFun()

void CompGuiX::ThreadFun ( )
inline

Animation thread entry point.

Definition at line 80 of file comp_gui.hpp.

80 {
81 std::this_thread::sleep_for(std::chrono::milliseconds(500));
82 init:
83 grid_up_.Clear();
84 grid_down_.Clear();
85
86 // Initial fill animation
87 for (int i = 0; i < 128;) {
88 if (grid_up_.AddNewSand()) {
89 i++;
90 }
91 grid_up_.StepOnce(0);
92 RenderHourglass(&grid_up_, &grid_down_);
93 std::this_thread::sleep_for(std::chrono::milliseconds(25));
94 }
95
96 // Settling phase
97 for (int i = 0; i < 16; i++) {
98 grid_up_.StepOnce(0);
99 RenderHourglass(&grid_up_, &grid_down_);
100 std::this_thread::sleep_for(std::chrono::milliseconds(25));
101 }
102
103 // Main simulation loop
104 while (1) {
105 if (sand_enable_) {
106 if (reset_) {
107 reset_ = false;
108 goto init;
109 }
110 grid_up_.StepOnce(gravity_deg_);
111 grid_down_.StepOnce(gravity_deg_);
112 RenderHourglass(&grid_up_, &grid_down_);
113 }
114 std::this_thread::sleep_for(std::chrono::milliseconds(25));
115 }
116 }
SandGrid grid_down_
Sand particle containers.
Definition comp_gui.hpp:70

Field Documentation

◆ display_

Max7219<8>& CompGuiX::display_
private

LED matrix driver.

Definition at line 120 of file comp_gui.hpp.

◆ FONT

constexpr std::array<std::array<std::string, 7>, 10> CompGuiX::FONT
staticconstexprprivate
Initial value:
= {{
{"01110", "10001", "10011", "10101", "11001", "10001", "01110"},
{"00100", "01100", "00100", "00100", "00100", "00100", "01110"},
{"01110", "10001", "00001", "00010", "00100", "01000", "11111"},
{"01110", "10001", "00001", "00110", "00001", "10001", "01110"},
{"00010", "00110", "01010", "10010", "11111", "00010", "00010"},
{"11111", "10000", "11110", "00001", "00001", "10001", "01110"},
{"00110", "01000", "10000", "11110", "10001", "10001", "01110"},
{"11111", "00001", "00010", "00100", "01000", "01000", "01000"},
{"01110", "10001", "10001", "01110", "10001", "10001", "01110"},
{"01110", "10001", "10001", "01111", "00001", "00010", "01100"},
}}

Definition at line 126 of file comp_gui.hpp.

126 {{
127 {"01110", "10001", "10011", "10101", "11001", "10001", "01110"}, // 0
128 {"00100", "01100", "00100", "00100", "00100", "00100", "01110"}, // 1
129 {"01110", "10001", "00001", "00010", "00100", "01000", "11111"}, // 2
130 {"01110", "10001", "00001", "00110", "00001", "10001", "01110"}, // 3
131 {"00010", "00110", "01010", "10010", "11111", "00010", "00010"}, // 4
132 {"11111", "10000", "11110", "00001", "00001", "10001", "01110"}, // 5
133 {"00110", "01000", "10000", "11110", "10001", "10001", "01110"}, // 6
134 {"11111", "00001", "00010", "00100", "01000", "01000", "01000"}, // 7
135 {"01110", "10001", "10001", "01110", "10001", "10001", "01110"}, // 8
136 {"01110", "10001", "10001", "01111", "00001", "00010", "01100"}, // 9
137 }};

◆ gravity_deg_

float CompGuiX::gravity_deg_ = 0.0f

Gravity direction (degrees)

Definition at line 71 of file comp_gui.hpp.

◆ grid_down_

SandGrid CompGuiX::grid_down_

Sand particle containers.

Definition at line 70 of file comp_gui.hpp.

◆ grid_up_

SandGrid CompGuiX::grid_up_

Definition at line 70 of file comp_gui.hpp.

◆ orientation_

Orientation CompGuiX::orientation_
private

Current orientation.

Definition at line 121 of file comp_gui.hpp.

◆ REGION_OFFSETSS

constexpr std::array<std::pair<int, int>, 4> CompGuiX::REGION_OFFSETSS
staticconstexprprivate
Initial value:
= {{
{-2, 1},
{3, -3},
{0, 1},
{0, 1},
}}

Definition at line 140 of file comp_gui.hpp.

140 {{
141 {-2, 1}, // SCREEN_0_LANDSCAPE
142 {3, -3}, // SCREEN_1_LANDSCAPE
143 {0, 1}, // SCREEN_0_PORTRAIT
144 {0, 1}, // SCREEN_1_PORTRAIT
145 }};

◆ reset_

bool CompGuiX::reset_ = false
private

Reset flag.

Definition at line 122 of file comp_gui.hpp.

◆ sand_enable_

bool CompGuiX::sand_enable_ = false

Sand animation toggle.

Definition at line 69 of file comp_gui.hpp.

◆ thread_

std::thread CompGuiX::thread_
private

Animation thread.

Definition at line 123 of file comp_gui.hpp.


The documentation for this class was generated from the following file: