GameLabGraz / Maroon

An interactive and immersive laboratory for Web, PC and VR.
https://maroon.tugraz.at
32 stars 16 forks source link

Feature/maroon 465 reusable ode solver #478

Closed jonathanplatzer closed 2 months ago

jonathanplatzer commented 5 months ago

Implementation of a reusable solver for ODEs describing motion in 3D. Closes #465

jonathanplatzer commented 4 months ago

Hello, first and foremost I would like to apologize for taking so long with this PR and the implementation in general and hope that my contribution is still of value to the project and not too byzantine in terms of code quality or the name of things.

This is now what I would consider near feature complete in terms of the reusable ode solver code, but not so much in terms of the code of the 3D Motion Simulation Experiment, which is kind of a mess, and could be simplified. I started working on simplifying it, as can be seen in the ParameterLoader and MotionCalculation classes, but I think this is out of scope for this pull request and I am not sure if the modification of the experiment here to just use the reusable solver is already to much and should be done in another pull request.

jonathanplatzer commented 4 months ago

I think this is it, this PR is at a point where it can be reviewed and (hopefully) merged.

First the reusable ODE solver is finished, maybe only the names need some work, but this is trivial, I don't expect any changes to the way the solver fundamentally works and is structured.

Second the 3D Motion Simulation experiment uses the ODE solver for calculations now and has been improved quite a bit, including:

jonathanplatzer commented 2 months ago

Ok, this is rather weird, before merging develop only the playmode tests were failing, but now after the fact also the WebGL build fails... Also the error log is rather unhelpful, I searched for errors that my code could have caused, but haven't found anything that seems related

edit: Ok, seems like the WebGL build had just some hiccup, i re-run it and it passed. Also some good news, I figured out which test case failed, and of course it is caused by my code. Turns out searching for "error" in the log is not that helpful, but when while looking through all occurrences of "failed" i found the error. It seems like while restructuring the 3D Motion Experiment I inadvertently left out/removed some NullReferenceException handling.