Commit Graph

860 Commits

Author SHA1 Message Date
Christophe Riccio
b8f30c5ad3 Fixed bug #11, added missing quat based epsilonEqual and epsilonNotEqual definitions 2012-11-15 15:37:28 +01:00
Christophe Riccio
47b610c6d3 Clean up doxygen documentation 2012-11-15 15:29:41 +01:00
Christophe Riccio
4b18cc7051 Clean up doxygen documentation... was exposing implementation details 2012-11-14 12:16:10 +01:00
Christophe Riccio
2f8f070597 Fixed GTC_epsilon with Clang 2012-11-14 12:02:24 +01:00
Christophe Riccio
0b745d4e1c Clean up space characters 2012-11-13 17:57:42 +01:00
Christophe Riccio
7b60ef7ab4 Merge branch 'master' of https://github.com/g-truc/glm into 0.9.4 2012-11-13 17:55:19 +01:00
Christophe Riccio
214c56cd45 Updated doxygen documentation 2012-11-13 17:54:11 +01:00
Christophe Riccio
7778013575 Fixed space characters 2012-11-13 13:19:11 +01:00
boromisp
1683e78f58 Fixed the line-sphere intersection
The original implementation had the same mistakes than the ray-sphere
intersection.
Added two new 'out' parameters to return both intersection ponits.
Changed the implementation to the geomethric method.
2012-11-11 23:53:10 +01:00
boromisp
ed12134f34 Fixed the original ray-sphere intersection
Changed the original analytic method to a geometrical.

The errors in the original intersection calculation:
The function has a sphere center parameter, but ignores it and assumes
that the sphere is in the origo.
It calculates the length of the ray direction vector, but later on uses
this vector as a unit vector.
The position calculation is simply wrong. It multiplies the direction
vector with the radius of the sphere instead of the calculated
intersection distance.

The quadratic equation solving could be improved too:
There should be an early exit for negative discriminant.
The naive implementation sould be changed to a floating-point
specialized one.
2012-11-11 23:41:11 +01:00
boromisp
3a3c1fd8e8 Added new ray-sphere intersection
This version uses a geometric method (usually faster) and doesn't
calculate the intersection position and normal, only the distance.
2012-11-11 23:09:12 +01:00
Christophe Riccio
4fff9b4367 Added matrix inverse tests and clean up space characters 2012-11-09 03:39:43 +01:00
Christophe Riccio
c9a0b87c7b Fixed spaces 2012-11-09 01:24:22 +01:00
Christophe Riccio
a69de771a0 Fixed merge 2012-11-09 01:24:04 +01:00
Christophe Riccio
4d3af10700 Fixed space characters 2012-11-08 15:00:50 +01:00
Christophe Riccio
669ace8067 Fixed space character 2012-11-08 14:34:22 +01:00
Christophe Riccio
bfec0e2388 Fixed epsilon for half types 2012-11-06 02:26:31 +01:00
Christophe Riccio
1fb8bec873 Fixed abs function for half based types 2012-11-06 01:23:14 +01:00
Christophe Riccio
9d9a625493 Renamed equalEpsilon function into epsilonEqual and added tests 2012-11-05 19:39:22 +01:00
Christophe Riccio
16876bef5a Fixed merge 2012-11-04 21:57:19 +01:00
Christophe Riccio
1dda2390e5 Fixed warnings on MacOS X 2012-11-04 14:26:54 +01:00
Tim Howard
e2bc911f00 Fixed component swapping in tmat2x2::_inverse().
NB: glm::detail::tmat2x2::_inverse() incorrectly swaps all components instead of only main diagonals:

	A = ⌈a  b⌉
	    ⌊c  d⌋

(using standard representation). _inverse() on A incorrectly gives the order

	⌈ d  -c⌉
	⌊-b   a⌋

(swaps both diagonals) where it should be

	⌈ d  -b⌉
	⌊-c   a⌋

(I am leaving out division by the determinate for clarity).

