31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

14.23 Iso-oriented Real Rectangles ( real rectangle )<br />

1. Definition<br />

An instance r of the data type real rectangle is an iso-oriented rectangle in the twodimensional<br />

plane.<br />

#include < <strong>LEDA</strong>/geo/real rectangle.h ><br />

2. Creation<br />

real rectangle r(const real point& p, const real point& q);<br />

introduces a variable r of type real rectangle. r is initialized to the<br />

real rectangle with diagonal corners p and q<br />

real rectangle r(const real point& p, real w, real h);<br />

introduces a variable r of type real rectangle. r is initialized to the<br />

real rectangle with lower left corner p, width w and height h.<br />

real rectangle r(real x1 , real y1 , real x2 , real y2 );<br />

introduces a variable r of type real rectangle. r is initialized to the<br />

real rectangle with diagonal corners (x1 , y1 ) and (x2 , y2 ).<br />

real rectangle r(const rectangle& r1 , int prec = 0);<br />

real rectangle r(const rat rectangle& r1 );<br />

3. Operations<br />

introduces a variable r of type real rectangle initialized to the<br />

rectangle r 1 . (<strong>The</strong> second argument is for compatibility with<br />

rat rectangle.)<br />

introduces a variable r of type real rectangle initialized to the rectangle<br />

r 1 .<br />

real point r.upper left( ) returns the upper left corner.<br />

real point r.upper right( ) returns the upper right corner.<br />

real point r.lower left( ) returns the lower left corner.<br />

real point r.lower right( ) returns the lower right corner.<br />

real point r.center( ) returns the center of r.<br />

list r.vertices( )<br />

returns the vertices of r in counterclockwise order<br />

starting from the lower left point.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!