Mikko Rasa [Tue, 21 May 2013 18:41:15 +0000 (21:41 +0300)]
Make the check_intersection function non-virtual
Almost all shapes were implementing it with a call to get_intersections,
so might as well make the base class do that. Performance loss is likely
negligible.
Mikko Rasa [Tue, 21 May 2013 13:32:49 +0000 (16:32 +0300)]
Math function usage fixes
Add using declarations and #includes where needed, and clean up some
unnecessary ones. abs() is particularly annoying, as the int version
easily gets into the global namespace and doesn't give a warning if
used with floats or doubles.
Mikko Rasa [Sun, 19 May 2013 17:38:22 +0000 (20:38 +0300)]
Don't qualify potentially overloaded functions with the std namespace
Instead put a using std::func before the call. This makes things work if
the template argument is a user-defined type with these functions defined
in another namespace.
Mikko Rasa [Fri, 17 May 2013 10:55:57 +0000 (13:55 +0300)]
Redesign the Vector interface
The constructors from two and three components are now provided directly
by the Vector template, so Vector2 and Vector3 are no longer needed. In
addition, two- and three-component vectors now have named members.