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š
5f19343bee
Math: linear interpolation of two Vectors.
14 years ago
Vladimír Vondruš
f06b53724c
Math: spherical linear Quaternion interpolation.
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š
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š
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š
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š
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š
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š
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
Vladimír Vondruš
c319962d6e
Adapted to Corrade changes.
14 years ago
Vladimír Vondruš
ae013effff
Adapted to Corrade changes.
...
Optimalizations in Corrade::TestSuite and Corrade::Utility::Debug leaded
to significant reduction of compilation time - on my machine it was
~5:38 before with building of unit tests enabled, now only ~5:00.
14 years ago
Vladimír Vondruš
12817b505d
Test vector component accessors.
...
Really. To be sure. Forever.
14 years ago
Vladimír Vondruš
a9d2062efe
More checks for sanity of Matrix4::rotation().
...
These should be true for all rotation matrices.
14 years ago
Vladimír Vondruš
6dbdf58476
Component-wise comparison for Vector class.
14 years ago
Vladimír Vondruš
f184c6f005
Using real class for testing configuration value parsing.
14 years ago
Vladimír Vondruš
6dda7e4c1f
Convenience functions for accessing Matrix[34] vectors.
14 years ago
Vladimír Vondruš
1e2720eeb7
Explicit template instantiation for common matrix and vector functions.
...
Common types used in OpenGL have now explicit template instantiation for
debug operators and configuration value parsers/readers.
14 years ago
Vladimír Vondruš
b5fc786478
Renamed Matrix4::[xyz]Rotation() to Matrix4::rotation[XYZ]().
...
* "Rotation around [XYZ]" makes more sense than "[XYZ] axis rotation".
* This naming will appear in autocompletion.
* SceneGraph transformation methods will be named similarly
rotate[XYZ]() (because [xyz]Rotate() is weird even more).
14 years ago
Vladimír Vondruš
f707e91599
Better parameter names in Matrix transformation methods.
...
Mainly it is now explicitly stated in parameter name that rotation axis
must be normalized.
14 years ago
Vladimír Vondruš
c1cf94fb46
Using fixed-size integer types also everywhere else.
...
It solves issues with int/long int/long long int ambiguity, which is
good.
14 years ago
Vladimír Vondruš
ecad221a8b
Faster alternatives for rotation around main axes.
14 years ago
Vladimír Vondruš
93961aca65
Don't include Matrix3 in Matrix4, as it isn't used.
...
Also updated includes in dependent headers.
14 years ago
Vladimír Vondruš
fb70ef046a
Functions for getting translation part of the matrix.
14 years ago
Vladimír Vondruš
71784a777c
Functions for getting 2D rotation and scaling part of 3x3 matrix.
...
Crosslinked the documentation with 2D/3D alternatives and
"setters"/"getters".
14 years ago
Vladimír Vondruš
a385441c02
Moved type conversion constructor from Vector to RectangularMatrix.
14 years ago
Vladimír Vondruš
03f135e696
Documentation clarification, assertion update.
...
Don't yell at the user all the time.
14 years ago
Vladimír Vondruš
7c17871c90
Assuming the vectors are normalized in Matrix4::rotation().
14 years ago
Vladimír Vondruš
071afa0b7a
Point*D Vector* subclasses for homogeneous coordinates.
...
Vector4 doesn't set W component to one by default anymore, this is now
handled by Point*D itself. This finally allows creating of 2D primitives
and 2D position vectors without messing explicitly with Z = 1.
All classes which should use Point instead of Vector were updated to use
Point instead.
14 years ago
Vladimír Vondruš
eb803200d6
Disabled denormalization test for long double altogether.
...
Fails in Debug, but passes in Release mode on my GCC 4.7 @ x86_64. Not
sure what to do about it.
14 years ago
Vladimír Vondruš
3d77885555
Revert "Overflow test for large types in Math::normalize() started working."
...
It was working because of some weird state of my build dir, expecting
fail again.
This reverts commit 75d0505a60 .
14 years ago
Vladimír Vondruš
75d0505a60
Overflow test for large types in Math::normalize() started working.
...
I don't know what caused that... :-)
14 years ago
Vladimír Vondruš
fe62f547de
Reduced #includes in headers.
...
Magnum.h now doesn't include anything except OpenGL headers, thus
changes in Math library don't trigger recompilation of everything, but
only of things really depending on it.
Math constants moved to separate file for similar reasons, de-inlined
some functions to remove the need for some #includes.
14 years ago
Vladimír Vondruš
742a75277d
Moved unary operator- from Vector to RectangularMatrix.
14 years ago