Vladimír Vondruš
cedc0d6eeb
Prefer CORRADE_TARGET_* instead of __GNUC__, __clang__ and _MSVC_VER.
...
While branching on a compiler is rather common, checking a particular
compiler version should be needed only rarely. Thus minimize use of such
macros to make them easier to grep for.
4 years ago
Vladimír Vondruš
90b53798c2
doc: cross-link intersection and bounding volume calculation algos.
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š
505ad471ad
CMake: use the CMAKE_FOLDER variable instead of FOLDER property.
...
It limits the support for CMake 3.12+, but it's much less verbose and I
don't expect people to use ancient CMake versions with IDEs like Xcode
or VS anyway, so this should be fine.
4 years ago
Vladimír Vondruš
b0bfcbe00e
Adapt to Corrade changes.
4 years ago
Vladimír Vondruš
e779c0a3e7
Math: doc++
4 years ago
Vladimír Vondruš
8057051d9a
Document what each #include <algorithm> is for.
...
Or remove it, if not for anything anymore.
4 years ago
Vladimír Vondruš
9f65db2e2b
Math: use String::contains() instead of std::find().
...
An old TODO, yay!
4 years ago
Vladimír Vondruš
3b2ad338e2
Port from Utility::formatString() to Utility::format() where possible.
...
There's still many cases where the formatted string is compared to a
std::stringstream, there it doesn't make sense to switch.
4 years ago
Vladimír Vondruš
822fa0d644
Updated copyright year.
4 years ago
Vladimír Vondruš
d939221f7f
doc: refresh various math docs a bit.
4 years ago
Vladimír Vondruš
5c6b98391d
Math,DebugTools: adapt tests for Android differences in NaN printing.
...
What a waste of energy. I need my own float printing code already.
4 years ago
Vladimír Vondruš
e0ee451a1b
Math: XFAIL some packing tests for x86 Android.
...
Well, I can't tell if it's just 32-bit x86 Android, but it definitely
works well on my ARM64 device.
Also updated the defines to use the consistent CORRADE_TARGET_* macros
instead of the platform-specific mess.
4 years ago
Vladimír Vondruš
22d630db5f
Math: what's the deal with Emscripten and GLES(!)-specific ifdefs here?!
...
Especially the GLES define is some *really weird* leftover from the days
where GL was hardcoded everywhere. What the heck.
4 years ago
Vladimír Vondruš
7328fa9ab4
Math: remove obsolete comments in a test -- this is a static assert now.
4 years ago
Vladimír Vondruš
d9efea269a
Math: no need to pass scalars via a const&.
4 years ago
Vladimír Vondruš
d3430f7599
Math: fix a copypaste error with Frustumd debug output extern template.
4 years ago
Vladimír Vondruš
56a108c05b
Math: I forgot to finish this sentence back in 2016.
4 years ago
Vladimír Vondruš
c979d90a07
Math: we may have all the PI digits we need.
4 years ago
Vladimír Vondruš
fb51f25a7b
Math: workaround rounding errors in assert tests in latest GCC (glibc?).
...
Only in release. One of the number now had 6 at the end instead of 5.
Not my problem, so using a different angle to hopefully circumvent that.
4 years ago
Vladimír Vondruš
39d482cceb
Math: fix Clang "unused but set" warnings in benchmarks.
4 years ago
Vladimír Vondruš
ca8d429854
Math: doc++
...
Broken by 3cf4573c0e -- forgot to check
that docs build.
5 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š
31b2bfb980
Add typedefs for unsigned ranges.
...
Later, if it proves to be useful for e.g. the SceneData, it might make
sense to add 8- and 16-bit variants also.
5 years ago
Vladimír Vondruš
60d13f0fcb
Math: these sentences don't sound like they make any sense, no.
5 years ago
Vladimír Vondruš
304819435d
Math: no need to use a <string> in this test.
5 years ago
Vladimír Vondruš
6ce892f939
Math: doc++
5 years ago
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