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

Public Member Functions | |
| CHECKSIZE (32) | |
| void | ClipTo (const DRECT2D &rect) |
| bool | ComputeEdgePoint (const DPOINT2D &OutsidePt, DPOINT2D &EdgePt) const |
| bool | Contains (const DRECT2D &rhs) const |
| bool | Contains (const DPOINT2D &pt) const |
| bool | Contains (double x, double y) const |
| DRECT2D (const LRECT2D &rect) | |
| DRECT2D (double xi, double yi, double xl, double yl) | |
| DRECT2D (const DPOINT2D &pt1, const DPOINT2D &pt2) | |
| DRECT2D (const DPOINT2D &pt) | |
| DRECT2D (const FPOINT2D &pt) | |
| DRECT2D () | |
| void | Expand (const double xval, const double yval) |
| void | Expand (const double value) |
| void | Extend (const DPOINT2D &pt) |
| void | Extend (const DRECT2D &rect) |
| void | Extend (const double xval, const double yval) |
| double | GetArea () const |
| void | GetBottomLeft (DPOINT2D &ret) const |
| void | GetBottomRight (DPOINT2D &ret) const |
| void | GetCenter (DPOINT2D &ret) const |
| DPOINT2D | GetCenter () const |
| void | GetCorners (DPOINT3D *corners, bool ClosePoly=false, bool OrientCCW=false) const |
| void | GetCorners (DPOINT2D *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 | GetRectTruncate (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, const DRECT2D &dft) |
| bool | IniRead (INIHANDLE IniHandle, const char *IniGroup, const char *IniName) |
| 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 |
| DRECT2D & | operator= (const LRECT2D &rhs) |
| DRECT2D & | operator= (const DPOINT2D &pt) |
| bool | Overlaps (const DRECT2D &rhs) const |
| void | Set (double x1, double y1, double x2, double y2) |
| void | SetInvalid () |
| void | SwapBytes () |
Public Attributes | |
| double | xinit |
| double | xlast |
| double | yinit |
| double | ylast |
Definition at line 455 of file rect.h.
| DRECT2D::DRECT2D | ( | ) | [inline] |
| DRECT2D::DRECT2D | ( | const FPOINT2D & | pt | ) | [inline] |
| DRECT2D::DRECT2D | ( | const DPOINT2D & | pt | ) | [inline] |
| DRECT2D::DRECT2D | ( | double | xi, | |
| double | yi, | |||
| double | xl, | |||
| double | yl | |||
| ) | [inline] |
| DRECT2D::DRECT2D | ( | const LRECT2D & | rect | ) | [inline] |
| DRECT2D::CHECKSIZE | ( | 32 | ) |
Make compiler validate structure size.
| void DRECT2D::ClipTo | ( | const DRECT2D & | rect | ) | [inline] |
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'.
| OutsidePt | Point outside of 'this' |
| EdgePt | Point on the rectangle edge RETURNED if 'true' returned, center of the box if 'false' is returned |
| bool DRECT2D::Contains | ( | const DRECT2D & | rhs | ) | const [inline] |
| bool DRECT2D::Contains | ( | const DPOINT2D & | pt | ) | const [inline] |
| bool DRECT2D::Contains | ( | double | x, | |
| double | y | |||
| ) | const [inline] |
| void DRECT2D::Expand | ( | const double | xval, | |
| const double | yval | |||
| ) | [inline] |
| void DRECT2D::Expand | ( | const double | value | ) | [inline] |
| void DRECT2D::Extend | ( | const DPOINT2D & | pt | ) | [inline] |
| void DRECT2D::Extend | ( | const DRECT2D & | rect | ) | [inline] |
| void DRECT2D::Extend | ( | const double | xval, | |
| const double | yval | |||
| ) | [inline] |
| double DRECT2D::GetArea | ( | ) | const [inline] |
| void DRECT2D::GetBottomLeft | ( | DPOINT2D & | ret | ) | const [inline] |
| void DRECT2D::GetBottomRight | ( | DPOINT2D & | ret | ) | const [inline] |
| void DRECT2D::GetCenter | ( | DPOINT2D & | ret | ) | const [inline] |
| DPOINT2D DRECT2D::GetCenter | ( | ) | const [inline] |
| void DRECT2D::GetCorners | ( | DPOINT3D * | corners, | |
| bool | ClosePoly = false, |
|||
| bool | OrientCCW = false | |||
| ) | const [inline] |
| void DRECT2D::GetCorners | ( | DPOINT2D * | corners, | |
| bool | ClosePoly = false, |
|||
| bool | OrientCCW = false | |||
| ) | const [inline] |
| int DRECT2D::GetDimension | ( | ) | const [inline] |
| double DRECT2D::GetDistance | ( | const DRECT2D & | rect | ) | const [inline] |
| double DRECT2D::GetHeight | ( | ) | const [inline] |
| double DRECT2D::GetMaxDistance | ( | const DRECT2D & | rect | ) | const [inline] |
| double DRECT2D::GetMaxDistanceSquared | ( | const DRECT2D & | rect | ) | const [inline] |
| void DRECT2D::GetRect | ( | LRECT2D & | rect | ) | const [inline] |
| void DRECT2D::GetRectTruncate | ( | LRECT2D & | rect | ) | const [inline] |
| void DRECT2D::GetSize | ( | DPOINT2D & | ret | ) | const [inline] |
| void DRECT2D::GetTopLeft | ( | DPOINT2D & | ret | ) | const [inline] |
| void DRECT2D::GetTopRight | ( | DPOINT2D & | ret | ) | const [inline] |
| double DRECT2D::GetWidth | ( | ) | const [inline] |
| bool DRECT2D::IniRead | ( | INIHANDLE | IniHandle, | |
| const char * | IniGroup, | |||
| const char * | IniName | |||
| ) | [inline] |
| void DRECT2D::IniWrite | ( | INIHANDLE | IniHandle, | |
| const char * | IniGroup, | |||
| const char * | IniName | |||
| ) | const [inline] |
| void DRECT2D::Intersect | ( | const DRECT2D & | rect | ) | [inline] |
| bool DRECT2D::IsEquivalentTo | ( | const DRECT2D & | rhs, | |
| double | threshold = 0.0 | |||
| ) | const [inline] |
Determine if the two rectangles are equivalent This method uses "Fuzzy" edge comparisons Specify a different threshold to allow greater distances.
| threshold | Default threshold is max absolute value of rectangle coordinate * 1.0E-13 |
| bool DRECT2D::IsValid | ( | ) | const [inline] |
| void DRECT2D::Limit | ( | DPOINT2D & | point | ) | const [inline] |
| bool DRECT2D::Overlaps | ( | const DRECT2D & | rhs | ) | const [inline] |
| void DRECT2D::Set | ( | double | x1, | |
| double | y1, | |||
| double | x2, | |||
| double | y2 | |||
| ) | [inline] |
| void DRECT2D::SetInvalid | ( | ) | [inline] |
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.
| void DRECT2D::SwapBytes | ( | ) | [inline] |
| double DRECT2D::xinit |
| double DRECT2D::xlast |
| double DRECT2D::yinit |
| double DRECT2D::ylast |
1.5.2