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

Octree #86

Closed
wants to merge 8 commits into from
Closed

Octree #86

wants to merge 8 commits into from

Conversation

ttnghia
Copy link
Contributor

@ttnghia ttnghia commented Jun 16, 2020

Here is our new octree example 😈
@mosra, feel free to edit it. I could not think of a nicer teaser image. The simulation scene can be changed, such as the number of spheres, sphere size, sphere color etc.

octree

@mosra mosra added this to the 2020.0a milestone Jun 16, 2020
Copy link
Owner

@mosra mosra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope the amount of comments is not too overwhelming 😅

Thanks a lot for all the great examples, and an additional thanks for doing the CI/docs setup here as well 👍

src/octree/LooseOctree.h Outdated Show resolved Hide resolved
src/octree/LooseOctree.cpp Outdated Show resolved Hide resolved
src/octree/LooseOctree.cpp Outdated Show resolved Hide resolved
src/octree/LooseOctree.h Outdated Show resolved Hide resolved
src/octree/LooseOctree.h Outdated Show resolved Hide resolved
src/octree/OctreeExample.cpp Outdated Show resolved Hide resolved
src/octree/OctreeExample.cpp Outdated Show resolved Hide resolved

void OctreeExample::mouseScrollEvent(MouseScrollEvent& event) {
const Float delta = event.offset().y();
if(Math::abs(delta) < 1.0e-2f) { return; }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(Math::abs(delta) < 1.0e-2f) { return; }
if(Math::abs(delta) < 1.0e-2f) return;

No single-line blocks please. Same above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My automatic formatter refuses to do that 😄

Copy link
Contributor Author

@ttnghia ttnghia Jun 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you have to do that on your side, as whenever I save, the content got re-formatted to the same old stuff.

src/octree/OctreeExample.cpp Outdated Show resolved Hide resolved
src/octree/OctreeExample.cpp Outdated Show resolved Hide resolved
@ttnghia
Copy link
Contributor Author

ttnghia commented Jun 17, 2020

@mosra The code looks much better now 😃

@ttnghia ttnghia force-pushed the octree branch 4 times, most recently from 058d478 to 45d0662 Compare June 17, 2020 21:55
@ttnghia
Copy link
Contributor Author

ttnghia commented Jun 17, 2020

I am curious to see this works in WebGL 😄

@mosra
Copy link
Owner

mosra commented Jun 19, 2020

Thank you! The last unresolved comment is https://github.com/mosra/magnum-examples/pull/86/files#r441446247, about making it possible to switch and benchmark the bruteforce method at runtime -- just want to know your opinion on that, and I'm fine with doing that myself post-merge :)

@ttnghia
Copy link
Contributor Author

ttnghia commented Jun 19, 2020

Done.
Frame profiling is kind of new to me :)

@mosra
Copy link
Owner

mosra commented Jun 24, 2020

Merged in 5ff5175, thank you! :)

@mosra mosra closed this Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants