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
More conversions #874
More conversions #874
Conversation
Add [T; D] -> Isometry<T, R, D> Add SVector<T, D> -> Isometry<T, R, D> Add Point<T, D> -> Isometry<T, R, D>
Add [T; D] <-> Translation<T, D> Add Point<T, D> -> Translation<T, D>
Add Isometry3 <-> (Vec3, Quat) Add Isometry2 <-> (Vec3, Quat) Add Translation2/3/4 <-> Vec2/3/4
I feel that perhaps some of these conversions are a bit too "aggressive"? For example, [[1, 2],
[3, 4]] is in fact not the matrix
but rather its transpose. Similarly, is it completely obvious that a Point is directly transformed into an Isometry? An Isometry is documented in terms of a translation, so I suppose implementing |
I guess this point conversion may sound odd. However, isometries are very often used to represent a position (especially throughout our own code-bases). So I think this makes the Points -> Isometry relevant. |
Sorry, I misread your comment about |
Fair enough, I don't use isometries that often.
Ah. Hmm, well, in that case I would even suggest to remove it altogether, in favor of a method that makes the storage order explicit. I.e. |
Yeah, that would definitely make sense (and would allow us to mark this |
As a final comment, upon further reflection I think a better name would even be |
Added
[T; D]
to an isometryIsometry<T, _, D>
(as a translation).SVector<T; D>
to an isometryIsometry<T, _, D>
(as a translation).Point<T; D>
to an isometryIsometry<T, _, D>
(as a translation).[T; D]
from/to a translationTranslation<T, D>
.Point<T, D>
to a translationTranslation<T, D>
.(Vec3, Quat)
from/to anIsometry2
orIsometry3
.Vec2/3/4
from/to aTranslation2/3/4
.