Vladimír Vondruš
0ed0f261b4
Math: matrix/vector rework, part 1: synchronized unit tests.
...
They now test the same functionality in two places, but the
functionality will be implemented differently for matrix and vector.
13 years ago
Vladimír Vondruš
b7b955289a
Math: Vector::lerp() can take `t` of arbitrary type.
...
Usable when interpolating e.g. colors in denormalized integral form, as
`t` could be only `0` or `1` in that case, which is pretty unusable.
13 years ago
Vladimír Vondruš
861e16e1f9
Doc++, @todo+-
13 years ago
Vladimír Vondruš
d175dd1054
Updated workarounds for Doxygen 1.8.2.
...
Removed workarounds for alias templates, variadic templates and
anonymous enums, but 1.8.2 has some bug with forward declarations
causing classes to appear in default namespace, breaking
cross-references.
13 years ago
Vladimír Vondruš
263d8351b6
Math: vector overloads for normalize() and denormalize().
13 years ago
Vladimír Vondruš
ec23a3d13c
Minor code cleanup.
13 years ago
Vladimír Vondruš
ad9a55a867
Doc++
13 years ago
Vladimír Vondruš
4d6d3fde88
Math: scalar/vector implementation of min(), max() and clamp().
...
This is gonna be some ugly template hell.
13 years ago
Vladimír Vondruš
ee5f8766af
Math: make type traits aware of long double.
13 years ago
Vladimír Vondruš
bdba6b7221
Math: no need to have two versions of denormalize(), they are the same.
...
Overlooked in cade175304 .
13 years ago
Vladimír Vondruš
3daefd70a9
Math: simplified internal pow<n>() implementation.
14 years ago
Vladimír Vondruš
03789a5b4b
Math: got rid of MathTypeTraits::NumericType.
...
Was workaround for printing chars with Corrade::Utility::Debug as
integers, not needed anymore.
14 years ago
Vladimír Vondruš
a4da7b764a
Adapted to Corrade changes.
14 years ago
Vladimír Vondruš
5ca096512e
Forward declaration header for Math namespace.
14 years ago
Vladimír Vondruš
cade175304
Math: finally implemented precise signed/unsigned normalization.
...
(De)normalization from/to [0, 1] for unsigned types and from/to [-1, 1]
for signed types. -1.0 is always denormalized to min+1.
Also updated some tests for Color, as they depended on previous
imprecise implementation.
14 years ago
Vladimír Vondruš
7dc0fc4a4c
Math: Renamed Math.h to Functions.h
...
Math.h is reserved for forward declaration header.
14 years ago
Vladimír Vondruš
7d0a523618
Moved projection matrix computation to Math namespace.
14 years ago
Vladimír Vondruš
52300cf402
Math: function for base-2 logarithm.
...
Verbatim copy from Corrade, might be better to have it here too
(possibly some SIMD optimizations?).
14 years ago
Vladimír Vondruš
7183110eee
Doc++, @todo++
14 years ago
Vladimír Vondruš
5f19343bee
Math: linear interpolation of two Vectors.
14 years ago
Vladimír Vondruš
1eef70b184
Doc++
14 years ago
Vladimír Vondruš
a4514e7acb
Brought Math::Quaternion<GLfloat> into Magnum namespace as Quaternion.
14 years ago
Vladimír Vondruš
c7d7fdad28
Math: removed done TODO.
14 years ago
Vladimír Vondruš
f06b53724c
Math: spherical linear Quaternion interpolation.
14 years ago
Vladimír Vondruš
538601fc06
Minor code cleanup.
14 years ago
Vladimír Vondruš
b9f21d1430
Removed unnecessary prefix from test filename.
...
My brain is lagging behind my keyboard.
14 years ago
Vladimír Vondruš
669a08daa5
Math: angle between two quaternions.
...
Also updated related Vector test.
14 years ago
Vladimír Vondruš
53a95b6296
Math: test also parameterless Quaternion::dot().
...
Just to be sure (and to be consistent with Vector test).
14 years ago
Vladimír Vondruš
23a94b2709
Math: Quaternion has dot product too!
...
Original lengthSquared() renamed to parameterless dot(), it is now
consistent with what Vector has. Also updated related Vector
documentation.
14 years ago
Vladimír Vondruš
ed147ebe40
Math: linear Quaternion interpolation.
14 years ago
Vladimír Vondruš
eaa819755f
Math: added Quaternion addition and subtraction.
14 years ago
Vladimír Vondruš
705bf3f597
Math: reverse scalar/quaternion multiplication and division operators.
...
Also updated related documentation in RectangularMatrix.
14 years ago
Vladimír Vondruš
eeed955154
Minor code cleanup.
14 years ago
Vladimír Vondruš
d9c900f076
Doc++
...
* Added math equations to Quaternion, Vector and Matrix method
documentation.
* Removed confusing Quat*=Quat operator overload, as it isn't exactly
clear from which side the non-commutative multiplication is done:
Quaternion a;
a *= b; // eh?
a = a*b; // okay!
For similar reason this operator wasn't present in RectangularMatrix
either.
* Unified documentation of expected vector/quaternion normalization
state. Now it is not "assumed" but "expected", because failing to do
so results in assertion failure.
14 years ago
Vladimír Vondruš
b55f3a2071
Math: function for negating Quaternion, improved tests.
14 years ago
Vladimír Vondruš
8e93520bd6
Math: converting Quaternion to rotation matrix.
14 years ago
Vladimír Vondruš
3b92d2b9f3
Math: creating Quaternion from axis/angle.
14 years ago
Vladimír Vondruš
3076c42663
Math: using absolute #includes in Quaternion.h.
14 years ago
Vladimír Vondruš
3126d0947d
Math: "checked" function for inverting normalized Quaternion.
14 years ago
Vladimír Vondruš
3b57d530a4
Math: test also properties of normalized Quaternion.
14 years ago
Vladimír Vondruš
c841c63b34
Doc++
14 years ago
Vladimír Vondruš
7ae00deee7
Math: removed constexpr from non-trivial Quaternion methods.
...
They will probably involve SIMD operations, which cannot be implemented
as constexpr.
14 years ago
Vladimír Vondruš
fcb8a7b768
Got rid of header files in tests.
...
They have no practical use and they only bloat codebase size and add
maintenance burden.
14 years ago
Vladimír Vondruš
89c2bf913c
Math: initial implementation of Quaternion class.
...
Still practically unusable.
14 years ago
Vladimír Vondruš
89f5200aae
Minor code cleanup.
14 years ago
Vladimír Vondruš
21337dafc0
Doc++
14 years ago
Vladimír Vondruš
e506951829
Math: functions for bottom right and top left Rectangle corners.
14 years ago
Vladimír Vondruš
a7a4c28c03
Math: ability to create Rectangle from other of arbitrary type.
14 years ago
Vladimír Vondruš
f9f848d94c
Math: ability to multiply and divide Vector with other of arbitrary type.
14 years ago
Vladimír Vondruš
7905a5e96c
Math: return proper type from Vector::projected() in subclasses.
14 years ago