Stowy Physics Engine 0.1.0
Loading...
Searching...
No Matches
Solver.hpp
Go to the documentation of this file.
1
11#pragma once
12
13#include <vector>
14
16
17namespace stw
18{
19
23class Solver
24{
25public:
26 Solver() = default;
27 virtual ~Solver() = default;
28 Solver(const Solver& other) = default;
29 Solver(Solver&& other) = default;
30 Solver& operator=(const Solver& other) = delete;
31 Solver& operator=(Solver&& other) = delete;
32
38 virtual void Solve(const std::vector<Collision>& collisions, float deltaTime) = 0;
39};
40
44class ImpulseSolver final : public Solver
45{
46public:
47 void Solve(const std::vector<Collision>& collisions, float deltaTime) override;
48};
49
53class SmoothPositionSolver final : public Solver
54{
55public:
56 void Solve(const std::vector<Collision>& collisions, float deltaTime) override;
57};
58}
Contains the Collision struct.
Solver with impulse and friction.
Definition Solver.hpp:45
void Solve(const std::vector< Collision > &collisions, float deltaTime) override
Solves the provided collisions.
Definition Solver.cpp:9
A solver to smooth out collision with collider that are in a tower placement.
Definition Solver.hpp:54
void Solve(const std::vector< Collision > &collisions, float deltaTime) override
Solves the provided collisions.
Definition Solver.cpp:86
Generic class for all solvers.
Definition Solver.hpp:24
Solver(Solver &&other)=default
virtual ~Solver()=default
Solver(const Solver &other)=default
Solver()=default
virtual void Solve(const std::vector< Collision > &collisions, float deltaTime)=0
Solves the provided collisions.
Solver & operator=(const Solver &other)=delete
Solver & operator=(Solver &&other)=delete
Definition BroadPhaseGrid.hpp:18