Commit Graph

495 Commits

Author SHA1 Message Date
Christophe Riccio
9f8112f93a Reduced dependencies of GTX extensions. Removed some deprecated code. 2013-12-25 04:16:08 +01:00
Christophe Riccio
950eaa45cb Reduced dependencies for GTC extensions 2013-12-24 13:45:14 +01:00
Christophe Riccio
6f7eb97b87 Move content of core directory into detail directory. Reduced dependencies to glm.hpp. 2013-12-24 10:41:59 +01:00
Christophe Riccio
510abedf2b Added glm::length and removed col_size and row_size 2013-12-24 09:14:51 +01:00
Janis Born
56bd959f9e fix vector angle functions possibly returning NaN 2013-12-19 16:16:28 +01:00
Christophe Riccio
9f5d2be3da Fixed GTX_wrap 2013-12-18 19:54:39 +01:00
Christophe Riccio
420822704d Removed useless GTX extensions 2013-12-18 19:19:14 +01:00
Christophe Riccio
aa318f6a43 Fixed GTX_mixed_product build 2013-12-18 19:16:42 +01:00
jan p springer
0e3cebf23a removed boost dependencies 2013-12-18 10:34:06 +00:00
jan p springer
623cdaa552 reimplemented io support for basic types 2013-12-17 22:37:34 +00:00
Christophe Riccio
bbecc80903 Merge pull request #142 from bernstein/0.9.5
Remove includes of deleted half_float.hpp
2013-12-16 15:02:42 -08:00
Christophe Riccio
3b8a199f1b Fixed glm::multiple warning with unsigned int genType 2013-12-16 23:52:28 +01:00
Andreas Bernstein
8de3c56ddc Remove includes of deleted half_float.hpp 2013-12-15 21:45:55 +01:00
Christophe Riccio
29c3b4e484 Merge pull request #139 from regnirpsj/0.9.5
0.9.5: minor compile fixes, op+=/op*= for glm::quat, op<< for glm types
2013-12-10 16:44:30 -08:00
jan p springer
0f66a02c2a added: op<< for glm types 2013-11-22 23:48:58 +00:00
Ed Preston
0ee6673470 Fixed missing precision aualifier in template
Fixed missing precision aualifier in template to remove compiler
errors. (AppleClang - Xcode 5)
2013-11-15 22:11:22 -05:00
Christophe Riccio
70903c39d3 Fixed merge 2013-10-28 13:34:21 +01:00
Christophe Riccio
fbb54649b7 Added test files and fixed build errors for experimental extensions. 2013-10-27 22:38:22 +00:00
Christophe Riccio
2e72af3f6d Added test files for all GTX extensions 2013-10-27 18:25:03 +00:00
Sebastien Lussier
84b740d36e Added missing precision template params int GTX compatibility 2013-10-23 00:22:19 -04:00
Christophe Riccio
0e31538c26 Deprecated some GTX functions 2013-10-11 01:10:15 +02:00
Christophe Riccio
02c3ce21e8 More CUDA coverage, deprecated GTX_1010102 extension 2013-10-11 00:21:27 +02:00
David Reid
dea65c8c23 Remove #include of missing file. 2013-10-07 15:34:04 +10:00
Christophe Riccio
b51fe09cb9 Fixed build 2013-09-30 02:05:13 +02:00
Christophe Riccio
f911117407 Replace glm::detail::type traits by std::numerical_limits traits 2013-09-30 01:57:05 +02:00
Christophe Riccio
b6f5b4121d Fixed merge 2013-09-19 21:46:51 +02:00
Christophe Riccio
843cc7bd61 Fixed eulerAngleY rotation orientation 2013-09-19 21:33:29 +02:00
Christophe Riccio
d37d3539ed - Fixed ldexp implementation
- Increased assert coverage
- Increased static_assert coverage
- Replaced GLM traits by STL traits when possible
- Allowed including individual core feature
2013-09-16 03:03:49 +02:00
Christophe Riccio
6838815f9f Factorized fastInversesqrt code 2013-09-15 14:39:59 +02:00
Christophe Riccio
ba1ccbaba2 Fixed merge 2013-09-15 03:57:12 +02:00
Christophe Riccio
cc02b86fb1 Fixed merge 2013-09-15 03:30:20 +02:00
Christophe Riccio
804078f690 Fixed test against GLM_COMPILER_GCC31 and GLM_COMPILER_VC2005 that doesn't exist in GLM 0.9.5 #111 2013-09-08 15:32:30 +02:00
Christophe Riccio
c9f623e717 Fixed glm::orientation with GLM_FORCE_RADIANS defined #112 2013-09-08 15:23:13 +02:00
Christophe Riccio
0ff1026dbb Removed value_type and size_type 2013-09-08 02:30:16 +02:00
Christophe Riccio
b9266c07b0 Using C++ casts 2013-09-08 00:22:17 +02:00
Christophe Riccio
16b9c79acc Added implicit conversion of types with different precision qualifier 2013-09-02 00:16:41 +02:00
Christophe Riccio
25a5c21a24 Initial build with half types removed 2013-08-14 00:55:47 +02:00
Christophe Riccio
ef15d06104 Updated doxygen references 2013-05-12 15:51:11 +02:00
Christophe Riccio
0a54eb99b1 Fixed compatibility type, using precision qualifier 2013-05-12 15:50:49 +02:00
Christophe Riccio
1b3d5cd378 Fixed space characters 2013-05-10 21:37:20 +02:00
Christophe Riccio
a319cff426 Removed scalar functions 2013-05-10 12:36:10 +02:00
Christophe Riccio
691f04e14f Fixed post in/decrement operators 2013-05-08 21:52:21 +02:00
Christophe Riccio
b2e55904b8 Fixed dual quat built on GCC 2013-05-07 01:02:52 +02:00
Christophe Riccio
13f27821b9 Completed GTX_multiple for negative values, issue #79 2013-05-06 18:00:06 +02:00
Christophe Riccio
e3da5f952c Fixed merge 2013-05-06 15:34:37 +02:00
Robert Ancell
f0d4080fe3 Fix glm::higherMultiple and glm::lowerMultiple and assoicated test cases. Does not fix the specialized versions of these functions 2013-05-03 16:52:06 -07:00
Dave Reid
e0cfd7d672 Attempt a small optimization in operator*(fquatSIMD, fvec4SIMD). No big improvement. 2013-04-24 15:00:03 +10:00
Dave Reid
c08ea7656b Reorganize operator* to makes things a bit clearer. 2013-04-24 14:46:20 +10:00
Dave Reid
1eb88e4bc1 Cleanup. 2013-04-24 14:06:28 +10:00
Dave Reid
c1006718b3 Add fastMix() and fastSlerp() implementations.
These have stricter pre-conditions than standard mix() and slerp()
  - 1) Input quaternions must be unit length.
  - 2) The interpolation factor (a) must be in the range [0, 1]

