This commit is contained in:
2024-02-27 10:10:02 +01:00
parent c0aea669c7
commit 547809c898
131 changed files with 65609 additions and 0 deletions

24
Engine/Transform.h Normal file
View File

@@ -0,0 +1,24 @@
#pragma once
#include "base.h"
#include "Vector2f.h"
struct Transform
{
public:
void ApplyTransformation() const
{
glPushMatrix();
glTranslatef(Position.x, Position.y, 0);
glRotatef(Rotation, 0, 0, 1);
glScalef(Scale.x, Scale.y, 1);
}
void ResetTransformation() const
{
glPopMatrix();
}
Vector2f Position{};
float Rotation{};
Vector2f Scale{ 1.f, 1.f };
};