ZenitUI
Retained-mode C++20 UI framework
Loading...
Searching...
No Matches
ZenitUI::Rect Struct Reference

Axis-aligned rectangle in screen coordinates. More...

#include <CoreTypes.hpp>

Public Member Functions

bool contains (Vec2 p) const
 Inclusive point-in-rect test.
Vec2 center () const
 Center point of the rectangle.
Vec2 size () const
 Same data as a Vec2.

Public Attributes

float x {0.0f}
float y {0.0f}
float width {0.0f}
float height {0.0f}

Detailed Description

Axis-aligned rectangle in screen coordinates.

Member Function Documentation

◆ contains()

bool ZenitUI::Rect::contains ( Vec2 p) const
inline

Inclusive point-in-rect test.

Touching the edge counts as inside.


The documentation for this struct was generated from the following file: