Both GCC and Clang don't warn if deprecated function is used from inside
another deprecated function (as one would expect). However, MSVC is
doing that and producing a lot of noise. Even worse, when trying to
compile the code under new WindowsStore/WindowsPhone SDKs, the project
files now by default treat these warnings as errors, making the code
uncompilable (unless deprecated API is turned off by disabling
BUILD_DEPRECATED in CMake).
I got like five e-mails about this already, putting that in the docs so I
don't have to invent that every time again.
This is very specific to many transformation/projection properties
(origin, Y up, 2D/3D and whatnot) and thus I'm not adding any convenience
function to calculate that.
Some classes are by default constructed zero-filled while other are set
to identity and the only way to to check this is to look into the
documentation. This changes the default constructor of all classes to
take an optional "tag" which acts as documentation about how the type is
constructed. Note that this result in no behavioral changes, just
ability to be more explicit when writing the code. Example:
// These two are equivalent
Quaternion q1;
Quaternion q2{Math::IdentityInit};
// These two are equivalent
Vector4 vec1;
Vector4 vec2{Math::ZeroInit};
Matrix4 a{Math::IdentityInit, 2}; // 2 on diagonal
Matrix4 b{Math::ZeroInit}; // all zero
This functionality was already present in some ugly form in Matrix,
Matrix3 and Matrix4 classes. It was long and ugly to write, so it is
now generalized into the new Math::IdentityInit and Math::ZeroInit tags,
the original Matrix::IdentityType, Matrix::Identity, Matrix::ZeroType
and Matrix::Zero are deprecated and will be removed in the future
release.
Math::Matrix<7, Int> m{Math::Matrix<7, Int>::Identity}; // before
Math::Matrix<7, Int> m{Math::IdentityInit}; // now
The camera now accepts generic projection matrix instead of providing
functions for setting orthographic/perspective projection. This allowed
to completely get rid of the AbstractCamera->Camera*D inheritance
hierarchy and everything is now done through one templated Camera class.
The Camera2D::setProjection(), Camera3D::setOrthographic() and
Camera3D::setPerspective() are deprecated, use
Camera*D::setProjectionMatrix() in combination with
Matrix3::projection(), Matrix4::orthographicProjection() and
Matrix4::perspectiveProjection() instead.
The Camera3D::near() and Camera3D::far() getters are removed. The user
is advised to cache the values on application side if they are really
needed. More general queries for all six clipping planes (*not*
distance) might be implemented later.
The AbstractCamera, AbstractBasicCamera2D, AbstractBaseicCamera3D,
AbstractCamera2D and AbstractCamera3D types are deprecated as there is
no such type anymore, use Camera, BasicCamera2D, BasicCamera3D, Camera2D
and Camera3D instead.
The AbstractCamera.h, AbstractCamera.hpp, Camera2D.h, Camera2D.hpp,
Camera3D.h and Camera3D.hpp headers are deprecated, use Camera.h and
Camera.hpp instead.
As always, all deprecated features will be removed in some future
release.
Direct access to list of children is now provided through
Object::children(), list of features is provided in
AbstractObject::features(). In most cases the range-based-for is good
enough, the previousSibling()/nextSibling() and
previousFeature()/nextFeature() functions are for the cases where user
needs more flexibility.
Because everything that was previously done using firstChild() etc. can
be now done also with children().first() etc., there would be more than
one way to do the same thing. Thus the old functions are now marked as
deprecated and will be removed in some future release.
The enum was only two-state, in almost all cases it included unnecessary
branching and the non-default usage was too verbose, thus all
transformation functions were split into two variants, <transform>() and
<transform>Local(). The <transform>() behaves exactly like the previous
implementation with TransformationType::Global, the <transform>Local()
behaves like the previous implementation with TransformationType::Local.
The enum and original functions were kept, they are marked as deprecated
and will be removed in future release.
This is rather large changeset, I triple checked that the new (both
deprecated and non-deprecated) implementations work as intended, but
can't possibly test every possible use case, so I'm sorry if I messed
something up :-) Also there was probably some bug in internal virtual
function implementations before, it should be now fixed.
Forward declarations of templated types don't have named template
parameters and thus Doxygen (sometimes) used these for documentation. It
then looked like this:
Magnum::Math::RectangularMatrix<std::size_t, std::size_t, class>
which isn't helpful at all. After the change it looks like this (much
better):
Magnum::Math::RectangularMatrix<cols, rows, T>
New in 2.8.9, much cleaner than the previous "solution". Also cleaned up
the surroundings a bit. Fixed cases where PIC was forced independently
of the settings, for plugins the PIC is now also set only when
needed/requested.
Previously (<= 4.9.0) it behaved similarly to MSVC 2013, but the issues
with missing inline functions of classes declared as extern template
appeared again. This way doesn't work with MSVC, so I need to maintain
two separate symbol exporting scenarios. Damn you, DLL hell.