![]() |
Kale
|
#include <RotatedRect.hpp>
Public Member Functions | |
RotatedRect () | |
RotatedRect (const Vector2f &point1, const Vector2f &point2, const Vector2f &point3, const Vector2f &point4) | |
RotatedRect (const Vector2f &topLeft, const Vector2f &bottomRight) | |
Vector2f | center () 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 | point1 |
Vector2f | point2 |
Vector2f | point3 |
Vector2f | point4 |
Represents a rectangular structure of float vectors
Definition at line 26 of file RotatedRect.hpp.
RotatedRect::RotatedRect | ( | ) |
Creates a rectangle with all points at 0, 0
Definition at line 31 of file RotatedRect.cpp.
RotatedRect::RotatedRect | ( | const Vector2f & | point1, |
const Vector2f & | point2, | ||
const Vector2f & | point3, | ||
const Vector2f & | point4 ) |
Creates a new rectangle given four points. Points must be specified in clockwise order.
point1 | The first point |
point2 | The second point |
point3 | The third point |
point4 | The fourth point |
Creates a new rectangle given four points
point1 | The first point |
point2 | The second point |
point3 | The third point |
point4 | The fourth point |
Definition at line 42 of file RotatedRect.cpp.
Creates a new rectangle from the topLeft and bottomRight points
topLeft | The top left point |
bottomRight | The bottom right point |
Definition at line 52 of file RotatedRect.cpp.
Vector2f RotatedRect::center | ( | ) | const |
Gets the center of the rectangle
Definition at line 60 of file RotatedRect.cpp.
|
overridevirtual |
Checks for collision with a circle
circle | The circle to check collision for |
Implements Kale::Geometry.
Definition at line 113 of file RotatedRect.cpp.
|
overridevirtual |
Gets a bounding box for this geometry to check for quick and inaccurate collisions
Implements Kale::Geometry.
Definition at line 68 of file RotatedRect.cpp.
|
overridevirtual |
Checks for collision with a line
line | The line to check collision for |
Implements Kale::Geometry.
Definition at line 131 of file RotatedRect.cpp.
|
overridevirtual |
Checks for collision with a point
point | The point to check collision for |
Implements Kale::Geometry.
Definition at line 80 of file RotatedRect.cpp.
|
overridevirtual |
Checks for collision with a ray
ray | The ray to check collision for |
Implements Kale::Geometry.
Definition at line 122 of file RotatedRect.cpp.
|
overridevirtual |
Checks for collision with a rectangle
rect | The rectangle to check collision for |
Implements Kale::Geometry.
Definition at line 104 of file RotatedRect.cpp.
|
overridevirtual |
Checks for collision with a rectangle
rect | The rectangle to check collision for |
Implements Kale::Geometry.
Definition at line 92 of file RotatedRect.cpp.
Vector2f Kale::RotatedRect::point1 |
The first point in the rectangle
Definition at line 31 of file RotatedRect.hpp.
Vector2f Kale::RotatedRect::point2 |
The second point in the rectangle
Definition at line 36 of file RotatedRect.hpp.
Vector2f Kale::RotatedRect::point3 |
The third point in the rectangle
Definition at line 41 of file RotatedRect.hpp.
Vector2f Kale::RotatedRect::point4 |
The fourth point in the rectangle
Definition at line 46 of file RotatedRect.hpp.