Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 14 April 2005 - 03:08 PM
Posted 14 April 2005 - 03:38 PM
Posted 15 April 2005 - 02:03 AM
Posted 15 April 2005 - 05:32 AM
Posted 15 April 2005 - 08:13 AM
Quote:
Original post by jyk
Here's another option to consider. You can get the same interpolation as you would with quaternion slerp (albeit at greater expense) by finding the matrix that rotates from A to B, extracting the axis and angle from this matrix, scaling the angle, and then recomposing the matrix from the axis and angle and multiplying with A.
I'm at work now, but if you're interested in this method I can post details later (or perhaps someone else will in the meantime).
inline void interpolate(const Mat3 & a,const Mat3 & b,flt alpha,Mat3 & c) {
Mat3 delta = b ^ !a; // ^ = matrix product, ! = matrix transpose.
Vec3 axis;
flt deltaAngle;
delta.getAxisAngle(axis,deltaAngle);
Mat3 rm(axis,deltaAngle*alpha);
c = rm ^ a;
} // interpolate
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.