Commit Graph

205 Commits

Author SHA1 Message Date
Miro Knejp
c351089e9f Dedicated extension to represent angle values
Defines a dedicated type and operations for angles taking care of the radians/degrees issue and enforcing semantically sane usage.

Applying these types consistently can prevent many problems related to conversions between degrees and radians. Furthermore it only supports operations which preserve the angle's dimension (under the assumption it is not dimensionless) allowing the compiler to detect misuses in equations. By not manually converting between degrees and radians everywhere in your program you can even gain some extra speed efficiency.

Where ever you deal with angles (regardless if class members or function arguments) always use fangle/dangle and let it deal with the calculations necessary for radians/degrees conversions. Never again use a plain `float` in interfaces to represent angles or worry about these nuisances.

The angle types should be no bigger than the datatype used for representation (if they are complain to your compiler vendor), are as efficient in copy and assignment operations as a native float or double, and can be safely passed by-value without fear of performance problems.
2015-05-11 18:02:55 +02:00
Christophe Riccio
042270d049 Added 'fmod' overload to GTX_common with tests, Removed integer specification for 'mod' in GTC_integer #308 2015-02-15 12:38:23 +01:00
Christophe Riccio
4eec569f92 Disabled GTX_scalar_multiplication for GCC, failing to build tests #242 2015-01-10 13:45:41 +01:00
Christophe Riccio
fc8b4404f0 Fixed faceforward build #289 2014-12-19 23:54:25 +01:00
Christophe Riccio
4340f3fa6f Fixed C++ language restriction using GLM_FORCE_CXX** 2014-12-10 21:29:41 +01:00
Christophe Riccio
c556770a32 Fixed C++98 only build 2014-12-10 02:52:30 +01:00
Christophe Riccio
a42f84ed47 Removed GLM_TEST_ENABLE_PERF 2014-11-29 20:46:58 +01:00
Christophe Riccio
3f48ffefb0 Updated license 2014-11-26 00:27:12 +01:00
Christophe Riccio
c20df07879 Updated license 2014-11-25 22:25:24 +01:00
Christophe Riccio
97182990a7 Move GTC_type_aligned to GTX extensions 2014-11-23 21:00:17 +01:00
Christophe Riccio
7621a735a3 Move GTC_type_aligned to GTX extensions 2014-11-23 20:58:09 +01:00
Christophe Riccio
9c65087f90 Fixed build on VC2010 2014-11-16 01:13:01 +01:00
Christophe Riccio
b90c4c430e Added GLM_HAS_TRIVIAL_QUERIES define 2014-11-15 21:59:46 +01:00
Christophe Riccio
5960196ce8 Clean up white spaces, fix build with VC15 2014-11-15 20:36:53 +01:00
Christophe Riccio
3716995414 Fixed white spaces 2014-11-15 00:56:14 +01:00
Christophe Riccio
141c1856a7 Removed <iostream> in GLM tests, use <cstdio> instead 2014-11-15 00:49:12 +01:00
Christophe Riccio
d606eaf2da Clean up white spaces 2014-11-15 00:32:40 +01:00
Christophe Riccio
191dbe92dc Added dualquat trivially copyable test. #263 2014-11-15 00:30:28 +01:00
Christophe Riccio
0b8ca1a5b6 Added a CMake option to execute GLM performance tests. Made quat and dualquat trivially constructible #263 2014-11-15 00:05:52 +01:00
Christophe Riccio
b7b8b18f83 performance test for fast_trigonometry #265 2014-11-14 21:36:59 +01:00
Mathias Labeyrie
b3bdf83bd8 rename some vars 2014-11-05 15:24:47 +01:00
Mathias Labeyrie
ef1c33d2d5 test perf fastAtan 2014-11-05 15:20:53 +01:00
Mathias Labeyrie
a7b3fca0b2 test perf fastAsin 2014-11-05 15:06:07 +01:00
Mathias Labeyrie
43387c81de test perf fastAcos 2014-11-05 15:05:33 +01:00
Mathias Labeyrie
c4b5fa2a93 test perf fastTan 2014-11-05 15:02:26 +01:00
Mathias Labeyrie
74cfc7451a test perf fastSin 2014-11-05 15:02:17 +01:00
Mathias Labeyrie
183c7141e2 performance test for glm::fastCos 2014-11-05 14:44:51 +01:00
Christophe Riccio
41c00872a1 Fixed GCC build 2014-11-01 23:35:10 +01:00
Christophe Riccio
d3b368b65c Added GTC_integer, deprecated GTX_bit 2014-10-26 19:22:19 +01:00
Christophe Riccio
eaa3b72b99 Added isPowerOfTwo tests 2014-10-26 17:43:54 +01:00
Christophe Riccio
8dd3ec02ea Removed bitRevert, duplicated of bitfieldReverse 2014-10-26 16:56:31 +01:00
Christophe Riccio
087d6292e3 Added GTC_bitfield extension, promoted GTX_bit 2014-10-26 00:22:08 +02:00
Christophe Riccio
0c522117c8 Opimization of mask, bitfieldInsert, bitfieldExtract and bitCount 2014-10-25 21:16:49 +02:00
Christophe Riccio
4fc68ffe49 Replace function instanciations with macros by templates 2014-10-20 03:26:59 +02:00
Christophe Riccio
c2d542562e Fixed GLM_FORCE_SIZE_FUNC support overlook #245. Added uninitiallized constructor to quaternion. Fixed lack of conscistency or quaternion constructors with other types. Various uninitilized constructor optimizations 2014-10-12 01:24:28 +02:00
Christophe Riccio
75939a7960 Fixed GTX_string_cast to support for integer types #249 2014-10-10 01:21:04 +02:00
Christophe Riccio
f9484a6e9f - Moved template types from 'detail' to 'glm' namespace #239, #244 2014-10-05 19:37:07 +02:00
Christophe Riccio
7ab7d4beb8 Merge pull request #240 from Jaxan/range
Range support #240
2014-10-05 14:24:19 +02:00
Christophe Riccio
a00fc3fdf4 Enable only GLM_GTX_scalar_multiplication for C++11 compiler #242 2014-10-05 13:26:02 +02:00
Joshua Moerman
62ac07815c Adds scalar multiplication for all types 2014-09-22 10:03:18 +02:00
Joshua Moerman
77c704e210 Adds range support 2014-09-19 16:27:23 +02:00
Christophe Riccio
46e61b4f07 Added test for fastSin #231 2014-09-16 01:35:29 +02:00
Christophe Riccio
ec513f4466 Added GTX_common with isdenomal #223 2014-09-07 20:53:35 +02:00
Christophe Riccio
ac3c2e37f1 Rely on STL functions for GLM functions using the same prototype #233 2014-09-06 01:45:13 +02:00
Christophe Riccio
eabeb0471b Merge branch '0.9.6' 2014-08-31 18:37:14 -04:00
Christophe Riccio
67c62d8b1c Merge branch '0.9.6' of https://github.com/g-truc/glm into 0.9.6 2014-08-31 18:12:53 -04:00
Christophe Riccio
3b7aadc2e3 Added initial commit for GLM_GTX_matrix_decompose #227 2014-08-31 18:12:38 -04:00
Christophe Riccio
2b747cbbad Removed last references to GLM_FORCE_RADIANS 2014-08-04 00:10:12 +02:00
Christophe Riccio
7fe8a1944c Fixed fastDistance ambiguity #215 2014-06-20 01:09:50 +02:00
Christophe Riccio
c440b9515a Merge io for GLM types #144 2014-06-15 22:52:23 +02:00