ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
DisplayTest.cpp
Go to the documentation of this file.
1#include "DisplayTest.h"
2
4 for (unsigned int i = 0; i < camera->GetPixelGroup()->GetPixelCount(); i++) {
5 RGBColor color = RGBColor(50, 50, 50);
6
7 camera->GetPixelGroup()->GetColor(i)->R = color.R;
8 camera->GetPixelGroup()->GetColor(i)->G = color.G;
9 camera->GetPixelGroup()->GetColor(i)->B = color.B;
10 }
11}
12
14 bool alternate = false;
15
16 for (unsigned int i = 0; i < camera->GetPixelGroup()->GetPixelCount(); i++) {
17 RGBColor color;
18
19 if (alternate){
20 color = RGBColor(50, 50, 50);
21 alternate = !alternate;
22 }
23 else{
24 color = RGBColor(0, 0, 0);
25 alternate = !alternate;
26 }
27
28 camera->GetPixelGroup()->GetColor(i)->R = color.R;
29 camera->GetPixelGroup()->GetColor(i)->G = color.G;
30 camera->GetPixelGroup()->GetColor(i)->B = color.B;
31 }
32}
Defines the DisplayTest class for testing camera displays with various patterns.
Base class for managing camera properties and transformations.
Definition CameraBase.h:26
virtual IPixelGroup * GetPixelGroup()=0
Retrieves the associated pixel group.
static void FillWhite(CameraBase *camera)
Fills the camera display entirely with white pixels.
static void FillAltWhiteBlack(CameraBase *camera)
Fills the camera display with an alternating pattern of white and black pixels.
virtual RGBColor * GetColor(uint16_t count)=0
Retrieves the color of a specific pixel.
Represents an RGB color and provides methods for manipulation.
Definition RGBColor.h:23
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