fix midpoint

This commit is contained in:
2023-11-17 14:22:14 +01:00
parent b857996445
commit 1296ef0b39
2 changed files with 23 additions and 28 deletions

View File

@@ -40,7 +40,8 @@ public:
void applyExternalForce(Vec3 force);
void Midpoint(Spring& spring, float timestep);
std::tuple<Vec3, Vec3> MidPointStep(float timestep, const Spring& spring, Vec3 position, Vec3 velocity, Vec3 normal, float length);
std::tuple<Vec3, Vec3> MidPointHalfStep(double timestep, const Spring& spring, Vec3 position, Vec3 velocity, Vec3 normal, double length);
std::tuple<Vec3, Vec3> MassSpringSystemSimulator::MidPointStep(double timestep, const Spring& spring, Vec3 position, Vec3 oldVelo, Vec3 velocity, Vec3 normal, double length);
float LengthCalculator(Vec3 vector);
Vec3 calculatePositionTimestepEuler(Vec3 oldPosition, float timestep, Vec3 veloctiy);