Vladimír Vondruš
fa079385bf
singles: don't include StrictWeakOrdering in MagnumMath.hpp.
3 years ago
Vladimír Vondruš
bbb54a9df8
It's 2023 already!
3 years ago
Vladimír Vondruš
0a32bce31b
Math: add unary operator+ to all types.
...
It was implemented only for the Half type and not the others, and I just
felt like using it on a vector now, 12 years after the Vector class got
first added.
4 years ago
Vladimír Vondruš
5312a016f4
Math: rename BoolVector to BitVector.
...
Because it somewhat confusingly may have implied that it's really
composed of 8-bit bools, and not bits. The same reasoning was used to
pick the name for Corrade's Containers::BitArray.
Backwards compatibility aliases are in place as usual, however the
internal BoolVectorConverter is now BitVectorConverter and there
unfortunately cannot be any backwards compatibility. This breaks only
GLM and Eigen integration in the magnum-integration repo, which I'm
fixing immediately. I don't expect any user code to use this internal
helper. For regular vectors maybe, for this one definitely not.
4 years ago
Vladimír Vondruš
d474f9d176
Math: return an array reference instead of a pointer from data().
...
This makes it possible to conveniently do things like
Containers::StridedArrayView1D<Float> array = …;
Vector4 vector{NoInit};
Utility::copy(array, vector); // or the other way around
which is especially useful together with the new JSON classes. In some
cases this means the function is no longer constexpr, but those weren't
constexpr because it was useful for anything, they were only because it
was possible. So this breakage shouldn't do any harm I think.
4 years ago
Vladimír Vondruš
5513eba398
Math: packed debug output for angles, matrices and vectors.
...
Not documenting this publicly as it has a certain smell (needs better
naming, mainly), but I need this for a less verbose output in certain
tools.
4 years ago
Vladimír Vondruš
822fa0d644
Updated copyright year.
4 years ago
Vladimír Vondruš
3cf4573c0e
Math: drop explicitly defaulted copy constructors.
...
These shouldn't be needed (the newer classes such as Half or
CubicHermite don't have them and work fine), moreover Clang 12 is now
emitting the following warning for them:
Definition of implicit copy assignment operator for 'Foo' is
deprecated because it has a user-declared copy constructor
[-Wdeprecated-copy]
5 years ago
Vladimír Vondruš
57ae596d88
Math: don't call into RectangularMatrix privates from Matrix.
...
Yes, it's one function call more this way, but it's cleaner and without
duplicated code that's prone to bugs.
5 years ago
Vladimír Vondruš
7072befbdb
Math: generalize slicing and expanding to arbitrarily-sized matrices.
...
Originally was done only for square matrices, but now I need that for
converting 3x3 -> 3x4 and back (UBO packing, ugh ugh), so let's
generalize.
5 years ago
Vladimír Vondruš
a347a2b3bd
Math: make it possible to create an identity RectangularMatrix as well.
5 years ago
Vladimír Vondruš
7413d2053f
Math: doc++
5 years ago
Vladimír Vondruš
3d136503d8
Updated copyright year.
5 years ago
Vladimír Vondruš
5a1f43f20b
Switch to the new & optimized GenerateSequence from Corrade.
...
This should help slightly with compiler memory usage, on GCC 10 the huge
Trade::MaterialData test used "only" 309 instead of 318 MB after this
change.
5 years ago
Vladimír Vondruš
1026aee80e
Moved the NoInit tag from Math to the root namespace.
...
The old one is deprecated, and will be removed in a future release.
Unfortunately, to avoid deprecation warnings, all use of NoInit in the
Math library temporarily have to be Magnum::NoInit This will be cleaned
up when the deprecated alias is removed.
6 years ago
Vladimír Vondruš
19e0e96d74
Updated copyright year.
6 years ago
Vladimír Vondruš
f74fd5cb08
Add typedefs for half-float and 8-/16-bit packed matrices.
6 years ago
Vladimír Vondruš
6fbedd8f52
Revert "doc: pile on more Doxygen workarounds."
...
This reverts commit 0b7831c1ad .
6 years ago
Vladimír Vondruš
0b7831c1ad
doc: pile on more Doxygen workarounds.
...
Sad! https://github.com/doxygen/doxygen/issues/7472
6 years ago
Vladimír Vondruš
b83c4366e7
Math: fix a build issue with CUDA on Windows.
7 years ago
Vladimír Vondruš
4b4b8efc1b
Math: doc++
...
Fixing Engrish while doing the Python bindings.
7 years ago
Vladimír Vondruš
3fb90cdf5c
Math: remove obsolete Doxygen workarounds.
7 years ago
Vladimír Vondruš
36ba5f4333
Math: ensure ZeroInit and IdentityInit constructors are explicit.
...
Like NoInit ones. Not sure what I was doing there.
7 years ago
Vladimír Vondruš
05b1cefda5
Math: avoid operator[] calls where possible (and not too verbose).
...
In debug builds (where nothing is inlined), this makes matrix
multiplication run in 33% of the time and matrix inversion roughly twice
as fast.
7 years ago
Vladimír Vondruš
cee530733e
Math: make it possible to opt out of Debug output operators.
...
Undocumented at this point, will be used for magnum-singles export.
7 years ago
Vladimír Vondruš
64bc7f9c8e
Math: moved configuration value parsers to a dedicated header.
...
There's a lot of string operations and that's nothing good to have
included everywhere. Should speed up the compilation quite a bit.
7 years ago
Vladimír Vondruš
5fc246b908
Math: compile forgotten code snippets.
7 years ago
Vladimír Vondruš
e6b7aa12fa
Updated copyright year.
7 years ago
Vladimír Vondruš
f5e30bb5d3
Math: minor coding style cleanup.
8 years ago
Borislav Stanimirov
f7f2ab8cb5
Math: added StrictWeakOrdering for math types
8 years ago
Vladimír Vondruš
eabe118266
Math: doc++
8 years ago
Vladimír Vondruš
105cef5efd
No need to use fully qualified name for \debugoperator.
8 years ago
Vladimír Vondruš
2136466f0f
Math: doc++, add search aliases for GLSL functions.
8 years ago
Vladimír Vondruš
623fa97970
Updated copyright year.
8 years ago
Vladimír Vondruš
05bb8b419a
Math: updates for the new documentation theme.
8 years ago
Criss
98f920527e
Math: get rid of needless GenerateReverseSequence utility.
9 years ago
Michael Dietschi
b12fe77910
Fix a possible OOB access when reading vector/matrix from configuration.
9 years ago
Vladimír Vondruš
7a16273e5d
Updated copyright year.
9 years ago
Vladimír Vondruš
ae9095de16
Remove most of the "MSVC 2015 can't handle {} here" workarounds.
9 years ago
Vladimír Vondruš
025ef780b2
Workaround for that one damn Doxygen bug.
9 years ago
Vladimír Vondruš
aa69bbcc19
Math: ability to create matrices with one value for all components.
...
In order to do that with the previous API, one had to write an
abomination like
auto a = Matrix4x4::fromVector(Math::Vector<16, Float>{0.5f});
Ugh.
9 years ago
Vladimír Vondruš
6e10b2e205
Math: doc++
...
The TODOs were removed and put into GitHub projects to be a bit more
visible to random strangers.
9 years ago
Vladimír Vondruš
61e511dbc4
Math: component-wise comparison for RectangularMatrix.
...
Required for TestSuite::Compare::Around.
9 years ago
Vladimír Vondruš
e5fd5b56f8
Math: document why RectangularMatrix::operator[] returns const&.
10 years ago
Vladimír Vondruš
32f357752f
Math: the world is not just about OpenGL.
10 years ago
Vladimír Vondruš
a3bcae928b
Doc++
10 years ago
Vladimír Vondruš
3764f5b830
Math: don't zero-initialize output variables if not necessary.
...
Could possibly save some cycles.
10 years ago
Vladimír Vondruš
9fdf467c59
Math: added *Matrix::setRow().
...
Row equivalent for the mutable operator[]().
10 years ago
Vladimír Vondruš
98735f50f4
Math: document the math behind 2D/3D matrix transformations.
10 years ago
Vladimír Vondruš
40d60f6a3f
Math: make all constructor noexcept and test their behavior.
10 years ago