ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
ProtoDRController.h
Go to the documentation of this file.
1#pragma once
2
3#include <Arduino.h>
4#include <OctoWS2811.h>
5#include "Controller.h"
6#include "Render/Camera.h"
7#include "Flash/PixelGroups/ProtoDR.h"
8#include "Flash/PixelGroups/ProtoDRMini.h"
9
10const int ledsPerStrip = 306;
11DMAMEM int displayMemory[306 * 6];
12int drawingMemory[306 * 6];
13const int config = WS2811_GRB | WS2811_800kHz;
14
16
18public:
19 enum Side{
21 RIGHT
22 };
23
24private:
26
27 Transform camFronTopTransform = Transform(Vector3D( 35.25f, -2.25f, 216.5f), Vector3D( 68.25f, 210.75f, 31.0f - 5000.0f), Vector3D(-1, 1, 1));
28 Transform camRearTopTransform = Transform(Vector3D( -36.5f, 14.0f, 45.0f), Vector3D( 15.5f, 117.5f, -43.5f - 5000.0f), Vector3D(-1, 1, 1));
29 Transform camFronBotTransform = Transform(Vector3D( 20.25f, 7.0f, 1.0f), Vector3D( 0, 0, 0 - 5000.0f), Vector3D( 1, 1, 1));
30 Transform camRearBotTransform = Transform(Vector3D( -20.75f, -16.5f, 177.5f), Vector3D( 17, 122, -42 - 5000.0f), Vector3D( 1, 1, 1));
31
34
41
48
50
51public:
53 switch(side){
54 case LEFT:
55 camRearMidTransform = Transform(Vector3D(13.5f, -189.0f, 312.5f), Vector3D(-59.0f, 191.0f, 175.0f - 5000.0f), Vector3D(1, 1, 1));
56 camFronMidTransform = Transform(Vector3D(-13.5f, 171.0f, 132.5f), Vector3D(-126.0f, 117.5f, 191.0f - 5000.0f), Vector3D(1, 1, 1));
57 break;
58 case RIGHT:
59 camRearMidTransform = Transform(Vector3D(-7.5f, 15.5f, 44.5f), Vector3D(-195.0f, 184.0f, -113.0f - 5000.0f), Vector3D(1, 1, 1));
60 camFronMidTransform = Transform(Vector3D(7.5f, -15.5f, -135.5f), Vector3D(10.5f, 122.5f, -46.5f - 5000.0f), Vector3D(1, 1, 1));
61 break;
62 default:
63 break;
64 }
65 }
66
67 void Initialize() override{
68 leds.begin();
69 leds.show();
70 }
71
95};
Declares the Controller base class for managing lighting controllers.
const int config
OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config)
int drawingMemory[306 *6]
DMAMEM int displayMemory[306 *6]
const int ledsPerStrip
DMAMEM Vector2D ProtoDRMini[89]
Definition ProtoDRMini.h:3
DMAMEM Vector2D ProtoDRCamera[306]
Definition ProtoDR.h:3
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
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.
Transform camFronTopTransform
void Initialize() override
Initializes the controller.
CameraBase * cameras[6]
Camera< 306 > camFronTop
Transform camRearMidTransform
PixelGroup< 306 > camRearTopPixels
void Display() override
Updates and displays content on the lighting system.
Transform camFronBotTransform
Camera< 306 > camFronBot
PixelGroup< 306 > camFronTopPixels
Transform camRearBotTransform
PixelGroup< 306 > camFronBotPixels
ProtoDRController(uint8_t maxBrightness, Side side)
Transform camFronMidTransform
PixelGroup< 306 > camRearBotPixels
Camera< 306 > camRearBot
Camera< 306 > camRearTop
PixelGroup< 89 > camRearMidPixels
PixelGroup< 89 > camFronMidPixels
Camera< 89 > camRearMid
Camera< 89 > camFronMid
CameraLayout cameraLayout
Transform camRearTopTransform
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