In 1.8.5 it is now possible to reference directly to enum member.
Hooray! Also added explicit @ref here and there, fixing some referencing
bugs along the way.
Set it to some non-trivial value to achieve these two things:
* Some "corporate identity", I find very dark gray nicer than pure
black.
* Easier "black screen" debugging. Native Client, for example, by
default clears to pure white, which caused me painful hours figuring
out what the hell is going on.
I hoped the typedef was the same everywhere, but apparently ES has
something else, which is typedef'd recursively and I don't want to
maintain the consequences when porting elsewhere.
It adds much more convenience. Only some resources can't be moved around
(i.e. those with someone pointing at them), which isn't excuse for
forbidding copy/move altogether.
Finally it is possible to do convenient things like this again:
DebugTools::ResourceManager::instance()->set("red",
DebugTools::ShapeRendererOptions().setColor({1.0f, 0.0f, 0.0f}));
Every circle should consist of 40 lines, i.e. sphere should have 40
segments and 20 rings, capsule should have 40 segments and 10 rings per
hemisphere (=20 rings total).
The code is mostly copied and simplified from Capsule renderer. However,
it is such simplification that any attempt to reduce duplicate code
would result in much less maintainable thing.
Seems like an essential part of the toolbox -- we have Point, LineSegment
and Line and now we have also all "swept sphere" alternatives to them --
Sphere (swept "along" the point), Capsule (swept along line segment) and
Cylinder (swept along infinite line).
"Implemented" collision detection with point and sphere, which is just
simplified version of collision detection implemented for Capsule (i.e.
no need to check for cap cases).
Capsule, Sphere and Plane would behave weirdly if non-uniform scale
would be applied to them. This restriction allows to use more performant
code (i.e. less normalization and matrix multiplication). Updated the
tests to verify that uniform scaling is handled well, for Capsule and
Sphere there is now also no need to test both 2D and 3D transformation.
Needed to adjust the test cases slightly, because they were firing the
assert even if they shouldn't and the "expect fail" case wasn't working
at all. I now badly need proper floating-point equality comparison.