#include <rect.h>
Inheritance diagram for DRECT2D:

Public Member Functions | |
| DRECT2D () | |
| DRECT2D (const FPOINT2D &pt) | |
| DRECT2D (const DPOINT2D &pt) | |
| DRECT2D (double xi, double yi, double xl, double yl) | |
| DRECT2D (const LRECT2D &rect) | |
| DRECT2D & | operator= (const DPOINT2D &pt) |
| DRECT2D & | operator= (const LRECT2D &rhs) |
| void | ClipTo (const DRECT2D &rect) |
| bool | ComputeEdgePoint (const DPOINT2D &OutsidePt, DPOINT2D &EdgePt) const |
| bool | Contains (double x, double y) const |
| bool | Contains (const DPOINT2D &pt) const |
| bool | Contains (const DRECT2D &rhs) const |
| void | Expand (const double value) |
| void | Expand (const double xval, const double yval) |
| void | Extend (const double xval, const double yval) |
| void | Extend (const DRECT2D &rect) |
| void | Extend (const DPOINT2D &pt) |
| double | GetArea () const |
| void | GetBottomLeft (DPOINT2D &ret) const |
| void | GetBottomRight (DPOINT2D &ret) const |
| DPOINT2D | GetCenter () const |
| void | GetCenter (DPOINT2D &ret) const |
| void | GetCorners (DPOINT2D *corners, bool ClosePoly=false, bool OrientCCW=false) const |
| void | GetCorners (DPOINT3D *corners, bool ClosePoly=false, bool OrientCCW=false) const |
| int | GetDimension () const |
| double | GetDistance (const DRECT2D &rect) const |
| double | GetHeight () const |
| double | GetMaxDistance (const DRECT2D &rect) const |
| double | GetMaxDistanceSquared (const DRECT2D &rect) const |
| void | GetRect (LRECT2D &rect) const |
| void | GetSize (DPOINT2D &ret) const |
| void | GetTopLeft (DPOINT2D &ret) const |
| void | GetTopRight (DPOINT2D &ret) const |
| double | GetWidth () const |
| bool | IniRead (INIHANDLE IniHandle, const char *IniGroup, const char *IniName) |
| bool | IniRead (INIHANDLE IniHandle, const char *IniGroup, const char *IniName, const DRECT2D &dft) |
| void | IniWrite (INIHANDLE IniHandle, const char *IniGroup, const char *IniName) const |
| void | Intersect (const DRECT2D &rect) |
| bool | IsEquivalentTo (const DRECT2D &rhs, double threshold=0.0) const |
| bool | IsValid () const |
| void | Limit (DPOINT2D &point) const |
| bool | Overlaps (const DRECT2D &rhs) const |
| void | Set (double x1, double y1, double x2, double y2) |
| void | SetInvalid () |
| void | SwapBytes () |
| CHECKSIZE (32) | |
Public Attributes | |
| double | xinit |
| double | yinit |
| double | xlast |
| double | ylast |
Definition at line 423 of file rect.h.
|
|
Default constructor, initialize to "invalid" area.
|
|
|
Construct from FPOINT2D (or FPOINT3D).
|
|
|
Construct from DPOINT2D (or DPOINT3D).
|
|
||||||||||||||||||||
|
|
|
|
Implicit conversion from LRECT2D.
|
|
|
Make compiler validate structure size.
|
|
|
Clip this rectangle to specified rectangle.
|
|
||||||||||||
|
Given the center point of the DRECT2D and the 'TestPt' which is outside the box, compute the point on the edge of the box which falls between the center point and the 'TestPt'.
|
|
|
Check if contains specified point.
|
|
|
Check if contains specified point.
|
|
||||||||||||
|
Check if contains specified point.
|
|
||||||||||||
|
Expand the rectangle by 'value' amount.
Reimplemented in DRECT3D. |
|
|
Expand the rectangle by 'value' amount.
Reimplemented in DRECT3D. |
|
|
Extend rectangle to include specified DPOINT2D point.
Reimplemented in DRECT3D. |
|
|
Extend rectangle to encompass both rectangles.
|
|
||||||||||||
|
Extend rectangle to include specified X,Y point.
Reimplemented in DRECT3D. |
|
|
Compute area of rectangle.
|
|
|
Return bottom left point of rectangle.
|
|
|
Return bottom right point of rectangle.
|
|
|
Return center point of rectangle.
|
|
|
Return center point of rectangle.
Reimplemented in DRECT3D. |
|
||||||||||||||||
|
Get corners as array.
|
|
||||||||||||||||
|
Get corners as array.
|
|
|
Compute number of non zero dimensions (0, 1, or 2).
Reimplemented in DRECT3D. |
|
|
Compute the distance between two disjoint rectangles.
|
|
|
Return height of rectangle.
|
|
|
Compute the maximum distance between two rectangles Uses Extend() and then computes the diagonal distance.
|
|
|
Compute the maximum distance between two rectangles Uses Extend() and then computes the diagonal distance.
|
|
|
Get the rectangle as an LRECT2D (with rounding).
|
|
|
Get size of rectangle.
|
|
|
Return top left point of rectangle.
|
|
|
Return top right point of rectangle.
|
|
|
Return width of rectangle.
|
|
||||||||||||||||||||
|
Read rectangle from INI file with default.
|
|
||||||||||||||||
|
Read rectangle from INI file.
Reimplemented in DRECT3D. |
|
||||||||||||||||
|
Read rectangle from INI file.
Reimplemented in DRECT3D. |
|
|
Intersect two DRECT2D's, may result in an invalid rectangle.
|
|
||||||||||||
|
Determine if the two rectangles are equivalent This method uses "Fuzzy" edge comparisons Specify a different threshold to allow greater distances.
|
|
|
Check if rectangle is valid.
Reimplemented in DRECT3D. |
|
|
Limit point to extents specified by rectangle.
|
|
|
Assignment from LRECT2D.
|
|
|
Assignment from DPOINT2D.
|
|
|
Check if rectangle overlaps.
|
|
||||||||||||||||||||
|
Set given (x1,y1), (x2,y2).
Reimplemented in DRECT3D. |
|
|
Sets the initial values to the maximum possible and the final values to the minimum possible, thus making the rectangle "invalid". Setting a rectangle to invalid means that no point will be in it. It also makes it easy to compute the min/max of a bunch of points. You just iterate through all the points and Extend() the rectangle. Normally, you'd have to handle the first point specially. Reimplemented in DRECT3D. |
|
|
Perform byte-order swapping.
Reimplemented in DRECT3D. |
|
|
Minimum X coordinate (inclusive).
|
|
|
Maximum X coordinate (inclusive).
|
|
|
Minimum Y coordinate (inclusive).
|
|
|
Maximum Y coordinate (inclusive).
|
1.3.4-20031026