49Ray::Ray(
const Line& line) : origin(line.point1), direction((line.point2 - line.point1).unit()) {
117 throw std::runtime_error(
"Cannot find bounding box of a ray - rays are infinite in length");
182 float colX = (b2 - b1) / (a1 - a2);
208 float colX = (b2 - b1) / den;
T dot(Vector2< T > o) const
T cross(Vector2< T > o) const
constexpr float radToDeg(float rad)
bool isFloating0(T num, T epsilon=std::numeric_limits< T >::epsilon())
constexpr float degToRad(float deg)
bool rayCollision(Ray ray) const override
bool pointCollision(Vector2f point) const override
Rect getBoundingBox() const override
bool isPerpendicular(Ray ray) const
bool isParallel(Ray ray) const
float getAngle(AngleUnit unit) const
bool lineCollision(Line line) const override
bool rayCollision(Ray ray) const override
bool rectCollision(RotatedRect rect) const override
bool circleCollision(Circle circle) const override
Vector2f topRight() const
Vector2f bottomLeft() const