A rectangle, with the origin at the upper left (using floating point values).
More...
|
| constexpr | FRect (const FRectRaw &r={}) |
| | Wraps FRect. More...
|
| |
| constexpr | FRect (float x, float y, float w, float h) |
| | Constructs from its fields. More...
|
| |
|
constexpr | FRect (FPoint corner, FPoint size) |
| | Constructs from top-left corner plus size.
|
| |
|
constexpr bool | operator== (const FRectRaw &other) const |
| | Compares with the underlying type.
|
| |
|
constexpr bool | operator== (const FRect &other) const |
| | Compares with the underlying type.
|
| |
| constexpr | operator bool () const |
| |
| constexpr float | GetX () const |
| | Get left x coordinate. More...
|
| |
| constexpr FRect & | SetX (float newX) |
| | Set the left x coordinate. More...
|
| |
| constexpr float | GetY () const |
| | Get top y coordinate. More...
|
| |
| constexpr FRect & | SetY (float newY) |
| | Set the top y coordinate. More...
|
| |
| constexpr float | GetW () const |
| | Get width of the rect. More...
|
| |
| constexpr FRect & | SetW (float newW) |
| | Set the width of the rect. More...
|
| |
| constexpr float | GetH () const |
| | Get height of the rect. More...
|
| |
| constexpr FRect & | SetH (float newH) |
| | Set the height of the rect. More...
|
| |
| constexpr float | GetX2 () const |
| | Get X coordinate of the rect second corner. More...
|
| |
| constexpr FRect & | SetX2 (float x2) |
| | Set X coordinate of the rect second corner. More...
|
| |
| constexpr float | GetY2 () const |
| | Get Y coordinate of the rect second corner. More...
|
| |
| constexpr FRect & | SetY2 (float y2) |
| | Set Y coordinate of the rect second corner. More...
|
| |
| constexpr FPoint | GetTopLeft () const |
| | Get top left corner of the rect. More...
|
| |
| constexpr FPoint | GetTopRight () const |
| | Get top right corner of the rect. More...
|
| |
| constexpr FPoint | GetBottomLeft () const |
| | Get bottom left corner of the rect. More...
|
| |
| constexpr FPoint | GetBottomRight () const |
| | Get bottom right corner of the rect. More...
|
| |
| constexpr FPoint | GetSize () const |
| | Get size of the rect. More...
|
| |
| constexpr FPoint | GetCentroid () const |
| | Get centroid of the rect. More...
|
| |
| bool | GetLineIntersection (float *X1, float *Y1, float *X2, float *Y2) const |
| | Calculate the intersection of a rectangle and line segment with float precision. More...
|
| |
| bool | GetLineIntersection (FPoint *p1, FPoint *p2) const |
| | Calculate the intersection of a rectangle and line segment. More...
|
| |
| constexpr bool | Empty () const |
| | Determine whether a rectangle has no area. More...
|
| |
| constexpr bool | EqualEpsilon (const FRectRaw &other, const float epsilon) const |
| | Determine whether two floating point rectangles are equal, within some given epsilon. More...
|
| |
| constexpr bool | Equal (const FRectRaw &other) const |
| | Determine whether two rectangles are equal. More...
|
| |
| constexpr bool | Contains (const FPointRaw &p) const |
| | Check whether the rect contains given point. More...
|
| |
| constexpr bool | Contains (const FRectRaw &other) const |
| | Check whether the rect contains given point. More...
|
| |
| constexpr bool | HasIntersection (const FRectRaw &other) const |
| | Determine whether two rectangles intersect. More...
|
| |
| constexpr FRect | GetIntersection (const FRectRaw &other) const |
| | Calculate the intersection of two rectangles with float precision. More...
|
| |
| constexpr FRect | GetUnion (const FRectRaw &other) const |
| | Calculate the union of two rectangles with float precision. More...
|
| |
| constexpr FRect | GetExtension (unsigned int amount) const |
| | Get a rect extended by specified amount of pixels. More...
|
| |
| constexpr FRect | GetExtension (float hAmount, float vAmount) const |
| | Get a rect extended by specified amount of pixels. More...
|
| |
| constexpr FRect & | Extend (float amount) |
| | Extend a rect by specified amount of pixels. More...
|
| |
| constexpr FRect & | Extend (float hAmount, float vAmount) |
| | Extend a rect by specified amount of pixels. More...
|
| |
| constexpr FRect | operator+ (const FPoint &offset) const |
| | Get rectangle moved by a given offset. More...
|
| |
| constexpr FRect | operator- (const FPoint &offset) const |
| | Get rectangle moved by an opposite of given offset. More...
|
| |
| constexpr FRect & | operator+= (const FPoint &offset) |
| | Move by then given offset. More...
|
| |
| constexpr FRect & | operator-= (const FPoint &offset) |
| | Move by an opposite of the given offset. More...
|
| |
|
| static constexpr FRect | GetEnclosingPoints (SpanRef< const FPointRaw > points, OptionalRef< const FRectRaw > clip=std::nullopt) |
| | Calculate a minimal rectangle enclosing a set of points with float precision. More...
|
| |
| static constexpr FRect | FromCenter (float cx, float cy, float w, float h) |
| | Construct the rect from given center coordinates, width and height. More...
|
| |
| static constexpr FRect | FromCenter (FPoint center, FPoint size) |
| | Construct the rect from given center coordinates and size. More...
|
| |
| static constexpr FRect | FromCorners (float x1, float y1, float x2, float y2) |
| | Construct the rect from given corners coordinates. More...
|
| |
| static constexpr FRect | FromCorners (FPoint p1, FPoint p2) |
| | Construct the rect from given centers coordinates. More...
|
| |