Gave up on that fucking bug for today

This commit is contained in:
2024-07-12 03:22:10 +02:00
commit 0528cfb93e
15 changed files with 515 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
//
// Created by 0piet on 7/12/2024.
//
#ifndef GRAVITY_CELESTIALBODY_H
#define GRAVITY_CELESTIALBODY_H
#pragma once
#include <glm/glm.hpp>
#include <string>
class CelestialBody {
public:
CelestialBody(float mass, const glm::vec3& position, const glm::vec3& velocity);
void update(float dt);
void applyForce(const glm::vec3& force);
float getMass() const { return mass; }
glm::vec3 getPosition() const { return position; }
glm::vec3 getVelocity() const { return velocity; }
private:
float mass;
glm::vec3 position;
glm::vec3 velocity;
glm::vec3 acceleration;
};
#endif //GRAVITY_CELESTIALBODY_H