Début TP2 + Handling des événements de touches de mouvement

This commit is contained in:
Marc-Eric Martel
2021-09-24 10:15:43 -04:00
parent 6d62a36bd3
commit 2f8e6dbb30
186 changed files with 26429 additions and 442 deletions

35
mcclone/transformation.h Normal file
View File

@@ -0,0 +1,35 @@
#ifndef TRANSFORMATION_H__
#define TRANSFORMATION_H__
#include "matrix4.h"
#include "vector3.h"
#include <stack>
class Transformation
{
public:
Transformation();
void SetIdentity();
void Push();
void Pop();
void ApplyTranslation(float x, float y, float z);
void ApplyTranslation(const Vector3f& v);
void ApplyRotation(float angle, float x, float y, float z);
void ApplyRotation(float angle, const Vector3f& v);
void ApplyScale(float x, float y, float z);
void ApplyScale(const Vector3f& v);
void Use() const;
const Matrix4f& GetMatrix() const;
private:
std::stack<Matrix4f> m_stack;
};
#endif // TRANSFORMATION_H__