Jump to content

quat struct get matrix


photo

Recommended Posts

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

In fact, there's a constructor for mat4 that takes a quat.

(Edit: but a cast should work too, I think)

Edited by Greg.Mildenhall
Link to comment
×
×
  • Create New...