vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::UIRect Struct Reference

An axis-aligned screen-space rectangle (top-left origin, pixels). More...

#include <ui_element.h>

Public Member Functions

UIRect intersected (const UIRect &other) const
 The overlap of this rect and other, empty when they miss.

Public Attributes

glm::vec2 pos = {0.0f, 0.0f}
 Top-left corner.

Detailed Description

An axis-aligned screen-space rectangle (top-left origin, pixels).

Member Function Documentation

◆ intersected()

UIRect Vkm::Engine::UIRect::intersected ( const UIRect & other) const
inline

The overlap of this rect and other, empty when they miss.

Never a negative size, since clipping composes down the hierarchy by intersecting.

Parameters
otherRect to intersect with.
Returns
The overlap, or a zero-size rect at this rect's corner.

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