|
Archeus 0.0.0
A C library and game engine that focuses on documentation
|
#include "arc/math/rectangle.h"Go to the source code of this file.
Functions | |
| void | ARC_Rect_CenterOn (ARC_Rect *rect, ARC_Rect *bounds) |
| centers rect on given bounds | |
| void | ARC_FRect_CenterOn (ARC_FRect *rect, ARC_FRect *bounds) |
| centers rect on given bounds | |
| ARC_FRect | ARC_Rect_CastToFRect (ARC_Rect *rect) |
| casts Rect to FRect | |
| ARC_Rect | ARC_FRect_CastToRect (ARC_FRect *rect) |
| casts FRect to Rect | |
| int32_t | ARC_Rect_Intersects (ARC_Rect *rect1, ARC_Rect *rect2) |
| checks if two ARC_Rects intersect | |
| int32_t | ARC_FRect_Intersects (ARC_FRect *rect1, ARC_FRect *rect2) |
| checks if two ARC_FRects intersect | |
| int32_t | ARC_Rect_IntersectsPoint (ARC_Rect *rect, ARC_Point *point) |
| checks if ARC_Rect intersects with point | |
| int32_t | ARC_FRect_IntersectsPoint (ARC_FRect *rect, ARC_Point *point) |
| checks if ARC_FRect intersects with point | |
| int32_t | ARC_Rect_LineIntersects (ARC_Rect *rect, int32_t *x1, int32_t *y1, int32_t *x2, int32_t *y2) |
| checks if ARC_Rect intersects a line | |
| void | ARC_FRect_CollideAndSlide (ARC_FRect *rect, ARC_Vector2 *velocity, ARC_FRect *wall) |
| checks for a ARC_Rect on ARC_Rect collision and slides on collision | |
casts FRect to Rect
| rect | ARC_FRect to be casted |
Definition at line 25 of file rectangle.c.
References ARC_FRect::h, ARC_FRect::w, ARC_FRect::x, and ARC_FRect::y.
centers rect on given bounds
Definition at line 11 of file rectangle.c.
References ARC_FRect::h, ARC_FRect::w, ARC_FRect::x, and ARC_FRect::y.
| void ARC_FRect_CollideAndSlide | ( | ARC_FRect * | rect, |
| ARC_Vector2 * | velocity, | ||
| ARC_FRect * | wall ) |
checks for a ARC_Rect on ARC_Rect collision and slides on collision
| rect | ARC_Rect that might collide with the wall |
| velocity | the ammount ARC_Rect will move |
| wall | ARC_Rect that might have collision with rect |
Definition at line 74 of file rectangle.c.
References ARC_FRect_Intersects(), ARC_FRect::h, ARC_FRect::w, ARC_FRect::x, ARC_Vector2::x, ARC_FRect::y, and ARC_Vector2::y.
checks if two ARC_FRects intersect
| rect1 | ARC_FRect that will be checked against rect2 |
| rect2 | ARC_FRect that will be checked against rect1 |
Definition at line 42 of file rectangle.c.
References ARC_FRect::h, ARC_FRect::w, ARC_FRect::x, and ARC_FRect::y.
Referenced by ARC_FRect_CollideAndSlide().
checks if ARC_FRect intersects with point
| rect | ARC_FRect that will be checked against point |
| point | ARC_Point that will be checked against rect |
Definition at line 58 of file rectangle.c.
References ARC_FRect::h, ARC_FRect::w, ARC_FRect::x, ARC_Point::x, ARC_FRect::y, and ARC_Point::y.
casts Rect to FRect
| rect | ARC_Rect to be casted |
Definition at line 16 of file rectangle.c.
References ARC_Rect::h, ARC_Rect::w, ARC_Rect::x, and ARC_Rect::y.
centers rect on given bounds
Definition at line 6 of file rectangle.c.
References ARC_Rect::h, ARC_Rect::w, ARC_Rect::x, and ARC_Rect::y.
checks if two ARC_Rects intersect
| rect1 | ARC_Rect that will be checked against rect2 |
| rect2 | ARC_Rect that will be checked against rect1 |
Definition at line 34 of file rectangle.c.
References ARC_Rect::h, ARC_Rect::w, ARC_Rect::x, and ARC_Rect::y.
checks if ARC_Rect intersects with point
| rect | ARC_Rect that will be checked against point |
| point | ARC_Point that will be checked against rect |
Definition at line 50 of file rectangle.c.
References ARC_Rect::h, ARC_Rect::w, ARC_Point::x, ARC_Rect::x, ARC_Point::y, and ARC_Rect::y.
| int32_t ARC_Rect_LineIntersects | ( | ARC_Rect * | rect, |
| int32_t * | x1, | ||
| int32_t * | y1, | ||
| int32_t * | x2, | ||
| int32_t * | y2 ) |
checks if ARC_Rect intersects a line
| rect | ARC_Rect that will be checked against line |
| x1 | first point's x value |
| y1 | first point's y value |
| y2 | second point's x value |
| y2 | second point's y value |
Definition at line 66 of file rectangle.c.