virtual bool test_root(const double& length) const { double cp = getCollisionPoints(); return fabs(cp) < 1e-16 ; }
virtual bool test_root() const { std::pair<double,double> cp = getCollisionPoints(); return (fabs(cp.first) < _length / 2.0 && fabs(cp.second) < _length / 2.0); }
std::vector<Point> getCollisionPoints(Body*a, Body*b) { return getCollisionPoints(a->getShape(), b->getShape()); }