None of these restrictions should be too bad. The reason for these is that it uses fastAcos()
and fastSin(), both of which have a limited allowable range.

In my contrived tests, I observed about a 10x improvement over the standard versions. This is
mostly because of the faster acos/sin operations. The fastSin(__m128) implementation also helps
here because it can do four fastSin() operations simultaneously using SSE (mix() and slerp()
each need three).
2013-04-24 13:55:38 +10:00
Dave Reid
d07496460a Add the ability to convert a SIMD quat to a standard mat4. 2013-04-24 09:54:28 +10:00
Dave Reid
942bf08fe3 Add the ability to convert standard mat4s and mat3s to SIMD quats. 2013-04-24 09:39:22 +10:00
Dave Reid
13837e1079 Remove the SSE3 implementation in operator*(fquatSIMD, fquatSIMD).
The SSE2 version is now running faster than the SSE3 version.
2013-04-24 08:51:17 +10:00
Dave Reid
197b6c96d8 Improve efficiency of operator*(fquatSIMD, fquatSIMD) in SSE4 mode.
Now only requires 3 shuffle, 4 mul and 4 dpps.
2013-04-24 07:58:41 +10:00
Dave Reid
d23da666c5 Merge branch '0.9.5' of https://github.com/g-truc/glm into quat_simd 2013-04-24 07:33:10 +10:00
Christophe Riccio
8c7828e6f7 Fixed merge 2013-04-23 16:40:07 +02:00
Christophe Riccio
3c7989486e Fixed literals in dual quaternion implementation 2013-04-23 16:39:15 +02:00
Dave Reid
7563a8bc4d Add initial implementation of SIMD optimized quaternions.
A few things here can probably be improved by people a lot smarter then
me, but for the most part things are generally faster.

