15#include "../../Static/SimpleMaterial.h"
16#include "../Overlays/Text/TextEngine.h"
17#include "../../Material.h"
Renders a real-time clock and date as a material.
void SetRotation(float rotation)
Sets the rotation of the clock in the rendered scene.
uint8_t month
Current month.
bool hour24
Flag for 24-hour format (true) or 12-hour format (false).
uint8_t year
Current year (last two digits).
uint8_t second
Current second.
SimpleMaterial mat
Default material for the clock.
uint8_t minute
Current minute.
RGBColor GetRGB(const Vector3D &position, const Vector3D &normal, const Vector3D &uvw) override
Computes the color at a given position in the clock's material.
void SetSize(Vector2D size)
Sets the size of the clock's rendered area.
TextEngine< 3, 12 > tE
Text engine for rendering time and date.
void SetMaterial(Material *material)
Sets the material to be used for rendering the clock.
void SetTime(uint8_t hour, uint8_t minute, uint8_t second)
Sets the current time for the clock.
void SetDate(uint8_t day, uint8_t month, uint8_t year, uint8_t wDay)
Sets the current date for the clock.
uint8_t wDay
Current weekday.
uint8_t hour
Current hour.
void Update()
Updates the clock's time and date.
void SetPosition(Vector2D position)
Sets the position of the clock in the rendered scene.
Abstract base class for rendering materials.
Represents an RGB color and provides methods for manipulation.
A material that applies a single, solid RGB color to surfaces.
Represents a 2D vector (X, Y) and provides methods for vector arithmetic.
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.