Jagguar Game Engine

Loading...
Searching...
No Matches
PhysicsEngine.hpp
1#ifndef PHYSICSENGINE_HPP
2#define PHYSICSENGINE_HPP
3
4#include <vector>
5
6#include "IPhysicsComponent.hpp"
7
11 class PhysicsEngine {
12 public:
16 PhysicsEngine();
17
21 ~PhysicsEngine();
22
28 void AddComponent(IPhysicsComponent* newComponent);
29
35 void Update();
36
42 void SetGravity(float newGravity);
43
44 private:
49 float m_gravity = 2.0f;
50
54 std::vector<IPhysicsComponent*> m_components;
55};
56
57#endif
IPhysicsComponent
Definition: IPhysicsComponent.hpp:11
PhysicsEngine
Definition: PhysicsEngine.hpp:11
PhysicsEngine::Update
void Update()
Definition: PhysicsEngine.cpp:17
PhysicsEngine::SetGravity
void SetGravity(float newGravity)
Definition: PhysicsEngine.cpp:87
PhysicsEngine::PhysicsEngine
PhysicsEngine()
Definition: PhysicsEngine.cpp:8
PhysicsEngine::AddComponent
void AddComponent(IPhysicsComponent *newComponent)
Definition: PhysicsEngine.cpp:11
PhysicsEngine::m_gravity
float m_gravity
Definition: PhysicsEngine.hpp:49
PhysicsEngine::m_components
std::vector< IPhysicsComponent * > m_components
Definition: PhysicsEngine.hpp:54
PhysicsEngine::~PhysicsEngine
~PhysicsEngine()
Definition: PhysicsEngine.cpp:9