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
Vladimír Vondruš
423beaebeb
Bring Math::Geometry::Rectangle to Magnum namespace.
14 years ago
Vladimír Vondruš
bc2f98266e
Math: debug output operator for Rectangle.
14 years ago
Vladimír Vondruš
c4b6e5ea33
Math: helper Rectangle class.
14 years ago
Vladimír Vondruš
4a6e0b6dfa
Math: Gram-Schmidt orthonormalization.
14 years ago
Vladimír Vondruš
5de5b34c48
Math: function for projecting vector onto another.
14 years ago
Vladimír Vondruš
d981090e86
Functions for inverting Euclidean transformation matrices.
14 years ago
Vladimír Vondruš
e9e0de70d7
Implemented reflection matrices.
...
Long-standing TODO, can be used for in-game mirrors etc. I give up with
shearing, as I think that it makes sense only in 2D and I can't find any
reasonable use case for that yet.
14 years ago
Vladimír Vondruš
6ae94bffd7
Ability to construct Matrix from rotation/scaling and translation parts.
14 years ago
Vladimír Vondruš
6e6e53886d
Removed dead code.
14 years ago
Vladimír Vondruš
7e66a09461
Marking all constructors explicit, except for matrix and vector classes.
...
It prevents unwanted implicit conversions from e.g. nullptr to Camera,
Vector2 to Physics::Point etc. By making all the constructors explicit
it is easier to routinely add the keyword to all new classes instead of
thinking about cases when to add and when not to.
14 years ago
Vladimír Vondruš
3b37dfa6b8
Deleted constructors of classes with only static members.
...
They shouldn't be instantiated, prevent mistakes with this.
14 years ago
Vladimír Vondruš
b70b2777b3
Using Math::swizzle() in Vector3::cross().
...
Inspired by http://stackoverflow.com/a/5150625 .
14 years ago
Vladimír Vondruš
ef779e50b2
Split out lightweight base of swizzle() function to Math namespace.
...
Will make use of SIMD instructions and can be used elsewhere in Math.
14 years ago
Vladimír Vondruš
47c0a7456c
Adapted to Corrade changes.
...
Removing of another <*stream> #include leads to more compilation time
saving, now from ~5:12 to ~4:55. Another compilation time improvements
will now be possible only by using Clang's modules, I don't know where
to optimize further (except for getting rid of <sstream> in tests).
14 years ago
Vladimír Vondruš
9ead1e9deb
Thorough documentation review and update.
...
Now whole Magnum, Magnum::SceneGraph and Magnum::Math namespaces are
fully documented -- each class has at least "getting started"
documentation, larger modules are documented on separate pages.
14 years ago
Vladimír Vondruš
0f889369f4
No `using namespace std` anywhere.
...
Also added missing std:: prefix to remaining cases of std::size_t,
std::[u]int[0-9]+_t, std::sin() etc., std::exit().
14 years ago