Page Menu
Home
Search
Configure Global Search
Log In
Files
F18100
mul_qt_v3-comment.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Bill Currie (taniwha)
Nov 13 2013, 4:06 PM
Size
715 B
Subscribers
None
mul_qt_v3-comment.diff
View Options
--- source/blender/blenlib/intern/math_rotation.c
+++ source/blender/blenlib/intern/math_rotation.c
@@ -78,7 +78,13 @@ void mul_qt_qtqt(float q[4], const float q1[4], const float q2[4])
q[2] = t2;
}
-/* Assumes a unit quaternion */
+/* Shortcut for q v q* when v is actually a quaternion. This removes the need
+ * for converting a vector to a quaternion, calculating q's conjugate and
+ * converting back to a vector. It also happens to be faster (17+,24* vs
+ * 24+,32*). If q is not a unit quaternion, then v will be both rotated by
+ * the same amount as if q was a unit quaternion, and scaled by the square of
+ * the length of q.
+ */
void mul_qt_v3(const float q[4], float v[3])
{
float t0, t1, t2;
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9c/a3/1d3a4090ec1e174c9097838dea37
Event Timeline
Log In to Comment