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

provide a method to project Vec4 and Vec3 from homogeneous space #6916

Closed
seichter opened this issue Dec 11, 2022 · 3 comments
Closed

provide a method to project Vec4 and Vec3 from homogeneous space #6916

seichter opened this issue Dec 11, 2022 · 3 comments
Labels
A-Math Fundamental domain-agnostic mathematical operations C-Feature A new feature, making something new possible

Comments

@seichter
Copy link

What problem does this solve or what need does it fill?

Currently Vec3 provides extend(w) to unproject into homogeneous coordinates (hence Vec4 with euclidean hyperspace w - maybe I missed it, but there is no inverse to extend() or the documentation misses to mention it.

What solution would you like?

I would prefer to write something like this

transform.translation = view.w_axis.project()

rather than

transform.translation = view.w_axis.xyz() / view.w_axis.w;

My example is now for Vec4 ... same applies to homogeneous representations of Vec2 in vectorspace R3 using Vec3

What alternative(s) have you considered?

Keep writing rather obvious code

@seichter seichter added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Dec 11, 2022
@tim-blackbird
Copy link
Contributor

tim-blackbird commented Dec 11, 2022

Note that Bevy's math types are re-exports from the glam crate.
Bitshifter is open to suggestions so I'd open an issue there :)

@seichter
Copy link
Author

Thanks, I moved this request upstream bitshifter/glam-rs#366

@james7132
Copy link
Member

james7132 commented Dec 13, 2022

As we'll probably just inhale the update from glam when it's ready. Closing this issue as it's unactionable from Bevy's end. If for whatever reason this dosen't get added to glam, feel free to reopen this issue.

@james7132 james7132 added A-Math Fundamental domain-agnostic mathematical operations and removed S-Needs-Triage This issue needs to be labelled labels Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Math Fundamental domain-agnostic mathematical operations C-Feature A new feature, making something new possible
Projects
None yet
Development

No branches or pull requests

3 participants