Merged constexpr test cases into other ones to remove duplicate code.
Copied the constructors from Math::Vector as I don't feel reinventing
all that again.
Assumes that no resources of given type are referenced. The test case
for this is awful, as I can't think of a way to test which would work
without trying to decrement reference counter on already deleted
resource. Added just-to-be-sure assertion to make it fail early and not
somewhere deep in STL.
Previously was done per type (i.e. for each type delete loader and then
the data), wasn't usable when the loader stored different resource type
(which is the only case where it is useful).
Positions and normals have the same data, thus the data were simply
copied to positions and then moved to normals in return to save one
needless copying. However it seems that these two operations were
swapped by the compiler (C++ standard?) and thus there were no positions
to be copied.
Now explicitly creating copy of position array and then moving them in
return. While at it, renamed also `vertices` to `positions` to be
consistent with the rest of the engine. Also added simple (count only)
unit test to avoid this error in the future.
Print expected and actual count to simplify debugging. Also the phrase
"nothing done." is useless, as nothing is _ever_ done after assertion
failure. Probably remains from the times where that wasn't assertion but
merely harmless warning.
Currently the most used scene graph transformation implementation are
dual quaternions, which don't allow any scaling. The original code
normalized the rotation matrix, involving three dot products and one
sqrt, even if it wasn't needed in most cases -- even if using scene
graph with matrices mostly you don't scale at all and thus the shader
internally renormalized already normalized vectors for _each object_ in
each frame.
This _will_ break things, don't forget to update the code and call
`setNormalMatrix()` along with `setTransformationMatrix()`.
Use AbstractCamera<dimensions, T>, Drawable<dimensions, T> and
DrawableGroup<dimensions, T> like before and add two kinds of aliases
instead of only one: AbstractBasicCamera2D<T>/AbstractBasicCamera3D<T>,
BasicDrawable2D<T>/BasicDrawable3D<T> and
BasicDrawableGroup2D<T>/BasicDrawableGroup3D<T> for abstract type and
AbstractCamera2D/AbstractCamera3D, Drawable2D/Drawable3D and
DrawableGroup2D/DrawableGroup3D for Float.
Also fixed some find&replace errors in documentation and include guards.
Partially reverts commit a0d60bbaa7.
Use AbstractTransformation<dimensions, T> like before and add two
kinds of aliases instead of only one:
AbstractBasicTransformation2D<T>/AbstractBasicTransformation3D<T> for
abstract type and AbstractTransformation2D/AbstractTransformation3D for
Float.
Partially reverts commit 346ea2feb6.
Use AbstractFeature<dimensions, T>, AbstractGroupedFeature<...>,
AbstractFeatureGroup<...>, FeatureGroup<...> like before and add two
kinds of aliases instead of only one, one with *Basic* for abstract type
and one for Float type.
Partially reverts commit 572efce3f7.