Rect2

Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.

Constructors

this
this(real_t p_x, real_t p_y, real_t p_width, real_t p_height)
Undocumented in source.

Members

Functions

clip
Rect2 clip(Rect2 p_rect)
Undocumented in source. Be warned that the author may not have intended to support it.
distanceTo
real_t distanceTo(Vector2 p_point)
Undocumented in source. Be warned that the author may not have intended to support it.
encloses
bool encloses(Rect2 p_rect)
Undocumented in source. Be warned that the author may not have intended to support it.
expand
Rect2 expand(Vector2 p_vector)
Undocumented in source. Be warned that the author may not have intended to support it.
expandTo
void expandTo(Vector2 p_vector)
Undocumented in source. Be warned that the author may not have intended to support it.
getArea
real_t getArea()
Undocumented in source. Be warned that the author may not have intended to support it.
grow
Rect2 grow(real_t p_by)
Undocumented in source. Be warned that the author may not have intended to support it.
hasNoArea
bool hasNoArea()
Undocumented in source. Be warned that the author may not have intended to support it.
hasPoint
bool hasPoint(Vector2 p_point)
Undocumented in source. Be warned that the author may not have intended to support it.
intersects
bool intersects(Rect2 p_rect)
Undocumented in source. Be warned that the author may not have intended to support it.
intersectsSegment
bool intersectsSegment(Vector2 p_from, Vector2 p_to, Vector2* r_pos, Vector2* r_normal)
Undocumented in source. Be warned that the author may not have intended to support it.
intersectsTransformed
bool intersectsTransformed(Transform2D p_xform, Rect2 p_rect)
Undocumented in source. Be warned that the author may not have intended to support it.
merge
Rect2 merge(Rect2 p_rect)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

pos
Vector2 pos;
Undocumented in source.
size
Vector2 size;
Undocumented in source.

Meta