Loading...
Searching...
No Matches
Rect.h File Reference

Go to the source code of this file.

Classes

struct  sfFloatRect
 sfFloatRect and sfIntRect are utility classes for manipulating rectangles. More...
 
struct  sfIntRect
 

Functions

bool sfFloatRect_contains (const sfFloatRect *rect, sfVector2f point)
 Check if a point is inside a rectangle's area.
 
bool sfIntRect_contains (const sfIntRect *rect, sfVector2i point)
 
bool sfFloatRect_intersects (const sfFloatRect *rect1, const sfFloatRect *rect2, sfFloatRect *intersection)
 Check intersection between two rectangles.
 
bool sfIntRect_intersects (const sfIntRect *rect1, const sfIntRect *rect2, sfIntRect *intersection)
 

Function Documentation

◆ sfFloatRect_contains()

bool sfFloatRect_contains ( const sfFloatRect rect,
sfVector2f  point 
)

Check if a point is inside a rectangle's area.

Parameters
rectRectangle to test
pointCoordinates of the point to test
Returns
true if the point is inside

◆ sfFloatRect_intersects()

bool sfFloatRect_intersects ( const sfFloatRect rect1,
const sfFloatRect rect2,
sfFloatRect intersection 
)

Check intersection between two rectangles.

Parameters
rect1First rectangle to test
rect2Second rectangle to test
intersectionRectangle to be filled with overlapping rect (can be NULL)
Returns
true if rectangles overlap

◆ sfIntRect_contains()

bool sfIntRect_contains ( const sfIntRect rect,
sfVector2i  point 
)

◆ sfIntRect_intersects()

bool sfIntRect_intersects ( const sfIntRect rect1,
const sfIntRect rect2,
sfIntRect intersection 
)