most exactly way of compare between Quaternions

This topic is 4158 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

which function is the most exactly of compare between two Quaternions? compare allowable offset values between each two quaternions. three way compare two quaternions(ref. 3dmax sdk) : q1, q2 1. GetAngAxisFromQ( Quat q, float &fAng, Point3 p3Axis ); ... Point3 AxisP3(1.0f, 1.0f, 1.0f); float fAng1, fAng2; bool bOver = false; GetAngAxisFromQ( q_1, fAng1, p3Axis ); GetAngAxisFromQ( q_2, fAng2, p3Axis ); bOver = IsOffsetOver( fAng1, fAng2, fValueRange ); ... 2. QuatToEuler( Quat q, float& arrf ); float arrfAng_Axis_q1[3], arrfAng_Axis_q2[3]; ... bool bOver = false; QuatToEuler( q1, arrfAng_Axis_q1 ); QuatToEuler( q2, arrfAng_Axis_q2 ); bOver = IsOffsetOver( arrfAng_Axis_q1, arrfAng_Axis_q2, fValueRange ); ... 3. Quat1.x Compare Quat2.x, ... bool bOver = false; bOver = IsOffsetOver( q1, q2, fValueRange ); // bool IsOffsetOver( Quat q1, Quat q2, float fValueRange ) { float fOffset_x = fabs(q2.x - q1.x); float fOffset_y = fabs(q2.y - q1.y); float fOffset_z = fabs(q2.z - q1.z); return (fOffset_x > fValueRange) || (fOffset_y > fValueRange) || (fOffset_z > fValueRange); } // ...

1. 1
Rutin
46
2. 2
3. 3
4. 4
5. 5

• 13
• 10
• 12
• 10
• 13
• Forum Statistics

• Total Topics
632997
• Total Posts
3009799
• Who's Online (See full list)

There are no registered users currently online

×