dongju.jeong Posted November 8, 2018 Share Posted November 8, 2018 mat3 getMat3 () Obtains the quaternion's transformation matrix as mat3. The transformation matrix is usually mat4. Can I just cast mat3 to mat4? mat4 rotation = (mat4)quat.getMat3(); Link to comment
Greg.Mildenhall Posted November 8, 2018 Share Posted November 8, 2018 (edited) In fact, there's a constructor for mat4 that takes a quat. (Edit: but a cast should work too, I think) Edited November 8, 2018 by Greg.Mildenhall Link to comment
fox Posted November 8, 2018 Share Posted November 8, 2018 Hi Dongju, Greg's right, you can use either of them: mat4 rotation = mat4(quat.getMat3()); mat4 rotation = mat4(quat); Thank you! Link to comment
Recommended Posts