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š
19e0e96d74
Updated copyright year.
6 years ago
Vladimír Vondruš
65a2ced2a7
Make this compile and test cleanly with CORRADE_NO_ASSERT defined.
6 years ago
Vladimír Vondruš
3626562e1d
Adapted to Corrade changes.
...
Mostly missing includes now.
7 years ago
Vladimír Vondruš
2149f7b869
Wrap all tests in unnamed namespaces.
...
This makes the compiler warn about test cases that aren't ever used,
which is a good thing.
7 years ago
Vladimír Vondruš
e6b7aa12fa
Updated copyright year.
7 years ago
Vladimír Vondruš
0cf65741ae
Math: helpfully print the offending values in all assertions.
8 years ago
Vladimír Vondruš
fe10dbece8
Math: use plane equation in Intersection::planeLine().
...
The old overload taking a separate "position" and normal is a deprecated
alias, passing a calculated plane equation to the new one.
8 years ago
Vladimír Vondruš
5d60f0d350
Math: moved Geometry::Distance and Intersection directly into Math.
...
Too deep nesting, too much typing. Colon cancer. Fully preserving
backwards compatibility, except for the recently added cone/frustum
intersection functions, which were not in master yet.
8 years ago
Vladimír Vondruš
915d0f0600
Math/Geometry: this test passes only on non-optimized Emscripten builds.
...
And there's no way to detect that, so doing this ugly thing.
8 years ago
Vladimír Vondruš
8292ac9a3e
Math/Geometry: added a missing test case.
8 years ago
Vladimír Vondruš
be3dcc6fa0
Math/Geometry: improve assertion message.
8 years ago
Vladimír Vondruš
a77b08471e
Math/Geometry: various cleanup.
...
Spacing, indentation, overly wide lines, some const etc. Minor stuff,
except for renaming function arguments for consistency. That affects
everything.
8 years ago
Squareys
04ca48ce64
Math: Add and improve intersection methods
...
Signed-off-by: Squareys <squareys@googlemail.com>
8 years ago
Vladimír Vondruš
623fa97970
Updated copyright year.
8 years ago
Vladimír Vondruš
7a16273e5d
Updated copyright year.
9 years ago
Vladimír Vondruš
b7eb367dde
Math: cleanup, code compression.
10 years ago
Squareys
1f995d1ab2
Math: Add Distance::pointPlane* and two frustum intersection functions
...
`Intersection::pointFrustum` and `Intersection::boxFrustum`
Signed-off-by: Squareys <Squareys@googlemail.com>
10 years ago
Vladimír Vondruš
23646e6690
Hell, this project is big.
10 years ago
Vladimír Vondruš
c71dc12503
Making test declarations more compact.
...
Yet again I experienced how insanely large this thing got over the
years.
11 years ago
Vladimír Vondruš
6488fe6e75
Oh, it's 2015 already.
11 years ago
Vladimír Vondruš
c56940993b
Use the new math constants throughout the code.
12 years ago
Vladimír Vondruš
6f0ba96cb6
Happy new year too.
12 years ago
Vladimír Vondruš
0616f24f34
Making includes absolute, part 5: absolute includes everywhere.
...
The only places where they aren't absolute are:
- when header is included from corresponding source file
- when including headers which are not part of final installation (e.g.
test-specific configuration, headers from Implementation/)
12 years ago
Vladimír Vondruš
8c2291aa49
Making includes absolute, part 4: using absolute includes for Corrade.
...
Also adapted to some Corrade renames.
12 years ago
Vladimír Vondruš
45a10cefdf
Making includes absolute, part 1: moving files around.
...
Everything what was in src/ is now in src/Corrade, everything from
src/Plugins is now in src/MagnumPlugins, everything from external/ is in
src/MagnumExternal. Added new CMakeLists.txt file and updated the other
ones for the moves, no other change was made. If MAGNUM_BUILD_DEPRECATED
is set, everything compiles and installs like previously except for the
plugins, which are now in MagnumPlugins and not in Magnum/Plugins.
12 years ago
Vladimír Vondruš
3f696533ff
Math: algorithm for computing intersection of two lines in 2D.
13 years ago
Vladimír Vondruš
6385ae1478
Math: more Intersection test cleanup.
13 years ago
Vladimír Vondruš
fd531b5101
Math: cleaned up plane/line intersection.
...
The function now accepts starting point and direction of the line (not
starting and ending point). Also improved the documentation and test a
bit.
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š
231f3277ab
Adapted to Corrade changes.
...
Allowing to instantiate Trade::AbstractImporter subclasses directly
without plugin manager.
13 years ago
Vladimír Vondruš
6a90b0231b
Math: using new aliases for builtin types in whole Math namespace.
13 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š
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š
27e1dce533
Got rid of Qt's QtTest in favor of Corrade's TestSuite.
...
Now we can use CORRADE_COMPARE() almost exclusively for comparing
Vector, Matrix instances and all containers from STL. Tests running time
for all 31 tests is now around 0.1 sec instead of two seconds like
before.
Disabled compilation of all benchmarks, because TestSuite cannot handle
them yet.
PKGBUILD from AUR now can shamelessly use check() function without
unnecessary dependencies.
14 years ago
Vladimír Vondruš
1825d26c72
Fixed serious error in Intersection::planeLine().
...
The unit test was so weak that this parenthesis error wasn't spotted
until now. Updated the unit test to don't accept the previous code and
also floats everywhere instead of ints.
14 years ago
Vladimír Vondruš
6f94d84b1a
Moved Math::GeometryUtils to Math::Geometry::Intersection.
...
The namespace will contain classes (and functions) for computing
intersections, distances, areas and volumes.
14 years ago
Vladimír Vondruš
e921194601
Simplified GeometryUtils::intersection(), updated documentation.
...
The function now takes only plane normal and position instead of three
points. Also greatly simplified unit test.
14 years ago
Vladimír Vondruš
8761e1f636
Using "initializer-list" constructors for Matrix everywhere.
14 years ago
Vladimír Vondruš
b945f5f68b
Happy New Year.
15 years ago
Vladimír Vondruš
32a7f6d082
New class Math::GeometryUtils.
...
GeometryUtils::intersection() computes intersection of a plane and a
line.
15 years ago