20 Commits

Author SHA1 Message Date
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
88d3927558 Updated copyright date 2012-01-09 11:20:01 +00:00
Christophe Riccio
51716bb460 Extensions included have a define which value is GLM_VERSION 2011-09-13 11:34:45 +01:00
Christophe Riccio
8b919ffe54 Merge branch '0.9.3' of ssh://ogl-math.git.sourceforge.net/gitroot/ogl-math/ogl-math into 0.9.3 2011-06-14 20:26:56 +01:00
Christophe Riccio
f97f51b47c Added extension versioning 2011-06-14 20:26:23 +01:00
Christophe Riccio
3621deaeb5 Removed gtc and gtx namespaces 2011-06-10 16:45:17 +01:00
Christophe Riccio
73c3d7a266 Completed new header to extensions 2011-06-09 08:38:05 +01:00
Christophe Riccio
747d6b47b4 WIP New header to extensions 2011-06-08 00:58:37 +01:00
Christophe Riccio
06cc480baa Removed gtx extension namespace 2011-06-07 11:28:11 +01:00
Christophe Riccio
14760e9770 Updated header files formatting 2011-05-18 15:38:03 +01:00
Christophe Riccio
9ecdd379e4 Removed old deprecated test function declarations 2011-05-18 14:55:06 +01:00
Christophe Riccio
2cf02a836c Apply 'basic grouping patch' Ticket #36 2011-02-05 00:49:50 +00:00
Christophe Riccio
e4421a9b0f Updated copyright dates 2011-01-20 11:40:14 +00:00
Christophe Riccio
da085b4287 Added extension include messages 2011-01-19 17:10:55 +00:00
Christophe Riccio
05439738b8 Updated to GLM 0.9.B 2010-04-29 11:56:52 +01:00
Christophe Riccio
7c7b1d0b3d Added GLM 0.8.4 2010-04-29 11:54:07 +01:00
Christophe Riccio
b1b02bc31b RAZ 2010-04-29 11:52:01 +01:00
Christophe Riccio
25b03fe24c Initial commit based on GLM 0.9.B.1 code 2010-04-14 13:23:59 +01:00