Extracting Scaling from a Matrix4
Posted 05 June 2012 - 10:23 AM
I need to interpolate transformations between two matrices, unless there is a fucntion that do just that, I need to extract all transformations separately and interpolate the transformations one by one and rebuild a new matrix from the result. To help me in this process, UT_DMatrix4::getTranslates and UT_DMatrix4::extractRotation are very handy but my question is:
How do we get the scaling from a UT_DMatrix4?
Posted 05 June 2012 - 08:19 PM
You could extract the scale by taking vec3.x = matrix4, vec3.y = matrix4, vec3.z = matrix4 since the scale is stored along the diagonal.
I suggest looking at spherical linear interpolation. I think that there would be a slerp and lerp function in the HDK for matrices.
Also, this website is very good.
Edited by mightcouldb1, 05 June 2012 - 08:19 PM.
Posted 07 June 2012 - 08:20 PM
Posted 19 June 2012 - 09:33 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users