diff options
author | sotech117 <michael_foiani@brown.edu> | 2023-12-13 14:25:39 -0500 |
---|---|---|
committer | sotech117 <michael_foiani@brown.edu> | 2023-12-13 14:25:39 -0500 |
commit | 757b5d8718ffb4862560db3fa6aaba486acb92a5 (patch) | |
tree | fbe719717ca96e0bff25b4778e12c7ef49592bad /src/physics/physics.h | |
parent | 33a1cdc3532d145944b00a4ca03fd01d4d5b9532 (diff) |
fix collision detection updating the velocity
Diffstat (limited to 'src/physics/physics.h')
-rw-r--r-- | src/physics/physics.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/physics/physics.h b/src/physics/physics.h index 6410d74..b33778f 100644 --- a/src/physics/physics.h +++ b/src/physics/physics.h @@ -10,17 +10,18 @@ class Physics { public: - static bool checkForSphereCollision(RenderShapeData ¤tShape, RenderShapeData &shape); - static bool checkForConeCollision(RenderShapeData ¤tShape, RenderShapeData &shape); + static void updateShapePositions(std::vector<RenderShapeData> &shapes); - static bool checkForCylinderCollision(RenderShapeData ¤tShape, RenderShapeData &shape); + static void handleCollisions(std::vector<RenderShapeData> &shapes); - static bool checkForCubeCollision(RenderShapeData ¤tShape, RenderShapeData &shape); + static bool checkForSphereCollision(RenderShapeData *currentShape, RenderShapeData *otherShape); - static void updateShapePositions(std::vector<RenderShapeData> &shapes); + static bool checkForConeCollision(RenderShapeData *currentShape, RenderShapeData *otherShape); - static void handleCollisions(std::vector<RenderShapeData> &shapes); + static bool checkForCylinderCollision(RenderShapeData *currentShape, RenderShapeData *otherShape); + + static bool checkForCubeCollision(RenderShapeData *currentShape, RenderShapeData *otherShape); }; #endif //PROJECTS_RAY_PHYSICS_H |