![]() |
Kale
|
#include <Ray.hpp>
Public Member Functions | |
Ray () | |
Ray (const Vector2f &origin, const Vector2f &direction) | |
Ray (const Vector2f &origin, float angle, AngleUnit unit) | |
Ray (const Line &line) | |
float | getAngle (AngleUnit unit) const |
bool | isPerpendicular (Ray ray) const |
bool | isPerpendicular (Line line) const |
bool | isParallel (Ray ray) const |
bool | isParallel (Line line) const |
Rect | getBoundingBox () const override |
bool | pointCollision (Vector2f point) const override |
bool | rectCollision (RotatedRect rect) const override |
bool | rectCollision (Rect rect) const override |
bool | circleCollision (Circle circle) const override |
bool | rayCollision (Ray ray) const override |
bool | lineCollision (Line line) const override |
Public Attributes | |
Vector2f | origin |
Vector2f | direction |
Ray::Ray | ( | ) |
Ray::Ray | ( | const Line & | line | ) |
|
overridevirtual |
Checks for collision with a circle
circle | The circle to check collision for |
Implements Kale::Geometry.
float Ray::getAngle | ( | AngleUnit | unit | ) | const |
|
overridevirtual |
Gets a bounding box for this geometry to check for quick and inaccurate collisions
Implements Kale::Geometry.
bool Ray::isParallel | ( | Line | line | ) | const |
bool Ray::isParallel | ( | Ray | ray | ) | const |
bool Ray::isPerpendicular | ( | Line | line | ) | const |
bool Ray::isPerpendicular | ( | Ray | ray | ) | const |
|
overridevirtual |
Checks for collision with a line
line | The line to check collision for |
Implements Kale::Geometry.
|
overridevirtual |
Checks for collision with a point
point | The point to check collision for |
Implements Kale::Geometry.
|
overridevirtual |
Checks for collision with a ray
ray | The ray to check collision for |
Implements Kale::Geometry.
|
overridevirtual |
Checks for collision with a rectangle
rect | The rectangle to check collision for |
Implements Kale::Geometry.
|
overridevirtual |
Checks for collision with a rectangle
rect | The rectangle to check collision for |
Implements Kale::Geometry.
Vector2f Kale::Ray::direction |