Khaotic Engine Reborn
Loading...
Searching...
No Matches
physics.h
1#ifndef _PHYSICS_H_
2#define _PHYSICS_H_
3
4#include "object.h"
5#include "math.h"
6
7class physics : public object
8{
9public:
10 physics();
11 explicit physics(const physics&); // Use explicit to avoid implicit conversion
12 ~physics();
13
14 XMVECTOR GetGravity() const; // Get the gravity value
15 void SetGravity(XMVECTOR gravity); // Define the gravity value
16 void ApplyGravity(object*, float); // Apply gravity to an object
17 void AddForce(object*, XMVECTOR);
18 bool IsColliding(object*, object*);
19 bool CubesOverlap(object*, object*);
20 bool SpheresOverlap(object*, object*);
21 bool SphereCubeOverlap(object*, object*);
22
23private:
24 XMVECTOR m_gravity;
25};
26
27#endif