Vladimír Vondruš
ba0f56fa51
No need to use Double type in tests so extensively.
...
Makes porting to OpenGL ES easier.
13 years ago
Vladimír Vondruš
b28261d269
Math: fix compilation of tests with OpenGL ES.
...
Double precision is not supported there, mention that for skipped test
cases.
13 years ago
Vladimír Vondruš
be5c872c8a
Math: fixed two typos in the test.
...
They resulted in fact that the test case didn't actually test anything.
Spotted by Clang.
13 years ago
Vladimír Vondruš
999b7d55c0
GCC 4.6 compatibility: no delegating constructors.
...
Don't know why the corresponding conversion operator can't be constexpr.
13 years ago
Vladimír Vondruš
ba105b1cf6
Math: test constexpr vector conversion.
13 years ago
Vladimír Vondruš
7b140db3ed
Properly test swizzle() constexpr.
...
Removed constExpressions() test case and merged it to others, reducing
duplicate code.
13 years ago
Vladimír Vondruš
f4f44d9d90
Math: allow creating DualComplex/DualQuaternion from real part only.
...
Useful when creating transformation from rotation only.
13 years ago
Vladimír Vondruš
4744b631bb
Math: test pow() constexpr.
13 years ago
Vladimír Vondruš
7cb79b145e
Math: test Constants constexpr.
13 years ago
Vladimír Vondruš
b28b90a9df
Math: merged constExpressions() test cases into other test cases.
...
Simplifies the code and reduces duplicates.
13 years ago
Vladimír Vondruš
3e0e91d7db
Math: renamed {rotationAngle, rotationAxis}() -> {rotation, angle, axis}().
...
DualQuaternion and DualComplex has now only rotation() which returns
full rotation part, rotationAngle() and rotationAxis() on Quaternion and
Complex were renamed to angle() and axis().
13 years ago
Vladimír Vondruš
b00554fd7f
Math: added convenience {Quaternion,DualQuaternion}::isNormalized().
13 years ago
Vladimír Vondruš
1790f37295
Math: added convenience functions {Complex,DualComplex}::isNormalized().
13 years ago
Vladimír Vondruš
3db2aa13c4
Math: added convenience function Vector::isNormalized().
13 years ago
Vladimír Vondruš
da93b2ad6a
Math: ability to create Quaternion and DualQuaternion from matrix.
13 years ago
Vladimír Vondruš
9128820e35
Math: ability to create Complex and DualComplex from matrix.
13 years ago
Vladimír Vondruš
33058aa5b0
Math: Matrix::invertedOrthogonal(), Matrix{3,4}::invertedRigid().
...
Renamed original invertedEuclidean() functions to invertedRigid() and
simplified them using isRigidTransformation().
13 years ago
Vladimír Vondruš
dfe2571047
Math: added Matrix{3,4}::isRigidTransformation().
13 years ago
Vladimír Vondruš
4714cafedc
Math: added Matrix::isOrthogonal().
13 years ago
Vladimír Vondruš
408f40a908
Math: renamed MathTypeTraits to TypeTraits.
...
As there is no Magnum::TypeTraits struct anymore, there is no need to
have redundant name in it. Hopefully Doxygen will handle the difference
between this and Corrade's TypeTraits.h properly.
13 years ago
Vladimír Vondruš
75d8fefdde
Math: ability to access also matrix row vectors.
13 years ago
Vladimír Vondruš
a0b83edd2b
Relicensing to MIT/Expat license, part 4: CMake and documentation files.
...
They didn't contain license header before, but I think adding it also
there wouldn't do any harm. Documentation is also integral part of the
codebase.
13 years ago
Vladimír Vondruš
c5ab86794b
Relicensing to MIT/Expat license, part 3: source files.
...
Added license header also to shader sources. Hopefully it won't harm
compilation times too much.
13 years ago
Vladimír Vondruš
90a60ce7e9
Math: disable denormalize() test for UnsignedLong.
...
It works with GCC and -O3, but fails on unoptimized code.
13 years ago
Vladimír Vondruš
297d102200
Math: ability to convert Vector types from/to external types.
13 years ago
Vladimír Vondruš
231f3277ab
Adapted to Corrade changes.
...
Allowing to instantiate Trade::AbstractImporter subclasses directly
without plugin manager.
13 years ago
Vladimír Vondruš
677aa8485e
Math: properly test constexpr in all Matrix classes.
...
* Merged constExpressions() into other test cases, reducing duplicates
and simplifying the checks.
* Fixed old-and-forgotten operator[] overload in Matrix subclasses, it
was reinterpret_cast on T* array, it is now sufficient to do only
static_cast. Constexpr operator[] overload returns const copy to make
constexpr operations working even on returned value, e.g.:
constexpr Matrix4 a;
constexpr Vector3 b = a[2].xyz();
13 years ago
Vladimír Vondruš
fc538c3a57
Math: properly test constexpr in all Vector classes.
...
* Merged constExpressions() into other test cases, simplified the test
a lot and removing duplicate code.
* Fixed Vector3::xy(), Vector3::xy() and Vector3::xyz() constexpr
overloads, they now return copy instead of reinterpret_cast
reference. The copy is const to make constexpr operations working
even on returned subclass, e.g.:
constexpr Vector4 a;
constexpr Float b = a.xyz().y();
13 years ago
Vladimír Vondruš
99062ed248
GCC 4.6 compatibility: no delegating ctr in Math::RectangularMatrix.
13 years ago
Vladimír Vondruš
deb54fc92f
GCC 4.6 compatibility: no inheriting constructors in Math::Vector.
13 years ago
Vladimír Vondruš
0e34eeda58
GCC 4.6 compatibility: no delegating constructors in Math::BoolVector.
13 years ago
Vladimír Vondruš
2cdb159cbd
GCC 4.6 compatibility: no user-defined literals.
13 years ago
Vladimír Vondruš
6a90b0231b
Math: using new aliases for builtin types in whole Math namespace.
13 years ago
Vladimír Vondruš
5ff0e29950
Math: fix warning about literal types in normalize().
...
C++11 changed type of character literal (i.e. '\x7F') from int to char,
thus the documentation is wrong (also mistakenly used octal literal).
Added test to properly test the behavior.
13 years ago
Vladimír Vondruš
14460cf0f4
Math: renamed *::matrix() to ::toMatrix().
...
It better visualizes the fact that neither (Dual)Complex nor
(Dual)Quaternion contains the matrix inside them, but performs (possibly
costly) conversion.
13 years ago
Vladimír Vondruš
a0af6856c7
Math: transforming points with DualComplex.
13 years ago
Vladimír Vondruš
268c07acc5
Math: converting DualComplex to matrix.
13 years ago
Vladimír Vondruš
8e562316e8
Math: creating DualComplex from Vector2.
13 years ago
Vladimír Vondruš
7aac5bd70b
Math: no need for Complex::transformVectorNormalized().
...
Unlike quaternions it doesn't need inversion or normalization for
transforming vectors.
13 years ago
Vladimír Vondruš
90f5a006c4
Math: reworked DualComplex to actually work.
...
The tests now pass and it works similarly to transformation matrix
multiplication/inversion in 2D, but it hasn't any connection to dual
numbers anymore.
13 years ago
Vladimír Vondruš
8ff9118275
Math: test DualComplex transformation combination.
...
Also fails.
13 years ago
Vladimír Vondruš
5e2f8db651
Math: test also that DualComplex transformations are normalized.
...
Fails for translation.
13 years ago
Vladimír Vondruš
c019dc7781
Math: test that transformation (dual) complex/quat is normalized.
13 years ago
Vladimír Vondruš
bdc02ddd19
Math: translation dual complex number.
13 years ago
Vladimír Vondruš
1a5e18564e
Math: rotation dual complex number.
13 years ago
Vladimír Vondruš
fbac6662fa
Math: inversion of DualComplex.
13 years ago
Vladimír Vondruš
d7bfd91398
Math: length and normalization of DualComplex.
13 years ago
Vladimír Vondruš
f6d1a158f8
Math: initial implementation of dual complex numbers.
13 years ago
Vladimír Vondruš
e522293c22
Math: forgot to test DualQuaternion::invertedNormalized().
13 years ago
Vladimír Vondruš
c847e1551f
Math: "dot product" of Complex is real number.
...
Brain failure #2 . Also I don't know if such thing as dot product exists
here :-)
13 years ago