StratiX0 e57de4f1be Ajout de la collision entre 2 cubes
feat:
+ collision entre 2 cubes

refactor:
+ changements dans quelques fonctions
+ renommage de certaines fonctions
2024-04-24 11:59:48 +02:00

24 lines
581 B
C++

#ifndef _PHYSICS_H_
#define _PHYSICS_H_
#include "object.h"
class Physics : public Object
{
public:
Physics();
explicit Physics(const Physics&); // Use explicit to avoid implicit conversion
~Physics();
XMVECTOR GetGravity() const; // Get the gravity value
void SetGravity(XMVECTOR gravity); // Define the gravity value
void ApplyGravity(Object*, float, float); // Apply gravity to an object
void AddForce(Object*, XMVECTOR);
bool IsColliding(Object*, Object*);
bool CubesOverlap(Object*, Object*);
private:
XMVECTOR m_gravity;
};
#endif