#include <geom/rect.h>
Public Member Functions | |
rect (const geom::span< V > &x, const geom::span< V > &y) | |
rect (const geom::vec2< V > &p1, const geom::vec2< V > &p2) | |
rect (const rect< V > &i) | |
template<class U> | |
rect (const rect< U > &other) | |
rect< V > & | operator= (const rect< V > &i) |
void | get_ltrb (V &L, V &T, V &R, V &B) const |
void | get_lrbt (V &L, V &R, V &B, V &T) const |
geom::vec2< V > | bottom_left () const |
geom::vec2< V > | bottom_right () const |
geom::vec2< V > | top_left () const |
geom::vec2< V > | top_right () const |
V | width () const |
V | height () const |
geom::vec2< V > | size () const |
V | aspect () const |
geom::vec2< V > | center () const |
V | center_x () const |
V | center_y () const |
const span< V > & | x_span () const |
const span< V > & | y_span () const |
const V & | left () const |
const V & | right () const |
const V & | bottom () const |
const V & | top () const |
template<class U> | |
bool | contains (const geom::vec2< U > &pt) const |
rect< V > & | set_ltrb (V L, V T, V R, V B) |
Set four corners from x-left/y-top/x-right/y-bottom values. | |
rect< V > & | set_lrbt (V L, V R, V B, V T) |
Set four corners from x-left/x-right/y-bottom/y-top values. | |
rect< V > & | set_lbwh (V x, V y, V w, V h) |
Set four corners from x-left/y-bottom/x-width/y-height values. | |
rect< V > & | set_lbwh (const geom::vec2< V > &xy, const geom::vec2< V > &wh) |
Set four corners from lower-left corner and width+height values. | |
rect< V > & | set_corners (const geom::vec2< V > &p1, const geom::vec2< V > &p2) |
Set four corners from positions of two diagonally-opposed corners. | |
void | incr_width (V w) |
void | incr_height (V h) |
void | set_width (V w) |
void | set_height (V h) |
void | scale_x (V factor) |
void | scale_y (V factor) |
void | translate (const geom::vec2< V > &dist) |
void | scale (const geom::vec2< V > &factors) |
void | set_center (const geom::vec2< V > &point) |
bool | is_void () const |
rect< V > | union_with (const rect< V > &other) const |
void | debug_dump () const throw () |
Static Public Member Functions | |
static rect< V > | ltrb (V l, V t, V r, V b) |
Factory for building rect's with left/top/right/bottom arguments. | |
static rect< V > | lbwh (V l, V b, V w, V h) |
Factory for building rect's with left/bottom/width/height arguments. | |
static rect< V > | lbwh (const geom::vec2< V > &xy, const geom::vec2< V > &wh) |
Set four corners from lower-left corner and width+height values. |
Definition at line 53 of file rect.h.