magnum-examples icon indicating copy to clipboard operation
magnum-examples copied to clipboard

Add Primitives SceneGraph Examples

Open pomeroyb opened this issue 4 years ago • 4 comments

I've been meaning to get back into learning Magnum, and what better way than to learn than to help make some examples!

I saw that this was a desired sub project from https://github.com/mosra/magnum/issues/102

I added a bit more functionality than the python example had, to control both the drawables and the camera. It's landed somewhere between the primitives example, then python scenegraph, and the picking example.

Let me know if any changes need to be made 👍

pomeroyb avatar May 04 '20 12:05 pomeroyb

Thanks for the feedback! I've made almost all the changes you suggested. The only one that needs a bit more review is the rotation. Using rotateLocal() does work fine, but the delta.x() and delta.y() need to be reversed to see the correct rotation. I've included a video showing what I mean:

https://youtu.be/6fQTFLv8ceQ

I'm not sure if this is a convention in Magnum or if I'm doing something wrong... 🤷‍♀️

pomeroyb avatar May 09 '20 11:05 pomeroyb

Hah, no, I clearly messed up in that suggestion, sorry. Will fix this during merge.

Thank you!

mosra avatar May 09 '20 13:05 mosra

In case you're wondering why no merge happened yet -- I wanted to take the Viewer tutorial and split the scenegraph-related stuff into a tutorial this example, as it's easier to absorb it in two smaller pieces. So I need to do some writing first :)

mosra avatar May 12 '20 09:05 mosra

No worries at all! I'm writing examples to help myself learn Magnum in small steps -- being able to contribute them to the project is just a bonus. 👍

pomeroyb avatar May 12 '20 10:05 pomeroyb