-
Notifications
You must be signed in to change notification settings - Fork 162
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
[feature] provide a method to project Vec4 and Vec3 from homogeneous space #366
Comments
Naming wise it would be good to make sure there is a clear distinction between this and the existing vector |
Agreed, here my 2ct Eigen is using Armadillo has a So, I guess there is no common agreement. Maybe |
Still mulling over what to call this. The operation is simple, naming is hard. It seems like this operation is "perspective divide" or "homogeneous divide" or "homogeneous normalization" are common names for this operation. Thus the "hnormalize" in Eigen. Vek calls it "homogenize(d)". I'm thinking of adding Might also add a |
How does
|
What problem does this solve or what need does it fill?
Currently
Vec3
providesextend(w)
to unproject into homogeneous coordinates (henceVec4
with euclidean hyperspacew
- maybe I missed it, but there is no inverse toextend()
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 ofVec2
in vectorspace R3 usingVec3
What alternative(s) have you considered?
Keep writing rather obvious code
This was originally a request in bevy bevyengine/bevy#6916
The text was updated successfully, but these errors were encountered: