Currently all the functions taking vectors of objects (e.g. setClean(),
transformations() and transformationMatrices()) were taking pointers,
which lead to additional (and often forgotten) nullptr checks. The
internals are now much more clean, as the parts where we are dealing
with pointers are reduced to bare minimum.
Also renamed private Object::setClean() function to
Object::setCleanInternal() to avoid overload clash with the public one.
The old way is now an nullptr-checked alias to the new one, is marked
as deprecated and will be removed in some future release.
As we are now using absolute includes, there is no need to prefix
everything with "magnum<Namespace>" etc. All generated configuration
files are renamed to configure.h and their path is included _before_
everything else to avoid accidental collisions.
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/)
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.
Previously it was possible to access internal transformation
implementation from Transformation and thus also from Object, e.g.:
typedef SceneGraph::Object<SceneGraph::MatrixTransformation2D> Object2D;
Object2D o;
o.fromMatrix(...); // What does this here and why it returns matrix?!
Now everything is hidden in Implementation namespace and all
traces of previous code are removed from documentation. It might now be
slightly harder for users to implement their own transformation
implementations, but it wasn't easy before either. The widely used ones
are already implemented, so it shouldn't be too much of a problem.
Similarly for potential backward compatibility issues, I assume nobody
needed to implement their own transformation yet.
Makes some cases less consistent (and some convenience shortcuts
impossible), but goes well with the attitude "don't use pointer when it
can't be null".
Use AbstractObject<dimensions, T> like before and add two kinds of
aliases instead of only one:
AbstractBasicObject2D<T>/AbstractBasicObject3D<T> for abstract type and
AbstractObject2D/AbstractObject2D for Float.
Makes it easier to use AbstractObject in templates of fixed dimensions
(e.g. Bullet integration, where it can now be written as
`AbstractBasicObject2D<btScalar>` instead of potentially confusing
`AbstractBasicObject<2, btScalar>`).
Partially reverts commit cfd405c32c.
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.
It prevents unwanted implicit conversions from e.g. nullptr to Camera,
Vector2 to Physics::Point etc. By making all the constructors explicit
it is easier to routinely add the keyword to all new classes instead of
thinking about cases when to add and when not to.
Currently the documentation looked like "who would ever want something
else than 2D/3D objects", now it hints that the objects can be also on
steroids, err.., doubles instead of floats.
Using header with forward declarations, containing declarations for all
classes with default parameters. The classes themselves don't have the
defaults.
This also allows users to more conveniently forward-declare instead of
digging in sources and writing the declarations on their own.
The downside of this is that the functions are now virtual, which makes
them slower than before. Maybe final qualifier would help?
AbstractObject::sceneObject() is marked as private in Object to avoid
confusion.
Functionality present in Object is now split into three main components:
* Object itself, handling parent/children relationships
* Transformation implementation and interfaces for common functionality
* Object features, providing transformation caching and base for
cameras, collision shapes, rigid bodies etc.
Some functionality depending on former implementation is temporarily
disabled and will be reworked later.