Last week my implementation lacked creating the current slide environment in the box2d world, meaning for the demo in the last blog post I had to hard code the environment.
So this week I wanted to get rid of this big flaw and start creating the environment from the slide on the fly. To achieve this goal, I needed current shapes in the slide. Therefore, to get shapes in the current slide I’ve implemented a new getter for ShapeManager and LayerManager classes. You can check out the patch at: https://gerrit.libreoffice.org/c/core/+/95967
Shapes from the master slide, and shapes that are part of the background needed to be classified and ignored, so I’ve added a flag called mbIsForeground in the Shape classes and corresponding setters and getters for this flag.
mbIsForeground flag is set to false, if it should be, while shapes are being imported for the slide show. Patch for it can be found at: https://gerrit.libreoffice.org/c/core/+/95968
To finish up I’ve added a new function to Box2DWorld class that will create static bodies in the box2d world from given Shapes. It is part of the still not merged box2d tools patch: https://gerrit.libreoffice.org/c/core/+/95614
And while tinkering with these, I was hacking on PathAnimation class to test and figure out how they are behaving. You can check out that if you want to on my experimental private branch: https://git.libreoffice.org/core/+/refs/heads/private/quwex/gsoc-box2d-experimental
Following video demonstrates the current situation at the end of week 2 of development on the said private experimental branch: (please excuse my “demonstrative” mouse movements)