geom::rect< V > Class Template Reference

geom::rect represents rectangles in two-dimensional space. More...

#include <geom/rect.h>

Inheritance diagram for geom::rect< V >:

Inheritance graph
[legend]

List of all members.

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
width () const
height () const
geom::vec2< V > size () const
aspect () const
geom::vec2< V > center () const
center_x () const
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.


Detailed Description

template<class V>
class geom::rect< V >

geom::rect represents rectangles in two-dimensional space.

Definition at line 53 of file rect.h.


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

The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Wed Dec 3 06:56:15 2008 by Doxygen version 1.5.5.