Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upNalgebra Migration #1066
Conversation
Moxinilian
added
type: feature
status: in progress
project: core
labels
Oct 24, 2018
sebcrozet
suggested changes
Oct 25, 2018
|
I've made a few more suggestions that fix the Note that the remark about the Unfortunately github does not support multi-line suggestions that you can merge automatically. |
amethyst_animation/src/util.rs Outdated
amethyst_animation/src/lib.rs Outdated
amethyst_animation/Cargo.toml Outdated
amethyst_controls/src/systems.rs Outdated
torkleyy
reviewed
Oct 25, 2018
|
Should we use |
dotellie
force-pushed the
dotellie:nalgebra
branch
3 times, most recently
from
e6df73c
to
b473984
Oct 26, 2018
This comment has been minimized.
This comment has been minimized.
|
Everything is almost working properly now! If anyone wants to help out, the only two examples that aren't working currently is the |
This comment has been minimized.
This comment has been minimized.
|
@magnonellie |
This comment has been minimized.
This comment has been minimized.
|
yo, certainly! Shall have a go at it tomorrow |
azriel91
added a commit
to azriel91/amethyst
that referenced
this pull request
Oct 30, 2018
dotellie
added a commit
to dotellie/amethyst
that referenced
this pull request
Oct 30, 2018
dotellie
force-pushed the
dotellie:nalgebra
branch
from
b4a0e19
to
ffe8372
Oct 31, 2018
dotellie
added a commit
to dotellie/amethyst
that referenced
this pull request
Oct 31, 2018
dotellie
changed the title
[WIP] Nalgebra Migration
Nalgebra Migration
Nov 1, 2018
dotellie
added
status: ready
and removed
status: in progress
labels
Nov 1, 2018
dotellie
force-pushed the
dotellie:nalgebra
branch
2 times, most recently
from
2bc529d
to
547d88e
Nov 1, 2018
dotellie
added a commit
to dotellie/amethyst
that referenced
this pull request
Nov 1, 2018
dotellie
force-pushed the
dotellie:nalgebra
branch
2 times, most recently
from
9bc6840
to
a1deaf4
Nov 2, 2018
azriel91
self-requested a review
Nov 3, 2018
This comment has been minimized.
This comment has been minimized.
|
@sebcrozet @jojolepro @Moxinilian @Rhuagh @torkleyy If any of you would like to review this that would be appreciated! |
This comment has been minimized.
This comment has been minimized.
torkleyy
requested changes
Nov 3, 2018
|
Sorry, need to use Reviewable for such big PRs. Massive work @magnonellie! One can see you refactored this very carefully. The only thing I've noticed so far are unresolved questions regarding
amethyst_animation/src/transform.rs, line 51 at r7 (raw file):
I think we should document this layout. amethyst_controls/src/systems.rs, line 73 at r7 (raw file):
Why is amethyst_core/src/transform/components/local_transform.rs, line 23 at r7 (raw file):
Hmm, I'm a bit unhappy with exposing it to the user this way. amethyst_core/src/transform/components/transform.rs, line 21 at r7 (raw file):
should use book/src/math.md, line 10 at r7 (raw file):
Can you provide us with the motivation to expose both? Is it substiantially easier to justify two APIs? |
This comment has been minimized.
This comment has been minimized.
|
@jojolepro I'm fairly certain all of those issues are present in master too. Could you double check that perhaps? |
dotellie
reviewed
Nov 3, 2018
amethyst_animation/src/transform.rs, line 51 at r7 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
Document in what way do you mean exactly? The problem here is that nalgebra stores the values as [x, y, z, w] while most other APIs (including the amethyst_controls/src/systems.rs, line 73 at r7 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
I think that amethyst_core/src/transform/components/local_transform.rs, line 23 at r7 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
I can only agree. I would have personally liked to have it be abstracted away behind functions but I was unsure how that would go down with the rest of the community. What would you have liked to see here instead? amethyst_core/src/transform/components/transform.rs, line 21 at r7 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
I just added a unit test which contains the following and passes with the current code: let mut transform = GlobalTransform::default();
assert!(transform.is_finite());
transform.0.fill_row(2, std::f32::NAN);
assert!(!transform.is_finite());book/src/math.md, line 10 at r7 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
I can't really provide a reason to be honest. I myself prefer to just use the nalgebra API but I can imagine that many users will think that the rustdoc problems are too severe and would be very happy to use nalgebra glm as an alternative. If you take a look through the nalgebra-glm docs and compare them to the nalgebra docs, you can see that everything is laid out in a much more understandable fashion with links to other functions you may want to use etc. |
dotellie
force-pushed the
dotellie:nalgebra
branch
from
aa17132
to
809c36b
Nov 9, 2018
dotellie
added a commit
to dotellie/amethyst
that referenced
this pull request
Nov 9, 2018
dotellie
reviewed
Nov 9, 2018
amethyst_core/Cargo.toml, line 19 at r9 (raw file): Previously, azriel91 (Azriel Hoh) wrote…
Removed. amethyst_core/src/orientation.rs, line 25 at r9 (raw file): Previously, azriel91 (Azriel Hoh) wrote…
I don't quite understand your question, but I've decided to remove this file completely as it doesn't serve any purpose currently and I'm unsure if I got the math right amethyst_core/src/transform/components/local_transform.rs, line 55 at r8 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
Done. amethyst_core/src/transform/components/local_transform.rs, line 416 at r8 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
Done. amethyst_core/src/transform/components/local_transform.rs, line 188 at r9 (raw file): Previously, azriel91 (Azriel Hoh) wrote…
Done. amethyst_renderer/src/cam.rs, line 261 at r9 (raw file): Previously, azriel91 (Azriel Hoh) wrote…
Copy paste strikes again amethyst_renderer/src/cam.rs, line 395 at r9 (raw file): Previously, azriel91 (Azriel Hoh) wrote…
I honestly have no idea. This was just so tedious to write that I think I spaced out while doing it |
dotellie
force-pushed the
dotellie:nalgebra
branch
2 times, most recently
from
daaecd0
to
58e4098
Nov 9, 2018
dotellie
reviewed
Nov 9, 2018
amethyst_audio/src/systems/audio.rs, line 66 at r9 (raw file): Previously, azriel91 (Azriel Hoh) wrote…
Done. |
azriel91
approved these changes
Nov 9, 2018
amethyst_core/src/transform/components/transform.rs, line 21 at r7 (raw file):
reminder |
dotellie
reviewed
Nov 9, 2018
amethyst_core/src/transform/components/transform.rs, line 21 at r7 (raw file): Previously, azriel91 (Azriel Hoh) wrote…
Done. |
This comment has been minimized.
This comment has been minimized.
|
@sebcrozet @torkleyy Re-review perhaps? |
jojolepro
requested changes
Nov 10, 2018
|
Very nice PR! I got a few nitpicks ^^ I'll be here pretty much all day tomorow, so I can approve quickly once its fixed. When everyone that is blocking it has approved we can merge :) (Then I got 3k lines of code to fix, then I need to migrate everything to nphysics because amethyst_rhusics will be 100% broken) lol Good news is that I can start making things that depend on physics that I can merge in amethyst later ^^ |
| @@ -18,15 +18,7 @@ pub struct GlobalTransform(pub Matrix4<f32>); | |||
| impl GlobalTransform { | |||
This comment has been minimized.
This comment has been minimized.
jojolepro
Nov 10, 2018
Member
So if this stays like that, I'll need to make a PR for the global transform decomposition almost as soon as this is merged.
This comment has been minimized.
This comment has been minimized.
amethyst_core/src/lib.rs Outdated
book/src/math.md Outdated
book/src/math.md Outdated
docs/CHANGELOG.md Outdated
docs/CHANGELOG.md Outdated
sebcrozet
approved these changes
Nov 10, 2018
|
Great work @magnonellie! It looks good to me now. |
dotellie
force-pushed the
dotellie:nalgebra
branch
from
3ff044a
to
79dd71d
Nov 10, 2018
torkleyy
requested changes
Nov 10, 2018
|
Nearly there
amethyst_core/src/transform/components/local_transform.rs, line 376 at r8 (raw file): Previously, magnonellie (Ellie) wrote…
I find that a bit strange given that |
dotellie
reviewed
Nov 10, 2018
amethyst_core/src/transform/components/local_transform.rs, line 376 at r8 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
Ah I see. I did actually want to make all fields private but I wasn't sure if everyone would be on board with that. I think I'll go for it though since now is probably a good time to do it. |
jojolepro
approved these changes
Nov 10, 2018
torkleyy
approved these changes
Nov 10, 2018
|
dotellie
and others
added some commits
Oct 21, 2018
dotellie
force-pushed the
dotellie:nalgebra
branch
from
2a0919c
to
0665452
Nov 10, 2018
This comment has been minimized.
This comment has been minimized.
|
Let's merge this! bors r+ |
bors bot
added a commit
that referenced
this pull request
Nov 11, 2018
This comment has been minimized.
This comment has been minimized.
Build succeeded |
This comment has been minimized.
This comment has been minimized.
brendanzab
commented
Nov 11, 2018
|
Woo, congratulations folks! This makes me so happy and excited! |

dotellie commentedOct 23, 2018
•
edited
Update:
Everything seems to be working at this point. All the examples work and I haven't found any instance of the performance being considerably worse than it was before. That is to say, this PR is very much ready at this point after a few reviews.
Previous content:
It's finally here! Well almost. Things build for the most part but not everything works yet. Some examples have been converted and work (almost) perfectly but some still need some love. Of particular note is the renderable example where the positions seem to be a bit off for some reason. While the entire engine builds, I'm not 100% sure everything was actually converted correctly, hence why the boxes aren't ticked off yet.
TODO:
This change is