A few notes:
 - A fquatSIMD can be converted to a fmat4x4SIMD using mat4SIMD_cast().
 - A tquat<float> can be converted to a fquatSIMD using quatSIMD_cast().
 - Some functions are virtually the same as their scalar counterparts
   because I've just not been able to get them faster.
 - Only the basic functions are implemented. Future plans include fast,
   approximate normalize, length and mix/slerp functions.
2013-04-23 15:36:12 +10:00
Dave Reid
6a7ccdb530 Fix another compilation error. 2013-04-23 14:18:05 +10:00
Dave Reid
b6d994f638 Compilation fixes due to missing P template parameters. 2013-04-23 10:01:50 +10:00
Dave Reid
5519b86003 Fix fvec4SIMD and fmat4x4SIMD compilation errors. 2013-04-23 09:19:57 +10:00
Christophe Riccio
f1967b5fb3 Removed GTX_ocl_type, issue #64 2013-04-19 21:53:31 +02:00
Christophe Riccio
85ae145cf5 Fixed merge 2013-04-19 21:38:57 +02:00
Christophe Riccio
e72f18997c Fixed GTX_multiple for negative values, issue #51 2013-04-19 21:30:52 +02:00
Christophe Riccio
d4043ea49a Added all precision types for GTC_type_precision 2013-04-16 21:58:26 +02:00
Christophe Riccio
296e3d7007 Fixed half precision implementation 2013-04-15 11:04:24 +02:00
Christophe Riccio
c14e2d7fbc Added precision template parameter 2013-04-10 13:46:27 +02:00
Christophe Riccio
39cf417691 Added initial implementation for forward declarations: int and float scalar types, #56 2013-03-31 01:16:13 +01:00
Christophe Riccio
6a96cd819a Fixed dual quaternion build on Clang, fixed space characters #49 2013-03-31 00:48:28 +01:00
Christophe Riccio
78d3e5ca66 Updated readme 2013-03-27 02:33:59 +01:00
Christophe Riccio
e7a5e50fc8 Fixed merge 2013-03-16 18:16:36 +01:00
Christophe Riccio
8ed5f541ff Resolved issue #58 2013-03-16 01:24:29 +01:00
Christophe Riccio
4d71624067 Added file headers so that the files are no longer empty. #57 2013-03-16 01:20:26 +01:00
Christophe Riccio
6c4ae0d241 Fixed space characters 2013-03-10 19:34:21 +01:00
Christophe Riccio
5c44c6e9fc Merge branch '0.9.4' into 0.9.5 2013-02-22 10:49:00 +01:00
Christophe Riccio
f37af51426 Fixed API for euclian, only need a vec2 parameter 2013-02-22 10:17:25 +01:00
Christophe Riccio
982bb5ce5d Added rotation function, issue #22 2013-02-22 01:08:33 +01:00
Christophe Riccio
7b57810a34 Merge branch '0.9.4' into 0.9.5 2013-02-21 22:57:27 +01:00
Christophe Riccio
18a8efde62 Resolve issue #39, exp, squad and intermediate functions 2013-02-21 22:57:14 +01:00
Christophe Riccio
1e3cb00fe5 Completed bit interleaving for 3 and 4 values 2013-02-21 21:35:21 +01:00
Christophe Riccio
3e3736769c Fixed intrinsics build 2013-02-21 11:36:50 +01:00
Christophe Riccio
78118204f6 Merge branch '0.9.4' into 0.9.5 2013-02-20 16:22:07 +01:00
Christophe Riccio
2a4434786e Updated date 2013-02-20 16:21:56 +01:00
Maksim Vorobiev
50c870ea96 Moved all dual quaternion functionality from GTC space to GTX. 2013-02-20 17:57:17 +03:00
Christophe Riccio
bd7125c50b Added bit interleave for 3 and 4 integers 2013-02-10 19:25:11 +01:00
Christophe Riccio
6799127ec6 Fixed any and all for scalars 2013-02-04 19:17:47 +01:00
Christophe Riccio
59b9a780e9 Added GTX_scalar_relational implementation and tests 2013-02-04 19:04:32 +01:00
Christophe Riccio
c57a000791 Added bitfieldInterleave implementation 2013-02-01 23:55:25 +01:00
Christophe Riccio
920ca0a242 Experiments to add bitfieldInterleave 2013-02-01 20:53:32 +01:00
Christophe Riccio
b5607d0018 Fixed merge 2013-01-31 15:01:48 +01:00
Christophe Riccio
a4aa39f9bd Fixed 0x2013 dash character in comments that cause issue in Windows 2013-01-23 02:27:59 +01:00
Christophe Riccio
43a9e450fd Fixed mix for vec4 SSE implementation, issue #33 2013-01-23 02:18:43 +01:00
Christophe Riccio
e7173dd156 Fixed compAdd, issue #40 2013-01-23 00:55:09 +01:00
Dave Reid
7b6fb9f635 Fix GCC warnings. 2012-12-21 10:48:10 +10:00
Dave Reid
18c616528a Add missing implementations of fmat4x4SIMD unary operators. 2012-12-21 08:33:14 +10:00
Dave Reid
c6c8dd15f2 Add missing implementation of fmat4x4SIMD binary operators. 2012-12-21 08:28:34 +10:00
Dave Reid
a4ea111417 Add a new constructor to fmat4x4SIMD that takes a __m128[4]. This is used in a future commit. 2012-12-21 08:19:36 +10:00
Dave Reid
3681cd3523 Add support for doing an identity initialization in the default constructor of fmat4x4SIMD().
This is disabled by default and enabled with GLM_SIMD_ENABLE_DEFAULT_INIT. It makes toggling between SIMD and non-SIMD builds a bit easier.
2012-12-21 07:55:39 +10:00
Dave Reid
efff3add87 Add support for doing a (0.0, 0.0, 0.0, 0.0) initialization in the default constructor of fvec4SIMD().
This is disabled by default, but enabled with GLM_SIMD_ENABLE_DEFAULT_INIT. This makes toggling between SIMD and non-SIMD builds a bit easier.
2012-12-21 07:49:49 +10:00
Dave Reid
87c90590be Add support for x,y,z,w accessors to fvec4SIMD.
This is done via a union. It must be enabled with GLM_SIMD_ENABLE_XYZW_UNION. A nameless struct/union warning in VC (C4201) is explicitly disabled with the "pragma warning(push/pop)" system.

