ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
KaiborgV1Controller.h
Go to the documentation of this file.
1#include <Arduino.h>
2#include <OctoWS2811.h>
3
4#include "Controller.h"
5#include "Render/Camera.h"
6#include "Flash/PixelGroups/KaiborgV1Pixels.h"
7
8const int ledsPerStrip = 346;
9DMAMEM int displayMemory[346 * 6];
10int drawingMemory[346 * 6];
11const int config = WS2811_GRB | WS2811_800kHz;
12
14
16private:
18
21
24
27
29
30public:
32
33 void Initialize() override{
34 leds.begin();
35 leds.show();
36 }
37
38 void Display() override {
39 for (int i = 0; i < 571; i++){
42 }
43
44 for (int i = 0; i < 571; i++) {
45 if (i < 346){
46 leds.setPixel(i + 346 * 2, camLeftPixels.GetColor(i + 225)->R, camLeftPixels.GetColor(i + 225)->G, camLeftPixels.GetColor(i + 225)->B);//Pin 7
47 leds.setPixel(i + 346 * 7, camRghtPixels.GetColor(i)->R, camRghtPixels.GetColor(i)->G, camRghtPixels.GetColor(i)->B);//Pin 8
48 }
49 else{
50 leds.setPixel(i + 346 * 2, camLeftPixels.GetColor(i - 346)->R, camLeftPixels.GetColor(i - 346)->G, camLeftPixels.GetColor(i - 346)->B);//Pin 8
51 leds.setPixel(i + 346 * 5, camRghtPixels.GetColor(i)->R, camRghtPixels.GetColor(i)->G, camRghtPixels.GetColor(i)->B);//Pin 8
52 }
53 }
54
55 leds.show();
56 }
57};
Declares the Controller base class for managing lighting controllers.
DMAMEM int displayMemory[346 *6]
const int config
OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config)
int drawingMemory[346 *6]
const int ledsPerStrip
Base class for managing camera properties and transformations.
Definition CameraBase.h:26
Manages camera orientation and axis alignment.
@ YUp
Up along the positive Y-axis.
@ ZForward
Forward along the positive Z-axis.
Manages camera behavior and pixel groups.
Definition Camera.h:27
Base class for managing brightness and display operations of lighting controllers.
Definition Controller.h:25
uint8_t brightness
Current brightness level.
Definition Controller.h:32
uint8_t maxBrightness
Maximum allowed brightness level.
Definition Controller.h:34
@ ZEROTOMAX
Traverse from minimum to maximum indices.
Definition IPixelGroup.h:32
@ MAXTOZERO
Traverse from maximum to minimum indices.
Definition IPixelGroup.h:33
void Initialize() override
Initializes the controller.
KaiborgV1Controller(uint8_t maxBrightness)
void Display() override
Updates and displays content on the lighting system.
PixelGroup< 571 > camLeftPixels
PixelGroup< 571 > camRghtPixels
Manages a collection of pixels with positions, colors, and spatial relationships.
Definition PixelGroup.h:27
RGBColor * GetColor(uint16_t count) override
Retrieves the color of a specific pixel.
RGBColor Scale(const uint8_t &maxBrightness)
Scales the brightness of the color to a maximum value.
Definition RGBColor.cpp:29
uint8_t B
Blue component of the color (0-255).
Definition RGBColor.h:27
uint8_t G
Green component of the color (0-255).
Definition RGBColor.h:26
uint8_t R
Red component of the color (0-255).
Definition RGBColor.h:25
Represents a 3D transformation including position, rotation, and scale.
Definition Transform.h:22
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.
Definition Vector3D.h:26