Also, glm::inverse() in `glm/core/func_matrix.inl` is correct for 2x2 matrices and shows the mistake of _inverse().
The unit tests do not appear to test division of a mat2 by a mat2 (where this could arise).
2012-10-22 17:23:03 -04:00
Christophe Riccio
1ded040f23 Merge branch 'master' into 0.9.4 2012-10-18 12:16:52 +02:00
Christophe Riccio
af2debfd43 Fixed spaces 2012-10-18 12:12:32 +02:00
Jakob Progsch
476abb8be0 removed \ from commented out out macro on line 564 to avoid compiler warnings for multiline comments 2012-10-18 11:56:54 +02:00
Christophe Riccio
c899d63725 Fixed Clang and LLVM GCC detection 2012-10-13 18:26:04 +02:00
Christophe Riccio
b9d9ae4ec5 updated CLang version detection 2012-09-23 15:30:17 +01:00
Christophe Riccio
8b5e63375f updated CLang version detection 2012-09-23 15:27:47 +01:00
Christophe Riccio
3fc42c9e9e Simplify Compilation build model detection 2012-09-20 17:31:32 +02:00
Christophe Riccio
8aa2eafc36 Added experiment in comment to auto detect the instruction set 2012-09-20 16:35:10 +02:00
Christophe Riccio
8c4ea6ebb2 Fixed isnan on GCC 2012-09-20 12:28:12 +02:00
Christophe Riccio
c6d87a9458 Added compiler detection 2012-09-20 11:40:15 +02:00
Christophe Riccio
1eac545656 Fixed Intel compiler detection 2012-09-20 10:28:39 +02:00
Christophe Riccio
b012c80771 Fixed isnan for Intel compiler 2012-09-20 10:17:03 +02:00
Christophe Riccio
b1ecabdd28 Fixed GTX_matrix_interpolation, issue #9 2012-09-19 19:14:45 +02:00
Christophe Riccio
7e3f00d034 Added missing test files 2012-09-19 15:34:23 +02:00
Christophe Riccio
c2eea6da26 Removed floor_log2, comment that isnan and isinf are not working on MinGW 2012-09-18 01:52:16 +02:00
Christophe Riccio
56738ee5cb Added idea for SSE2 implementation of findMSB 2012-09-13 02:14:41 +02:00
Christophe Riccio
8a7d6080d1 Fixed findMSB generic path 2012-09-13 00:43:46 +02:00
Christophe Riccio
a2ba0ea86f Merge branch '0.9.3' of https://github.com/Groovounet/glm into 0.9.4 2012-09-12 15:59:17 +02:00
Joonas Sarajärvi
ad3422f6aa Better fix glm::findMSB for GCC >= 4.0
The previous fix only worked correctly for values where
the most significant enabled bit was the only enabled bit.

This change changes the implementation back to using clz,
but so that the result is changed with additional arithmetics.

There is still at least one known limitation with regards
to acceptable input types, but this is documented in the code.
2012-09-12 15:17:21 +03:00
Joonas Sarajärvi
daa51e42bb Fix glm::findMSB for GCC >= 4.0
Before this fix, the GCC specific MSB function returned the number
of leading zero bits in the parameter value. With this change,
the number of trailing zero bits is returned instead.

I am not entirely sure if this fix is correct, because I could not
find a clear reference about what findMSB in GLSL is really
supposed to return with some concrete input value.
At least the result is now consistent with the GLM_ARCH_PURE
implementation of glm::findMSB.
2012-09-12 01:59:13 +03:00
Joonas Sarajärvi
da530ac46e Fix integer version of glm::log2 for GCC
This pretty much reverts the fix done in commit
1ed0e3865b

This temporarily breaks log2 for GCC in cases where GLM_FORCE_PURE
is not defined. The workaround introduced in commit
1ed0e3865b seems to rely
on getting invalid results from the nlz function.

Broken nlz is caused by a broken findMSB function for GCC.

A fix for the findMSB function should be available in a nearby
separate commit.
2012-09-12 01:51:02 +03:00
Christophe Riccio
1822f9dd04 Added Intel compiler support 2012-09-11 02:30:28 +02:00
Christophe Riccio
e8cbc50343 Fixed SSE detection on Visual C++ 2012-09-06 20:05:11 +02:00
Christophe Riccio
88cbbebac6 Merge branch 'master' into 0.9.4 2012-09-06 18:45:15 +02:00
Ed Hutchins
311c64c3d3 Fixed SSE detection 2012-09-05 14:48:02 -07:00
Christophe Riccio
2f3dd90aca Merge branch '0.9.3' into 0.9.4 2012-09-05 23:45:12 +02:00
Christophe Riccio
72a01d3432 Experiment to do 2012-08-22 18:22:06 +01:00
Christophe Riccio
09a8d5a621 Fixed warning from #123 comments 2012-07-01 11:32:55 +01:00