Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mwphysics refactoring (task #5338) #2748

Merged
merged 8 commits into from
Apr 1, 2020
Merged

Conversation

Capostrophic
Copy link
Collaborator

Task page
Put result callbacks, physics system constants, stepper and movement solver into dedicated header and implementation files, and port over some of wareya's consistency fixes in actor tracer class (make ClosestNotMeConvexResultCallback less nonsensical and use Misc::Convert functions more wherever possible).

Of course the mergeability of wareya's PR in its current state is ruined but I think we weren't going to merge that as is anyway.

And of course git blame is also ruined a small price to pay for salvation.

I tried to minimize the chosen dependencies, but may have put more than necessary somewhere (mainly to make sure files are buildable even if they are required outside of physics system implementation).

This allows to remove 600 lines from physics system implementation.

From the user's point of view nothing has changed so I don't think updating the changelog or putting anything on .46 milestone is necessary.

@akortunov
Copy link
Collaborator

In file included from /home/travis/build/OpenMW/openmw/apps/openmw/mwphysics/contacttestresultcallback.cpp:1:
/home/travis/build/OpenMW/openmw/apps/openmw/mwphysics/contacttestresultcallback.hpp:11:1: warning: class 'btCollisionObjectWrapper' was previously declared as a struct [-Wmismatched-tags]
class btCollisionObjectWrapper;
^
/usr/include/bullet/BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h:17:8: note: previous use is here
struct btCollisionObjectWrapper
       ^
/home/travis/build/OpenMW/openmw/apps/openmw/mwphysics/contacttestresultcallback.hpp:11:1: note: did you mean struct here?
class btCollisionObjectWrapper;
^~~~~
struct
1 warning generated.
[ 85%] Building CXX object apps/openmw/CMakeFiles/openmw.dir/mwphysics/stepper.cpp.o
In file included from /home/travis/build/OpenMW/openmw/apps/openmw/mwphysics/physicssystem.cpp:49:
/home/travis/build/OpenMW/openmw/apps/openmw/mwphysics/contacttestresultcallback.hpp:11:1: warning: class 'btCollisionObjectWrapper' was previously declared as a struct [-Wmismatched-tags]
class btCollisionObjectWrapper;
^
/usr/include/bullet/BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h:17:8: note: previous use is here
struct btCollisionObjectWrapper
       ^
/home/travis/build/OpenMW/openmw/apps/openmw/mwphysics/contacttestresultcallback.hpp:11:1: note: did you mean struct here?
class btCollisionObjectWrapper;
^~~~~
struct
1 warning generated.

I suppose that you use a forward declaration via "class" keyword for some structures.

@wareya
Copy link
Contributor

wareya commented Mar 31, 2020

Of course the mergeability of wareya's PR in its current state is ruined but I think we weren't going to merge that as is anyway.

I did my best to explain what it did in the responses to the PR so that it wouldn't be that much of a problem if/when something like this happened anyway. Worst case scenario it can be rewritten.

@akortunov
Copy link
Collaborator

LGTM.

@psi29a
Copy link
Member

psi29a commented Apr 1, 2020

Taken!

@psi29a psi29a merged commit 2a31382 into OpenMW:master Apr 1, 2020
@Capostrophic Capostrophic deleted the physicssystem branch April 1, 2020 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants