|
| constexpr | Point (const PointRaw &p={}) noexcept |
| | Wraps Point.
|
| constexpr | Point (int x, int y) noexcept |
| | Constructs from its fields.
|
| constexpr | Point (const FPointRaw &p) |
| | Wraps Point.
|
| constexpr | operator bool () const noexcept |
| | Check if valid.
|
| constexpr int | GetX () const noexcept |
| | Get x coordinate.
|
| constexpr Point & | SetX (int newX) noexcept |
| | Set the x coordinate.
|
| constexpr int | GetY () const noexcept |
| | Get y coordinate.
|
| constexpr Point & | SetY (int newY) noexcept |
| | Set the y coordinate.
|
| bool | InRect (const RectRaw &r) const |
| | Determine whether a point resides inside a rectangle.
|
| constexpr Point | operator- () const |
| | Get point's memberwise negation.
|
| constexpr Point | operator+ (const Point &other) const |
| | Get point's memberwise addition with another point.
|
| constexpr Point | operator- (const Point &other) const |
| | Get point's memberwise subtraction with another point.
|
| constexpr Point | operator/ (int value) const |
| | Get point's memberwise division by an integer.
|
| constexpr FPoint | operator/ (float value) const |
| | Get point's memberwise division by an integer.
|
| constexpr Point | operator/ (const Point &other) const |
| | Get point's memberwise division by another point.
|
| constexpr Point | operator% (int value) const |
| | Get point's memberwise remainder from division by an integer.
|
| constexpr Point | operator% (const Point &other) const |
| | Get point's memberwise remainder from division by another point.
|
| constexpr Point | operator* (int value) const |
| | Get point's memberwise multiplication by an integer.
|
| constexpr FPoint | operator* (float value) const |
| | Get point's memberwise multiplication by an integer.
|
| constexpr Point | operator* (const Point &other) const |
| | Get point's memberwise multiplication by another point.
|
| constexpr Point & | operator+= (const Point &other) |
| | Memberwise add another point.
|
| constexpr Point & | operator-= (const Point &other) |
| | Memberwise subtract another point.
|
| constexpr Point & | operator/= (int value) |
| | Memberwise divide by an integer.
|
| constexpr Point & | operator/= (const Point &other) |
| | Memberwise divide by another point.
|
| constexpr Point & | operator%= (int value) |
| | Memberwise remainder from division by an integer.
|
| constexpr Point & | operator%= (const Point &other) |
| | Memberwise remainder from division by another point.
|
| constexpr Point & | operator*= (int value) |
| | Memberwise multiply by an integer.
|
| constexpr Point & | operator*= (const Point &other) |
| | Memberwise multiply by another point.
|
| constexpr Point | GetClamped (const Rect &rect) const |
| | Get a point with coordinates modified so it fits into a given rect.
|
| constexpr Point & | Clamp (const Rect &rect) |
| | Clamp point coordinates to make it fit into a given rect.
|
| constexpr Point | GetWrapped (const Rect &rect) const |
| | Get a point wrapped within a specified rect.
|
| constexpr Point & | Wrap (const Rect &rect) |
| | Wrap point coordinates within a specified rect.
|
| constexpr | operator FPoint () const |
| | Converts to FPoint.
|
The structure that defines a point (using integers).
Inspired by https://github.com/libSDL2pp/libSDL2pp/blob/master/SDL2pp/Point.hh
- Since
- This struct is available since SDL 3.2.0.
- Category:
- Wrap extending struct
- See also
- Rect.GetEnclosingPoints
-
Point.InRect