Vladimír Vondruš
ee1eecad1a
SceneGraph: wrong assertion.
...
It is easier to just skip the object than explicitly removing
duplicates (or worse, cleaning it more than once).
13 years ago
Vladimír Vondruš
f2df328fe2
Using Corrade's visibility macros instead of copypasta all over again.
13 years ago
Vladimír Vondruš
fac75962d0
SceneGraph: assert that original Object::setClean() is called.
13 years ago
Vladimír Vondruš
db85a02752
GCC 4.5 compatibility: no range-based for.
13 years ago
Vladimír Vondruš
218a4c142c
SceneGraph: fixed Object::setClean().
...
Now also all non-clean parent objects are cleaned.
13 years ago
Vladimír Vondruš
9ecb8b5b8d
SceneGraph: fully test also Object::setClean() for list of objects.
...
The test fails (it doesn't clean parent objects).
13 years ago
Vladimír Vondruš
d85c15bca9
SceneGraph: this was fixed in 59a3a7029d.
13 years ago
Vladimír Vondruš
c79327ee43
Option to build Magnum as static library.
...
And optionaly position-independent code. The tests now pass again, if
both Corrade and Magnum is static.
13 years ago
Vladimír Vondruš
23d51c9e36
GCC 4.5 compatibility: can't default some functions in class body.
13 years ago
Vladimír Vondruš
79e79eee7e
GCC 4.5 compatibility: no forward declarations for enums.
13 years ago
Vladimír Vondruš
38ec076eda
Minor code cleanup (unused parameters).
13 years ago
Vladimír Vondruš
a60f35a026
Fixed a few typos in docs (ahem).
13 years ago
Vladimír Vondruš
fe3a73aab2
SceneGraph: add DualQuaternionTransformation::rotate[XYZ]() overloads.
...
They only pass the arguments to original implementation but return
proper type to avoid weird issues with different method chaining order.
13 years ago
Vladimír Vondruš
b349eaf753
SceneGraph: new class DualQuaternionTransformation.
...
Uses dual quaternions for 3D transformation.
13 years ago
Vladimír Vondruš
85abf5767e
SceneGraph: new class DualComplexTransformation.
...
Uses dual complex numbers for 2D transformation.
13 years ago
Vladimír Vondruš
e9b3228943
SceneGraph: minor code cleanup.
13 years ago
Vladimír Vondruš
0d5f234f64
SceneGraph: public setTransformation() and transform() for RigidMT*D.
...
Now it is nearly similar to MatrixTransformation*D except for scaling.
Public functions setTransformation() and transform() assert that the
matrix represents rigid transformation.
13 years ago
Vladimír Vondruš
e4f14c4163
SceneGraph: assert proper matrix type in RigidMatrixTransformation*D.
13 years ago
Vladimír Vondruš
332e4cdb71
SceneGraph: added AbstractTransformation::resetTransformation().
...
It was doable in subclasses, but not via any interface, making some
things impossible.
13 years ago
Vladimír Vondruš
8548a2e08b
SceneGraph: renamed {Euclidean -> Rigid}MatrixTransformation{2,3}D.
...
It's shorter, following changes in Math (Matrix*::invertedRigid(),
Matrix*::isRigidTransformation()).
13 years ago
Vladimír Vondruš
33058aa5b0
Math: Matrix::invertedOrthogonal(), Matrix{3,4}::invertedRigid().
...
Renamed original invertedEuclidean() functions to invertedRigid() and
simplified them using isRigidTransformation().
13 years ago
Vladimír Vondruš
a0b83edd2b
Relicensing to MIT/Expat license, part 4: CMake and documentation files.
...
They didn't contain license header before, but I think adding it also
there wouldn't do any harm. Documentation is also integral part of the
codebase.
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š
6a5d75d1e4
Relicensing to MIT/Expat license, part 2: headers.
13 years ago
Vladimír Vondruš
90dbb28763
Thorough CMakeLists cleanup.
...
* Calling enable_testing() only in root path.
* Using CORRADE_CXX_FLAGS instead of our own set to make things easier
to maintain.
* Various cleanup and reorganization.
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š
c707370f30
Removed unneeded includes.
13 years ago
Vladimír Vondruš
4e5a6f76eb
SceneGraph: using new type aliases in whole SceneGraph namespace.
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š
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š
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š
8d2485c331
Clang also needs parentheses around default templated arguments.
13 years ago
Vladimír Vondruš
3610a80dfd
Clang fixes for templated base classes.
...
Unlike GCC it does need the `template` keyword on weird places.
13 years ago
Vladimír Vondruš
28c15aeb93
Clang fixes for friend declarations.
...
Friending only constructor apparently doesn't help, specifying
full-scope name for Resource.
13 years ago
Vladimír Vondruš
55fecaff5a
Template aliases also can't have "conflicting" default arguments.
...
Clang didn't like that (and I thought these workarounds aren't needed
with C++11's alias template anymore).
13 years ago
Vladimír Vondruš
1967179a40
Math: slight improvement of Gram-Schmidt orthonormalization algorithm.
...
Using Vector::projectOntoNormalized(), as it is slightly faster, renamed
the functions to properly mention that this is orthonormalization.
13 years ago
Vladimír Vondruš
780228d0b8
SceneGraph: restarting animation should allow the same repeat count.
...
Updated test to check that.
13 years ago
Vladimír Vondruš
fa6494f21e
SceneGraph: forgot to initialize variables.
...
Really need them to be computed from the matrix.
13 years ago
Vladimír Vondruš
5819dd4bd7
Math: matrix/vector rework, part 3: conversion as explicit constructor.
...
Also updated all dependent classes to follow the change, such as Color
and Rectangle. Backwards compatibility for GCC 4.6 (with lack of support
for delegating constructors) will be done as non-constexpr constructor
using operator=().
13 years ago
Vladimír Vondruš
baeadc9663
Math: matrix/vector rework, part 2: matrix as array of column vectors.
...
Overall architecture is simplififed with this change and also it's not
needed to use reinterpret_cast in matrix internals anymore, thus there
is no need for operator() and [][] works now always as expected without
any risk of GCC misoptimizations.
On the other side, constructing matrix from list of elements is not
possible anymore. You have to specify the elements as list of
column vectors, which might be less convenient to write, but it helps to
distinguish what is column and what is row:
Matrix<2, int> a(1, 2, // before
3, 4);
Matrix<2, int> a(Vector<2, int>(1, 2), // now
Vector<2, int>(3, 4));
For some matrix specializations (i.e. Matrix3 and Matrix4) it is
possible to use list-initialization instead of explicit type
specification:
Matrix<3, int>({1, 2, 3},
{4, 5, 6},
{7, 8, 9});
I didn't yet figure out how to properly implement the general
(constexpr) constructor to also take lists, so it's a bit ugly for now.
Matrix operations are now done column-wise, which should help with
future SIMD implementations, documentation is also updated accordingly.
I also removed forgotten remains of matrix/matrix operator*=(), which
can be confusing, as the multiplication is not commutative. Why it is
not present is explained in d9c900f076 .
13 years ago
Vladimír Vondruš
63086fdebe
SceneGraph: de-inlined some constructors & destructor, hidden internals.
...
Might help reducing application size.
13 years ago
Vladimír Vondruš
679ca80af5
SceneGraph: minor cleanup.
13 years ago
Vladimír Vondruš
29806b9415
Doc++
13 years ago
Vladimír Vondruš
b69f729e75
SceneGraph: thinko in FeatureGroup destructor.
...
FeatureGroup shouldn't delete the features, as all features are deleted
in Object destructor anyway and no feature can be created without
explicitly attaching it to some Object (and it also cannot be detached).
Moreover, when the group contains two features belogning to one object
and one feature is added using multiple inheritance, on group
destruction the object gets deleted along with the feature, removing
also the other feature, which breaks the for cycle in group destructor.
13 years ago
Vladimír Vondruš
59a3a7029d
SceneGraph: allow duplicate occurences in Object::transformations().
...
Fixes common case where one Object has multiple Drawable features
attached (one for regular mesh and one e.g. debug renderer).
13 years ago
Vladimír Vondruš
b86f107396
SceneGraph: split object transformations test into more functions.
13 years ago
Vladimír Vondruš
177898f93c
SceneGraph: code cleanup, documentation, fixed assertions.
...
The original assertion didn't actually check anything, because the list
was always empty. Moved/copied it to relevant places.
13 years ago