From: kevin m. <ke...@su...> - 2005-07-11 15:22:38
|
That's right. When we set a scale matrix, we set the diagonals in the upper left 3x3. then when we rotate it, we take the coordinate axes (the 3x3 that makes x, y, and x axis vectors) and rotate... essentially, that scale is still in there, so taking the length of each axis should give the scale for each axis. I don't think they have to all be the same scale. good luck. > Thanks Kevin. That is what I discovered and the solution that I > implemented as well. Everything works great once I grab scale out of the > matrix before creating the quat. And just to verify, when grabbing scale > out of a 4x4 you take the length of each of the first 3 column vectors? > Thanks again. > > Doug > >> *--*---*---*----*-----*------*------*-----*----*---*---*--* >> Kevin Meinert /_/ >> http://www.subatomicglue.com \ / >> \/ __ \/ >> \__ >> \_\ >> >> >>>Hello, >>> I am using gmtl 0.4.9. If I try to create a quat from this matrix I >>>get the following: >>> >>>| 0.5 -0.866025 0 0 | >>>| 0.866025 0.5 0 0 | >>>| 0 0 1 0 | >>>| 0 0 0 1 | >>> >>> quat >>>(0, 0, 0.5, 0.866025) >>> >>>Which gives me the correct end rotation. Now, if I take the same matrix >>>from above and apply a scale of 3 I get the following: >>> >>>| 1.5 -2.59808 0 0 | >>>| 2.59808 1.5 0 0 | >>>| 0 0 3 0 | >>>| 0 0 0 1 | >>> >>> quat >>>(0, 0, 0.981981, 1.32288) >>> >>>Which ends up over rotating by what appears to be a few degrees. It is >>> my >>>understanding that I should be able to create a quat with a matrix that >>>does have scale on it, correct? >>> >>>Thanks for the help. >>> >>>Doug >>> >>> >>> > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual > core and dual graphics technology at this free one hour event hosted by > HP, > AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > _______________________________________________ > ggt-devel mailing list > ggt...@li... > https://lists.sourceforge.net/lists/listinfo/ggt-devel > |