Rect

Undocumented in source.

Members

Aliases

RectT
alias RectT = Rect!type
Undocumented in source.
rt
alias rt = type
Undocumented in source.

Functions

bottom
rt bottom()

Bottom coordinate of the rect

center
Vector!(rt, 2) center()

Gets the center of a rect

corner
Vector!(rt, 2) corner()

Gets the corner of a rect

dimensions
Vector!(rt, 2) dimensions()

Gets the dimensions of a rect

displace
void displace(vtype other)

Displaces the rect by the specified amount

displaced
RectT displaced(vtype other)

Gets a rect that has been displaced by the specified amount

expand
void expand(vtype other)

Expands the rect by the specified amount from the center

expandSize
void expandSize(vtype other)

Expands the rect by the specified amount from the corner

expanded
RectT expanded(vtype other)

Gets a rect that has been expanded by the specified amount from the center

expandedSize
RectT expandedSize(vtype other)

Expands the rect by the specified amount from the corner

intersects
bool intersects(rtype other)

Gets whether this rect intersects another rect

intersects
bool intersects(vtype other)

Gets whether this rect intersects a vector

left
rt left()

Left coordinate of the rect

ptr
auto ptr()

Returns a pointer to the quaternion in memory, it starts with the w coordinate.

right
rt right()

Right coordinate of the rect

top
rt top()

Top coordinate of the rect

uvs
Vector!(rt, 4) uvs()

Gets the UV coordinates of each corner and returns them as a vec4 of the rect's type

Static functions

identity
auto identity()

returns identity rect

Unions

__anonymous
union __anonymous
Undocumented in source.

Meta