utilities icon indicating copy to clipboard operation
utilities copied to clipboard

Add typesafe 3D directions and rotations

Open tomrijnbeek opened this issue 6 years ago • 2 comments
trafficstars

tomrijnbeek avatar Oct 11 '19 17:10 tomrijnbeek

Is there anything left to be done with that?

Jlll1 avatar Jan 31 '21 00:01 Jlll1

We currently only have 3D linear types, none for directions/rotations. We actually had a discussion about that while ago, and the tricky thing is that the same kind of binary representation we use for the Direction2 type likely won't work here, since 3D orientation is a lot more complex. Quaternions may be the way to go instead, but I'm not sure how that would end up in the end.

Ideally we'd like Direction3 (an absolute direction) and Rotation3 (a relative rotation around some axis, can be more than 360 degrees as well), as well as Rotation3Velocity and Rotation3Acceleration types that hide whatever complex implementation details we choose inside and have all the same easy to use operators as the 2D types.

If that's something you want to try and tackle, please be our guest! But it's definitely on the trickier side.

paulcscharf avatar Jan 31 '21 10:01 paulcscharf