Commit Graph

18 Commits

Author SHA1 Message Date
Bill Currie 6f484ee757 Add support and tests for 3x3 matrices. 2012-08-18 16:29:57 +09:00
Bill Currie 9f253454e4 Implement and test Mat4Inverse(). 2012-05-15 21:08:44 +09:00
Bill Currie fa6270322f Make Mat4Decompose a little more intuitive.
Params are now in application order (good thing not much code uses it yet).
2012-05-15 21:08:44 +09:00
Bill Currie de131c18ad Add VectorShear and really test Mat4Decompose.
And the tests really exercised VectorShear (first attempt had things
messed up when more than one shear value was non-zero). Also,
Mat4Decompose wasn't orthogonalizing the z axis row. Oops. Anyway,
Mat4Decompose is now known to work well, and the usage of its output is
understood :)
2012-05-15 21:08:44 +09:00
Bill Currie 82abd5e426 More matrix tests. 2012-05-15 21:08:44 +09:00
Bill Currie 50af8a562e Add tests for matrix decomposition and fix the bugs. 2012-05-15 21:08:44 +09:00
Bill Currie 8aabb704d2 Add tests for inverting a dual quad transform. 2012-05-15 21:08:43 +09:00
Bill Currie f874aeb941 Add support for duals and dual quaternions.
Not everything is unit-tested, but the currently important stuff is.
2012-05-15 21:08:43 +09:00
Bill Currie 8791b35e55 Add support for half floats.
iqm and OpenGL use them, so they might come in handy. The tests use values
from wikipedia and a couple extra.
2012-04-26 20:55:11 +09:00
Bill Currie efaef89c5f Add a shortcut function for quaterion/vector multiplication.
I got the idea from blender when I discovered by accident that quat * vect
produces the same result as quat * qvect * quat* and looked up the code to
check what was going on. While matrix/vector multiplication still beats the
pants off quaternion/vector multiplication, QuatMultVec is a slight
optimization over quat * qvect * quat* (17+,24* vs 24+,32*, plus no need to
to generate quat*).
2012-04-26 09:48:08 +09:00
Bill Currie d8d21b00f4 Fix some issues found found by valgrind.
Buffer underflow and though strcpy has always been safe there, change to
memmove. Had the added benefit of helping me create more test cases for
better coverage.
2012-01-24 19:54:21 +09:00
Bill Currie c25327f4ed Add union and merge functions and tests. 2012-01-06 12:57:25 +09:00
Bill Currie 981760e19a Add tests for vrect. 2012-01-06 11:04:34 +09:00
Bill Currie bfd1680c15 Fix a 32/64 bit portability issue. 2011-09-09 19:56:16 +09:00
Bill Currie 225f1cd06c Rewrite QFS_StripExtension() to use QFS_FileExtension(). 2011-09-09 17:35:12 +09:00
Bill Currie 96ef0ffaea Rewrite QFS_FileExtension() to be more correct. 2011-09-09 17:33:29 +09:00
Bill Currie 12e238f806 Add a function to convert quake angles to a quaternion.
The test works by comparing the result of AngleVectors with forward,
right, and up vectors rotated by the quaternion resulting from AngleQuat.
2011-09-04 09:58:12 +09:00
Bill Currie b18ff4ed3e Move test-qfs.c into a test directory.
Same as before: avoiding -prefic-pic issues.

Also, catch some minor snafus found in the previous commit. With this, make
distcheck passes again :)
2011-06-12 16:34:15 +09:00