treballant en les naus de title

This commit is contained in:
2025-12-16 22:14:55 +01:00
parent 75a4a1b3b9
commit bc5982b286
12 changed files with 946 additions and 19 deletions
+16 -1
View File
@@ -12,6 +12,20 @@
namespace Rendering {
// Estructura per rotacions 3D (pitch, yaw, roll)
struct Rotation3D {
float pitch; // Rotació eix X (cabeceo arriba/baix)
float yaw; // Rotació eix Y (guiñada esquerra/dreta)
float roll; // Rotació eix Z (alabeo lateral)
Rotation3D() : pitch(0.0f), yaw(0.0f), roll(0.0f) {}
Rotation3D(float p, float y, float r) : pitch(p), yaw(y), roll(r) {}
bool has_rotation() const {
return pitch != 0.0f || yaw != 0.0f || roll != 0.0f;
}
};
// Renderitzar forma amb transformacions
// - renderer: SDL renderer
// - shape: forma vectorial a dibuixar
@@ -28,6 +42,7 @@ void render_shape(SDL_Renderer* renderer,
float escala = 1.0f,
bool dibuixar = true,
float progress = 1.0f,
float brightness = 1.0f);
float brightness = 1.0f,
const Rotation3D* rotation_3d = nullptr);
} // namespace Rendering