Allowing xyzw access makes it much easier to toggle between SIMD and non-SIMD builds.
2012-12-21 07:40:03 +10:00
Christophe Riccio
0b41846700 Fixed speeling 2012-12-20 11:16:12 +01:00
Christophe Riccio
739ab3529c Resolved issue #4, added GLM_GTX_rotate_normalized_axis 2012-12-14 00:14:02 +01:00
Christophe Riccio
841f91e830 Fixed bug #15, added missing roll, pitch and yaw functions; Fixed half implicit conversions 2012-12-13 22:48:20 +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
9d9a625493 Renamed equalEpsilon function into epsilonEqual and added tests 2012-11-05 19:39:22 +01:00
Christophe Riccio
1dda2390e5 Fixed warnings on MacOS X 2012-11-04 14:26:54 +01:00
Christophe Riccio
b1ecabdd28 Fixed GTX_matrix_interpolation, issue #9 2012-09-19 19:14:45 +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
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
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
2f3dd90aca Merge branch '0.9.3' into 0.9.4 2012-09-05 23:45:12 +02:00
Christophe Riccio
09a8d5a621 Fixed warning from #123 comments 2012-07-01 11:32:55 +01:00
Christophe Riccio
40622b0e79 Fixed merge 2012-05-08 21:01:40 +01:00
Christophe Riccio
77eabf703a Merge branch '0.9.3' into 0.9.4 2012-05-02 13:07:06 +01:00
Christophe Riccio
a5fdf3c1bf Fixed ticket #182, isnan and isinf conflicts 2012-04-30 22:23:08 +01:00
Christophe Riccio
958bb6f6ca Fixed GTX_compatibility on Android r7 2012-04-19 11:29:57 +01:00
Christophe Riccio
ac768ea12b Added an alias (slerp) for mix with quaternions 2012-04-14 15:33:44 +01:00
Christophe Riccio
874a675bb9 Fixed nextafter for float on Intel compiler 2012-04-14 14:45:27 +01:00
Christophe Riccio
6a4677c30e Promoted GTX_epsilon, GTX_ulp, fixed build, removed deprecation warning at build time 2012-04-07 02:30:26 +01:00
Christophe Riccio
b2f0f4d3f9 Move noise, random and ulp test to GTC tests 2012-04-07 00:36:15 +01:00
Christophe Riccio
cb017c5bca Promoted angle axis interaction with quaternion 2012-04-06 21:04:46 +01:00
Christophe Riccio
5454f224b8 Fixed merge 2012-04-06 16:38:28 +01:00
Christophe Riccio
7373e7b8da Promote eulerAngles to GTC quaternion extension 2012-04-01 18:19:09 +01:00
Christophe Riccio
81efafa976 Merge branch '0.9.3' into 0.9.4 2012-03-16 21:55:54 +00:00
Christophe Riccio
8537e33b8d Fixed ticket 169, parameter not used for mat division 2012-02-19 22:43:40 +00:00
Christophe Riccio
f267b6ea18 Promote GTC_constants 2012-01-25 18:54:28 +00:00
Christophe Riccio
fb3a41995a Ticket #137, added constexpr support 2012-01-25 18:36:04 +00:00
Christophe Riccio
100b2202dd Added GLM_FORCE_RADIANS 2012-01-25 16:37:09 +00:00
Christophe Riccio
64e06fa57a Merge branch '0.9.3' into 0.9.4 2012-01-24 12:07:52 +00:00
Christophe Riccio
89fcd31730 Fixed typo #166 2012-01-23 10:07:37 +00:00
Christophe Riccio
b19f609f51 Merge branch '0.9.3' into 0.9.4 2012-01-11 20:38:04 +00:00
Christophe Riccio
5eac74c4da Fixed ticket #163, missing inlines 2012-01-11 17:37:44 +00:00
Christophe Riccio
9a394874c3 Promote and deprecate extensions 2012-01-10 20:43:20 +00:00
Christophe Riccio
c26057d07b Merge branch '0.9.3' into 0.9.4 2012-01-10 10:40:00 +00:00
Christophe Riccio
953c80a1d6 Merge branch '0.9.3' of ssh://ogl-math.git.sourceforge.net/gitroot/ogl-math/ogl-math into 0.9.3 2012-01-09 11:21:48 +00:00
Christophe Riccio
88d3927558 Updated copyright date 2012-01-09 11:20:01 +00:00
Christophe Riccio
1ed0e3865b Fixed log2 in GCC 2012-01-08 22:36:49 +00:00
Christophe Riccio
040ea3ce7e Fixed conflict with Boost, ticket #158 2012-01-08 13:13:18 +00:00
Christophe Riccio
de3305ccef Fixed ticket #157, conflict with WinGDI.h 2011-12-17 18:55:30 +00:00
Christophe Riccio
ee00387d2d Promoted the ULP extension 2011-12-12 14:53:30 +00:00
Christophe Riccio
f18ad6bf2e Updated doxygen documentation 2011-12-07 14:50:15 +00:00
Christophe Riccio
a3b5034d4e Updated constants list 2011-12-07 12:37:22 +00:00
Christophe Riccio
59b0d3ae00 Updated doxygen documentation 2011-12-07 12:22:28 +00:00
Christophe Riccio
7ff95df5e6 Fixed ticket #153, vector and matrix queries 2011-12-06 12:22:43 +00:00