ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
VerifyEngine.h
Go to the documentation of this file.
1/**
2 * @file VerifyEngine.h
3 * @brief Implementation of a test project to verify the engine functionality.
4 *
5 * This file defines the VerifyEngine class, which is used to validate the behavior
6 * of the rendering engine, camera management, and controller in a test environment.
7 *
8 * @date 22/12/2024
9 * @author Coela Can't
10 */
11
12#pragma once
13
14#include "Templates/Project.h" // Base project template.
15#include "../Assets/Models/OBJ/Background.h" // Background model.
16#include "../Assets/Models/OBJ/DeltaDisplayBackground.h" // Delta display background model.
17
18#include "../Camera/CameraManager/Implementations/HUB75DeltaCameras.h" // Camera manager for HUB75 Delta displays.
19#include "../Controller/HUB75Controller.h" // Controller for HUB75 displays.
20
21#include "../Scene/Materials/Animated/RainbowSpiral.h" // Animated material for rendering.
22
23/**
24 * @class VerifyEngine
25 * @brief A project class to validate the rendering engine functionality.
26 *
27 * The VerifyEngine class is a test project that integrates a background model,
28 * a Delta display background model, and an animated material for verifying the
29 * engine's rendering and update capabilities.
30 */
31class VerifyEngine : public Project {
32private:
33 HUB75DeltaCameraManager cameras; ///< Camera manager for HUB75 Delta displays.
34 HUB75Controller controller = HUB75Controller(&cameras, 50, 50); ///< Controller for managing HUB75 displays.
35
36 Background background; ///< Background object for the scene.
37 DeltaDisplayBackground deltaDisplayBackground; ///< Delta display background object for the scene.
38
39 RainbowSpiral material; ///< Animated material applied to objects.
40
41public:
42 /**
43 * @brief Constructs the VerifyEngine project.
44 *
45 * Initializes the camera manager, controller, scene objects, and applies the animated material.
46 */
48 scene.AddObject(background.GetObject());
50
51 background.GetObject()->SetMaterial(&material);
52 deltaDisplayBackground.GetObject()->SetMaterial(&material);
53 }
54
55 /**
56 * @brief Initializes the controller for the project.
57 */
58 void Initialize() override {
60 }
61
62 /**
63 * @brief Updates the project state.
64 *
65 * @param ratio The time ratio for updates.
66 */
67 void Update(float ratio) override {
68 material.Update(ratio);
69 }
70};
Declares the Project class for managing animations, rendering, and display operations.
Manages HUB75 LED matrices with camera integration.
void Initialize() override
Initializes the HUB75Controller and sets up the LED matrix.
Manages animations, rendering, and display operations.
Definition Project.h:31
Scene scene
The Scene object representing the rendered environment.
Definition Project.h:35
A dynamic material creating a colorful rainbow spiral animation.
void Update(float ratio)
Updates the material animation based on the time ratio.
void AddObject(Object3D *object)
Adds a 3D object to the scene.
Definition Scene.cpp:31
A project class to validate the rendering engine functionality.
RainbowSpiral material
Animated material applied to objects.
void Initialize() override
Initializes the controller for the project.
Background background
Background object for the scene.
void Update(float ratio) override
Updates the project state.
VerifyEngine()
Constructs the VerifyEngine project.
DeltaDisplayBackground deltaDisplayBackground
Delta display background object for the scene.
HUB75Controller controller
Controller for managing HUB75 displays.
HUB75DeltaCameraManager cameras
Camera manager for HUB75 Delta displays.