CSFML - C binding of the Simple and Fast Multimedia Library

CSFML 3.0.0

- Main Page
- Classes
- Files

- File List
- File Members

Loading...
Searching...
No Matches
Classes | Functions
Rect.h File Reference
`#include <CSFML/Graphics/Export.h>`
`#include <CSFML/System/Vector2.h>`

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

  rect | Rectangle to test
  point | Coordinates 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

  rect1 | First rectangle to test
  rect2 | Second rectangle to test
  intersection | Rectangle 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 )