Vladimír Vondruš
122b1f3bbd
Require HarfBuzz in FindMagnum.cmake only if it was compiled with it.
13 years ago
Vladimír Vondruš
8e3005d625
Updated FindGLEW.cmake, fixed Windows support.
...
On Win it needs both *.dll and *.lib to be successfully linked,
currently the variables must be set manually.
13 years ago
Vladimír Vondruš
b38ec8152b
Text: ability to compile the library without HarfBuzz support.
...
The text will be rendered without all the nifty features like kerning
and it will most probably fail on everything non-latin, but HarfBuzz is
currently PITA on some systems.
HarfBuzz usage can be configured using USE_HARFBUZZ CMake option.
13 years ago
Vladimír Vondruš
1cf2087817
Text: code cleanup -- merged two loops into one.
13 years ago
Vladimír Vondruš
92fb224380
Partially revert "Work-around preprocessor issues on Windows."
...
Commit 99be617278 moved the #undef from
SceneGraph/Camera3D.h to Math/Matrix4.h, but it seems that it needs to
be in both places.
13 years ago
Vladimír Vondruš
3cbeb43078
Cleaned up includes.
13 years ago
Vladimír Vondruš
027df55637
Platform: doc++
13 years ago
Vladimír Vondruš
0e5b676e27
Text: don't use HarfBuzz ICU functions.
...
Apparently not needed at all.
13 years ago
Vladimír Vondruš
d8629fee09
Platform: don't allow SDL2 to redefine main().
13 years ago
Vladimír Vondruš
c0a5e5dadd
Math: added sin(), cos() and tan() accepting either Rad or Deg.
13 years ago
Vladimír Vondruš
0dfa00b24d
Math: minor code cleanup.
13 years ago
Vladimír Vondruš
3ccc6a794e
Math: removed old deg()/rad() helpers.
13 years ago
Vladimír Vondruš
a220289067
Using Deg for Color hue.
13 years ago
Vladimír Vondruš
c293630c7c
Math: using Rad for Quaternion and DualQuaternion functions.
13 years ago
Vladimír Vondruš
d16a6259b8
Math: using Rad for Matrix4::perspectiveProjection().
...
Also updated dependent functions and tests.
13 years ago
Vladimír Vondruš
830ce69da0
Math: using Rad in Matrix*::rotation*().
...
Also updated dependent functions and tests.
13 years ago
Vladimír Vondruš
1d40254676
Math: use Rad for Vector::angle().
13 years ago
Vladimír Vondruš
a3924c9176
Brought Math::Deg/Rad and related operators to Magnum namespace.
13 years ago
Vladimír Vondruš
ff929c04e9
Math: type-safe implementation for degrees and radians.
...
Next few commits will add requirement for "strongly typed" angles in all
function parameters, e.g.:
Matrix3::rotation(24.0_degf);
Math::sin(1.047_radf);
The purpose is to make angle entering less error-prone, e.g. not passing
degrees when radians should be etc.
13 years ago
Vladimír Vondruš
f1e3453517
Math: base class for units.
13 years ago
Vladimír Vondruš
687bd37b81
Math: initial complex number implementation.
13 years ago
Vladimír Vondruš
b32594c363
Explicitly link MagnumMathTestLib to Corrade's Utility library.
...
Would be linked later along TestSuite, but the linker complained now.
13 years ago
Vladimír Vondruš
4e331cabbb
Fix linker issues on Windows.
...
MagnumSceneGraphTestLib didn't have MagnumSceneGraph[Objects]_EXPORT
defined, thus failing at link time, similar issue with
MagnumMeshToolsTestLib.
13 years ago
Vladimír Vondruš
99be617278
Work-around preprocessor issues on Windows.
...
I hate windows.h.
13 years ago
Vladimír Vondruš
e94a596a80
Math: code cleanup, doc++
13 years ago
Vladimír Vondruš
9cb0b77d1e
Math: added underlying type typedef for remaining types.
...
Also updated and unified documentation.
13 years ago
Vladimír Vondruš
5b1463fa0c
Math: test constexpr methods on DualQuaternion.
13 years ago
Vladimír Vondruš
dccfc1f8ba
Math: test constexpr methods on Quaternion.
13 years ago
Vladimír Vondruš
184bf38fc1
Math: test constexpr methods on Dual.
13 years ago
Vladimír Vondruš
e2591253ae
Math: test constexpr swizzle().
13 years ago
Vladimír Vondruš
c00f081b83
Using larger font in Doxygen documentation formulas.
13 years ago
Vladimír Vondruš
227517ff89
Math: added DualQuaternion::transformPoint().
13 years ago
Vladimír Vondruš
7e0d8d119f
Math: ability to normalize DualQuaternion.
...
Also hope that this is proper implementation.
13 years ago
Vladimír Vondruš
12c786c408
Math: renamed DualQuaternion::norm() to length(), added lengthSquared().
...
Hopefully this is properly implemented and properly named. On the other
hand, having length everywhere (vectors, quaternions, complex numbers)
and norm only at one place is inconsistent.
13 years ago
Vladimír Vondruš
f1da7a08b4
Math: added sqrt() overload for Dual.
13 years ago
Vladimír Vondruš
fec6822187
Math: added sqrt() scalar/vector overload.
13 years ago
Vladimír Vondruš
83346ce023
Math: converting DualQuaternion to matrix.
...
Also updated and simplified Quaternion to matrix test.
13 years ago
Vladimír Vondruš
389e9194e0
Math: doc++
13 years ago
Vladimír Vondruš
07c0c4d845
Math: added tests for composed dual quaternion parts.
...
To be sure everything is implemented properly.
13 years ago
Vladimír Vondruš
a49bb0d718
Math: convenience functions for transforming vectors with matrices.
...
It's now possible to conveniently transform 2D vectors and points with
3x3 matrices and 3D vectors/points with 4x4 matrices. Previous most
low-level solution:
Matrix4 m;
Vector3 v;
Vector3 a = (m*Vector4(v, 1.0f)).xyz();
Vector4 b = (m*Vector4(v, 0.0f)).xyz();
Another, more generalized solution for points was with Point2D/Point3D,
adding a lot of confusion (what is that class and what does .vector()?):
Vector3 a = (m*Point3D(v)).vector();
And the worst solution was with generic 2D/3D code (WTF!):
auto a = (m*typename DimensionTraits::PointType(v)).vector();
Now it is just this, similar for both dimensions:
Vector3 a = m.transformPoint(v);
Vector3 b = m.transformVector(v);
Note that transformation three-component vectors with 3x3 matrices or
four-component vectors with 4x4 matrices is easy enough so it doesn't
need any special convenience functions whatsoever:
Vector3 c = m.rotation()*v;
13 years ago
Vladimír Vondruš
0f554a49f6
Math: convenience function to transform points with DualQuaternion.
13 years ago
Vladimír Vondruš
4697658ed2
Math: ability to also multiply Dual with Dual of another underlying type.
13 years ago
Vladimír Vondruš
0f130ad55d
Math: simplified Quaternion::rotateVector*() tests.
...
Comparing to Matrix4 transformation.
13 years ago
Vladimír Vondruš
03ae82b448
Math: creating DualQuaternion from vector.
13 years ago
Vladimír Vondruš
5673cf2656
Math: better documentation for vector/quat constructors.
13 years ago
Vladimír Vondruš
3ad264893e
Math: creating rotation and translation DualQuaternion.
13 years ago
Vladimír Vondruš
4c1608378a
Math: document that Quaternion::rotationAxis() might return NaN vector.
13 years ago
Vladimír Vondruš
5615a4c7f6
Math: initial implementation of DualQuaternion class.
...
Currently practically unusable.
13 years ago
Vladimír Vondruš
6eeac71290
Math: Use default pure equality comparison for arbitrary types.
13 years ago
Vladimír Vondruš
2a25c6eafd
Math: return proper type from Dual operators in subclasses.
13 years ago