Commit Graph

1080 Commits

Author SHA1 Message Date
Christophe Riccio
149df8e3db Added assert on input values for glm::perspective 2013-05-27 18:29:04 +00:00
Christophe Riccio
cf41c03c94 Fixed merge 2013-05-27 14:54:02 +00:00
tszirr
216ad4c34d Add more missing GLM_FUNC_QUALIFIERs 2013-05-27 15:07:22 +02:00
tszirr
e166850954 Fix missing return statement in swizzle assignment operator 2013-05-27 14:59:16 +02:00
tszirr
eb4cd987f1 Added missing GLM_FUNC_DECL specifiers 2013-05-27 14:55:08 +02:00
tszirr
fa77d41ab9 Fix broken _GLM_SWIZZLE4_4_MEMBERS 2013-05-27 14:34:41 +02:00
Christophe Riccio
129efd75a9 Back ported extended swizzle fix for issue #84 2013-05-26 09:59:39 +00:00
Christophe Riccio
edc5365189 Added more missing swizzle operators. #84 2013-05-26 09:57:04 +00:00
Christophe Riccio
1ac4dd648a Merge branch 'master' into 0.9.4 2013-05-26 09:37:46 +00:00
meejah
3352b45222 Add a missing swizzle, for .xwww 2013-05-22 10:45:30 -06:00
Christophe Riccio
056e053b3f Fixed merge 2013-05-16 14:36:51 +00:00
Christophe Riccio
b95a53095b Added assert in inversesqrt to detect division by zero. #61 2013-05-16 14:36:04 +00: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
01a98e97c1 Fixed perspective with zNear == 0 (#71) 2013-05-12 15:36:29 +02:00
Christophe Riccio
1c68cee29b Clean up code test for branch compatibility on all platforms 2013-05-12 11:40:25 +02:00
Christophe Riccio
9841d2a2b4 Removed SSE tests 2013-05-11 22:40:02 +02:00
Christophe Riccio
929b521381 Added embedded SSE opetimizations in mat4 code 2013-05-11 00:08:55 +02:00
Christophe Riccio
66e3e52592 Fixed increment and decrement operators for matrix types 2013-05-10 23:08:30 +02:00
Christophe Riccio
6487ed1c34 Added assert to row and column functions 2013-05-10 21:52:23 +02:00
Christophe Riccio
1b3d5cd378 Fixed space characters 2013-05-10 21:37:20 +02:00
Christophe Riccio
a2583caa0f Added vector type operator declarations 2013-05-10 14:03:54 +02:00
Christophe Riccio
a319cff426 Removed scalar functions 2013-05-10 12:36:10 +02:00
Christophe Riccio
28d8e7f251 Fixed increment and decrement operators tests 2013-05-10 01:44:13 +02:00
Christophe Riccio
4a93e0ab70 Fixed explicit empty constructors for specialized half classes 2013-05-09 16:06:59 +02:00
Christophe Riccio
1839858465 Fixed missing typename 2013-05-09 13:46:56 +02:00
Christophe Riccio
691f04e14f Fixed post in/decrement operators 2013-05-08 21:52:21 +02:00
Christophe Riccio
28c6bba18c Refacted GTC_angle 2013-05-07 01:20:00 +02:00
Christophe Riccio
929f140b1e Added GTC_angle extension files 2013-05-07 01:05:45 +02:00
Christophe Riccio
b2e55904b8 Fixed dual quat built on GCC 2013-05-07 01:02:52 +02:00
Christophe Riccio
5338aaac9e Added half literals 2013-05-07 01:01:56 +02:00
Christophe Riccio
49fbfa051c Optimized radians and degrees functions 2013-05-06 20:35:13 +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
Christophe Riccio
092ccbe64f Merge branch '0.9.5' of https://github.com/g-truc/glm into 0.9.5 2013-05-05 21:36:41 +02:00
Christophe Riccio
56564badb5 Added tests for issue #72 2013-05-05 21:36:22 +02:00
Christophe Riccio
0d3883c204 Merge pull request #75 from mackron/quat_simd
SIMD Quaternions
2013-05-05 09:16:35 -07:00
Christophe Riccio
c795562f67 Renamed gentype::null into gentype::_null for Tizen, #78 2013-05-05 18:06:42 +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
Christophe Riccio
281a391b4d Fixed swizzle build on Visual C++ compiler 2013-05-01 01:54:48 +02: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
Dave Reid
30dca2d0c7 Fix an ambiguity error with clamp(). 2013-04-23 09:09:37 +10:00
Christophe Riccio
161c6c474b Added library builds 2013-04-22 22:28:00 +02:00
Christophe Riccio
f1967b5fb3 Removed GTX_ocl_type, issue #64 2013-04-19 21:53:31 +02:00
Christophe Riccio
a67c7594bc Clarified comments in GTC_epsilon, issue #69 2013-04-19 21:44:49 +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
604405e941 Fixed equal operator on quat 2013-04-17 18:24:02 +02:00
Christophe Riccio
54e9d54579 Fixed tests and mat type typedefs 2013-04-17 12:26:34 +02:00
Christophe Riccio
abbb0fc7cb Added component wise comparison operators for quaternion 2013-04-17 11:16:54 +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
Kristian Lein-Mathisen
867db84ca5 Fixed mat2x4 value-type constructor
#include <glm/glm.hpp>
#include <iostream>
using namespace std;
int main() {
    // creating two should-be identical matrices
  glm::mat2x4 A((int)1);
  glm::mat2x4 B((float)1);

  float* Aptr = (float*)&A;
  float* Bptr = (float*)&B;
  for(int i = 0 ; i < 8 ; i++) cout << Aptr[i] << " ";  cout << endl;
  for(int i = 0 ; i < 8 ; i++) cout << Bptr[i] << " ";
}

output before patch:
1 0 0 0 0 1 0 0
1 0 0 0 0 0 0 0
output after patch:
1 0 0 0 0 1 0 0
1 0 0 0 0 1 0 0
2013-04-14 23:30:30 +02:00
Christophe Riccio
c14e2d7fbc Added precision template parameter 2013-04-10 13:46:27 +02:00
Christophe Riccio
d2c0cf0a93 Fixed space characters 2013-04-02 01:50:12 +02:00
Christophe Riccio
4b4f3fbbaa Fixed space characters and improved forward declaration, including extensions 2013-04-01 23:02:26 +02:00
Christophe Riccio
9e5e056229 Clean up 2013-04-01 13:06:15 +02:00
Christophe Riccio
5bb22ed2ee Added txt files to the project solution 2013-04-01 13:05:43 +02:00
Christophe Riccio
589e7cda6b Added forward declarations (glm/fwd.hpp) for faster compilations, issue #56 2013-03-31 11:41:53 +02:00
Christophe Riccio
afb7779baf Added forward declarations (glm/fwd.hpp) for faster compilations, issue #56 2013-03-31 03:35:10 +02:00
Christophe Riccio
ea09100144 Added forward declarations (glm/fwd.hpp) for faster compilations, issue #56 2013-03-31 03:33:24 +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
e7dc01fc06 Fixed slerp, linear interpolation when cosTheta is close to 1, #65 2013-03-26 00:28:29 +01:00
Christophe Riccio
7739e9c3e3 Fixed merge 2013-03-20 01:49:22 +01:00
Christophe Riccio
dab66f81e5 Fixed mix function for bool and bvec* type third parameter, issue #59 2013-03-17 14:03:37 +01:00
Christophe Riccio
356e70e653 Autodetect C++ version using __cplusplus value, issue #62 2013-03-17 12:59:59 +01:00
Christophe Riccio
e7a5e50fc8 Fixed merge 2013-03-16 18:16:36 +01:00
Christophe Riccio
003c547e43 Fixed isnan and isinf on Android with Clang, issue #54 2013-03-16 01:34:37 +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
cc60e7d230 Merge branch '0.9.5' of https://github.com/g-truc/glm into 0.9.5 2013-02-22 15:54:20 +01:00
Christophe Riccio
5c44c6e9fc Merge branch '0.9.4' into 0.9.5 2013-02-22 10:49:00 +01:00
Christophe Riccio
a2be7bbc43 Merge pull request #52 from msomeone/0.9.5
Removed erroneous include "./gtc/dual_quaternion.hpp". Now correctly inc...
2013-02-22 01:38:59 -08:00
Christophe Riccio
f37af51426 Fixed API for euclian, only need a vec2 parameter 2013-02-22 10:17:25 +01:00
Maksim Vorobiev
2afa70aedf Removed erroneous include "./gtc/dual_quaternion.hpp". Now correctly including "./gtx/dual_quaternion.hpp" 2013-02-22 08:29:27 +03: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
Christophe Riccio
eafe125d95 Updated readme for GLM 0.9.4.3 2013-02-20 16:08:01 +01:00