This allows to use those nice aliases even on GCC <= 4.6 without
resorting to verbose full name. Double and other types can be then
typedef'd as e.g. Camera3Dd or Camera3Di.
Calling functions directly on Object will result in non-virtual calls,
calling functions on AbstractObject will result in virtual calls. Also
removed now unneeded "hacks" like `sceneObject()` and properly hiding
unsafe functions taking `AbstractObject*` with safe functions taking
`Object*`. Also hide `isScene()` from public documentation, as it is
sort-of hack too.
Until now, all calls to e.g. `Object::translate()` were virtual, which
is _very_ bad for performance. The virtual call is only needed when
setting the transformation via some interface, e.g.
`AbstractTranslationRotation3D`, as the caller doesn't know which
transformation implementation is used.
Now all public-facing transformation methods are inline non-virtual
functions, which are in most cases calling directly the transformation
implementation. In `Abstract*` transformation interfaces these functions
call private virtual `do*()` implementations, which are (re)implemented
in subclasses, but aren't used anywhere except when transforming
directly through the `Abstract*` interfaces. This should have good
impact on performance when doing many transformations in every frame
(although I can't verify it anywhere, as I don't have any significantly
large animated demo). Except of course when doing it through the virtual
interfaces.
As the public-facing transformation methods are now non-virtual, there
are now no "covariant return" issues and they can now return proper
`Object<*Transformation*>` type instead of just `*Transformation*`,
which makes full non-WTF method chaining possible:
Object2D* obj2;
obj2->translate({0.5f, -1.0f}) // Transformation method
->setParentKeepTransformation(obj1); // Object method
Or even this:
Object2D* obj = (new Object2D)->rotate(-15.0_degf);
Moved almost everything into one file, instead of compiling ~50k LOC
seven times it is now compiling 56k LOC only once. This saves another ~5
seconds of compilation time (before ~4:11, now ~4:06).
Also explicitly saying that we are instantiating Float version of all
classes. In the future we might have compile switch for building also
Double one, this helps with consistency.
Constructor, destructor and all virtual functions are moved into
implementation file, so they don't need to be recreated and add into
binary on every usage. Should save a bit on resulting file size.
Created less-templated base for FeatureGroup and moved its
implementation into *.hpp file, allowing to remove <algorithm> header
from FeatureGroup.h (and meanwhile removing forgotten one also from
AbstractGroupedFeature.h). Saved another ~10 seconds of compilation time
(previously ~4:21, now ~4:11).
Now it is nearly similar to MatrixTransformation*D except for scaling.
Public functions setTransformation() and transform() assert that the
matrix represents rigid transformation.
* 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.