layout de TITOL
This commit is contained in:
@@ -13,8 +13,8 @@
|
||||
|
||||
class SDLManager {
|
||||
public:
|
||||
SDLManager(); // Constructor per defecte (usa Defaults::)
|
||||
SDLManager(int width, int height, bool fullscreen); // Constructor amb configuració
|
||||
SDLManager(); // Constructor per defecte (usa Defaults::)
|
||||
SDLManager(int width, int height, bool fullscreen); // Constructor amb configuració
|
||||
~SDLManager();
|
||||
|
||||
// No permetre còpia ni assignació
|
||||
@@ -22,11 +22,11 @@ class SDLManager {
|
||||
SDLManager& operator=(const SDLManager&) = delete;
|
||||
|
||||
// [NUEVO] Gestió de finestra dinàmica
|
||||
void increaseWindowSize(); // F2: +100px
|
||||
void decreaseWindowSize(); // F1: -100px
|
||||
void toggleFullscreen(); // F3
|
||||
void toggleVSync(); // F4
|
||||
bool handleWindowEvent(const SDL_Event& event); // Per a SDL_EVENT_WINDOW_RESIZED
|
||||
void increaseWindowSize(); // F2: +100px
|
||||
void decreaseWindowSize(); // F1: -100px
|
||||
void toggleFullscreen(); // F3
|
||||
void toggleVSync(); // F4
|
||||
bool handleWindowEvent(const SDL_Event& event); // Per a SDL_EVENT_WINDOW_RESIZED
|
||||
|
||||
// Funcions principals (renderitzat)
|
||||
void neteja(uint8_t r = 0, uint8_t g = 0, uint8_t b = 0);
|
||||
|
||||
@@ -14,16 +14,22 @@ 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)
|
||||
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) {}
|
||||
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;
|
||||
}
|
||||
bool has_rotation() const {
|
||||
return pitch != 0.0f || yaw != 0.0f || roll != 0.0f;
|
||||
}
|
||||
};
|
||||
|
||||
// Renderitzar forma amb transformacions
|
||||
|
||||
Reference in New Issue
Block a user