Region2D::Box - create boxes
use Region2D::Box;
$box = Region2D::Box->rect_o $xmin, $ymin, $xmax, $ymax;
$box = Region2D::Box->rect_c $xc, $yc, $x_len, $y_len;
$box = Region2D::Box->square_c $xc, $yc, $len;
$box = Region2D::Box->square_ll $xmin, $ymax, $len;
print $box->area; print $box->xlen; print $box->ylen;
A simple interface to boxes. Boxes are rectangles which are aligned with the coordinate axes (no rotations for now).
$box = Region2D::Box->rect_c $xc, $yc, $x_len, $y_len;
Create a box with the given center ($xc, $yc) and side lengths.
$box = Region2D::Box->rect_o $xmin, $ymin, $xmax, $ymax;
Create a box with the given box corners.
$box = Region2D::Box->square_c $xc, $yc, $len;
Create a square box with the given center and side length;
$box = Region2D::Box->square_ll $xmin, $ymax, $len;
Create a square box with the given lower left corner and side length;
As Box inherits from the Region2D, it implements all of its methods (namely clone(), in(), out(), and area().
$box->set_xmin( $xmin );
set the minimum X value
$box->set_xmax( $xmax );
set the maximum X value
$box->set_ymin( $ymin );
set the minimum Y value
$box->set_ymax( $ymax );
set the maximum Y value
Diab Jerius ( djerius@cfa.harvard.edu )