builds now with VCPKG and MSAA works

This commit is contained in:
Dynamitos
2023-12-10 22:27:59 +01:00
parent ff8200ab35
commit a49bab9028
39 changed files with 490 additions and 422 deletions
+3 -3
View File
@@ -1,5 +1,4 @@
#include "PhysicsSystem.h"
#include <boost/numeric/odeint.hpp>
#include <random>
using namespace Seele;
@@ -214,8 +213,9 @@ Array<PhysicsSystem::Body> PhysicsSystem::integratePhysics(const Array<Body>& bo
*xdot++ = result[i].torque.z;
}
};
boost::numeric::odeint::stepper_rk4<Array<float>, float> stepper;
boost::numeric::odeint::integrate_const(stepper, dxdt, buffer, t0, tdelta, tdelta);
//TODO
//boost::numeric::odeint::runge_kutta4<Array<float>, float> stepper;
//boost::numeric::odeint::integrate_const(stepper, dxdt, buffer, t0, tdelta, tdelta);
deserializeArray(result, buffer);
return result;
}
+16 -16
View File
@@ -17,24 +17,24 @@ public:
private:
struct Body
{
entt::entity id;
float inverseMass;
Vector centerOfMass;
Matrix3 iBody, iBodyInv;
Vector scale;
entt::entity id = entt::entity();
float inverseMass = 0.0f;
Vector centerOfMass = Vector();
Matrix3 iBody = Matrix3(), iBodyInv = Matrix3();
Vector scale = Vector();
Vector x;
Quaternion q;
Vector P;
Vector L;
Vector x = Vector();
Quaternion q = Quaternion();
Vector P = Vector();
Vector L = Vector();
Matrix3 iInv;
Matrix3 R;
Vector v;
Vector omega;
Vector force;
Vector torque;
Matrix4 matrix;
Matrix3 iInv = Matrix3();
Matrix3 R = Matrix3();
Vector v = Vector();
Vector omega = Vector();
Vector force = Vector();
Vector torque = Vector();
Matrix4 matrix = Matrix4();
Vector ptVelocity(Vector p) const {return v + glm::cross(omega, p - x + centerOfMass);}
void updateMatrix() {
Matrix4 scaleMatrix = glm::scale(Matrix4(1), scale);