openplanet-nl / issues

Issue tracker for Openplanet.
10 stars 0 forks source link

mat4 requests: `mat4(mat3)`, `mat3(mat4)`, and/or `.GetRotation()` #522

Closed XertroV closed 3 months ago

XertroV commented 3 months ago

mat4(mat3) / mat3(mat4) constructors: So if a matrix has no scale or skew (which is most of the matrices we deal with), then the rotational component is the top left 3x3 matrix. So it'd be useful to to be able to cut out this bit of a 4x4 matrix to get the rotational component more easily.

alternatively, .GetRotation() or something that does the same thing would be nice.

On the same note, GetUp(), GetLeft(), etc would be neat too (they'd pull out the columns)