Vladimír Vondruš
ff1b0ab307
Math: add off-center variants of 2D/3D orthographic projection as well.
...
Was just perspective projection right now.
5 years ago
Vladimír Vondruš
3697125c7d
Math: disallow reflections in {Complex,Quaternion}::fromMatrix().
...
And update docs in Matrix[34]::rotation() and related functions to note
this. This is a breaking change that may cause existing code to start
asserting.
5 years ago
Vladimír Vondruš
bd53b2ed1a
Math: doc++
5 years ago
Vladimír Vondruš
87d8b33dbe
Math: test QR and SVD with rotation and scaling instead of shear.
...
QR gives a reasonable result this time, SVD gives kinda the same thing
but with the actual rotation in U instead of V.
5 years ago
Vladimír Vondruš
e9f2101b15
Math: added Distance::pointPoint() and Intersection::pointSphere().
...
Those add nothing of value as they only wrap trivial code, but make the
operations easier to discover, and that's what matters.
5 years ago
Vladimír Vondruš
f9661fe402
Math: add castInto() variants for UnsignedLong/Long.
...
There's now 24 overloads for unsigned types and 24 for signed types,
which is all possible combinations. Not adding an ability to cast
between signed and unsigned as I'm not sure what should be done there.
5 years ago
Vladimír Vondruš
abda09298a
Math: haha std::pair you silly stupid thing.
5 years ago
Vladimír Vondruš
7d82352a13
Math: add an ability to construct a Range1D from Math::Vector<1, T>.
...
A Vector<1, T> is implicitly constructible from T but not vice versa (to
avoid nasty collisions with builtin operators on scalars) so this is
needed.
5 years ago
Vladimír Vondruš
3097c4c1f0
Math: class-level documentation for Matrix3 and Matrix4.
...
Another one that was long on my TODO list.
5 years ago
Squareys
e72a440720
Math: typo.
5 years ago
Vladimír Vondruš
120286a930
Add Degh, Radh and Range*Dh typedefs.
...
We have half-float vectors and matrices, so why not these as well. Not
sure for what all is the angle precision usable, but at the very least
it could be useful for compact meshlet occlusion cone / AABB
representation or rough animations.
5 years ago
Aaron Gokaslan
ca677c69fe
Fix typos
5 years ago
Vladimír Vondruš
dd3ce93888
Math: MSVC 2015, you ICEd.
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š
08a6e7d957
Math: explicit test that all types are trivially copyable.
...
I saw some copy constructors here and there and wasn't sure.
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š
2066d82ea4
Shaders: suffix all existing shaders with GL.
...
To make room for Vulkan shaders. Also renaming the headers, of course
everything is still aliased to the old names (and marked as deprecated).
5 years ago
Vladimír Vondruš
ec19c25e46
Adapt to Corrade changes.
5 years ago
Vladimír Vondruš
a7389cb950
Math: doc++
5 years ago
Vladimír Vondruš
f0f8dce559
Math: link relevant APIs in Quaternion multiply docs.
5 years ago
Vladimír Vondruš
ed9deff432
Test: adapt to a less shitty CORRADE_COMPARE().
5 years ago
Vladimír Vondruš
4dace92581
Math: add castInto() overloads for Float and Double.
5 years ago
Vladimír Vondruš
41b59d8176
Math: add [Unsigned]Byte/[Unsigned]Short variants of castInto().
5 years ago
Vladimír Vondruš
c0e8d4c00b
Math: make Range searchable under AABB.
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š
2fb56fe507
Math: accidentally used a float literal, causing warnings with Matrix3d.
5 years ago
Vladimír Vondruš
34a52e48ed
Math: link to the corresponding classic GL/GLU functions.
...
I was porting some PyOpenGL code and knowing how the ancient GL API maps
to Magnum helped tremendously.
5 years ago
Vladimír Vondruš
d2961f19f4
Test: use new TestSuite API to simplify things.
5 years ago
Vladimír Vondruš
55d7a1e6e0
doc: updated changelog and credits.
6 years ago
Vladimír Vondruš
dbc67a01ce
Math: reorder test to be in the same order as in the header.
6 years ago
Vladimír Vondruš
07ba09c700
Math: minor cleanup.
...
No need to use contractions, inverseRayDirection is okay because nobody
needs to type it anywhere. Also no need for the `ones` vector in the
test, Float/Vector3 works as well.
6 years ago
janos
6a0fdf2194
add ray range interection algorithm
6 years ago
Vladimír Vondruš
686b915bc3
Math: this test wasn't right.
...
Uncovered after the latest Emscripten-related update to
CORRADE_LONG_DOUBLE_SAME_AS_DOUBLE.
6 years ago
Vladimír Vondruš
ef7232e71d
Math: clean up obsolete test workflows.
6 years ago
Vladimír Vondruš
095408791f
Updated changelog and credits.
6 years ago
Squareys
f69f3393ec
Math: Add DualQuaternion/DualComplex::from(rotation, translation)
...
Signed-off-by: Squareys <squareys@googlemail.com>
6 years ago
Vladimír Vondruš
e6322dcfd1
Math: use angle literals in all test code.
...
It was originally done using the Deg() / Rad() constructors in order to
be compatible with GCC 4.6, but fortunately those days are long gone.
Co-authored-by: Squareys <squareys@googlemail.com>
6 years ago
Vladimír Vondruš
83d6509595
Math: adapt to changes to Tweakable internals.
6 years ago
Vladimír Vondruš
9de4717f0e
Math: add popcount().
6 years ago
Vladimír Vondruš
89e3067009
Math: hmm, why this isn't in the FunctionsBenchmark, then?
...
Probably because it predates it.
6 years ago
Vladimír Vondruš
1510d41c4b
Math: this is also wrongly grouped.
6 years ago
Vladimír Vondruš
8019b285bd
Math: put reflect() and refract() outside of irrelevant group.
...
Got overlooked when merging this contribution.
6 years ago
Vladimír Vondruš
553034da9e
Math: doc++
6 years ago
Vladimír Vondruš
d01364ca1f
Math: document more what's cross() good for.
6 years ago
Vladimír Vondruš
70336a6a98
Math: remove pointless Emscripten restrictions in TypeTraits.
...
Size of long double is now tested in Corrade itself, so no need for any
of this.
6 years ago
Vladimír Vondruš
f225497475
Math: assert valid binomialCoefficient() input instead of returning 0.
6 years ago
Vladimír Vondruš
53a26ad024
Math: use 64-bit literals in a test to be really really sure.
6 years ago