3D box using INT32 coordinates. More...
#include <mi32/rect.h>

Public Member Functions | |
| LRECT3D (const LRECT2D &rect, INT32 zmin, INT32 zmax) | |
| LRECT3D (const LRECT2D &rect) | |
| LRECT3D (const LPOINT3D &pt1, const LPOINT3D &pt2) | |
| LRECT3D (const LPOINT3D &pt) | |
| LRECT3D () | |
| bool | Contains (const LRECT3D &rhs) const |
| bool | Contains (const LPOINT3D &pt) const |
| void | Expand (const INT32 xval, const INT32 yval) |
| void | Expand (const INT32 value) |
| void | Extend (const LPOINT3D &pt) |
| void | Extend (const LPOINT2D &pt) |
| void | Extend (const LRECT3D &rect) |
| void | Extend (const INT32 xval, const INT32 yval, const INT32 zval) |
| void | Extend (const INT32 xval, const INT32 yval) |
| void | GetCenter (DPOINT3D &ret) const |
| DPOINT3D | GetCenter () const |
| INT32 | GetDepth () const |
| int | GetDimension () const |
| void | GetMaximum (LPOINT3D &maximum) const |
| void | GetMinimum (LPOINT3D &minimum) const |
| void | GetSize (LPOINT3D &ret) const |
| INT32 | GetVolume () const |
| bool | IniRead (INIHANDLE IniHandle, const char *IniGroup, const char *IniName) |
| void | IniWrite (INIHANDLE IniHandle, const char *IniGroup, const char *IniName) const |
| void | Intersect (const LRECT3D &rect) |
| bool | IsValid () const |
| LRECT3D & | operator= (const LPOINT3D &pt) |
| bool | Overlaps (const LRECT3D &rhs) const |
| void | Set (INT32 xmin, INT32 ymin, INT32 zmin, INT32 xmax, INT32 ymax, INT32 zmax) |
| void | Set (INT32 x1, INT32 y1, INT32 x2, INT32 y2) |
| void | SetInvalid () |
| void | SwapBytes () |
Public Attributes | |
| INT32 | zinit |
| INT32 | zlast |
3D box using INT32 coordinates.
| LRECT3D::LRECT3D | ( | ) | [inline] |
Initialize to nonexistent area.
Construct from two LPOINT3D's A regular ctor from LPOINT3D and then a call to Extend(LPOINT3D&) would use 9 assignments and 6 comparisons, this uses 3 compares and 6 assignments.
Construct from LRECT2D and Z min/max.
| bool LRECT3D::Contains | ( | const LRECT3D & | rhs | ) | const [inline] |
Check if rectangle is inside.
Reimplemented from LRECT2D.
| bool LRECT3D::Contains | ( | const LPOINT3D & | pt | ) | const [inline] |
Check if point is inside.
Expand rectangle by specified amounts.
Reimplemented from LRECT2D.
| void LRECT3D::Expand | ( | const INT32 | value | ) | [inline] |
Expand rectangle by specified amount.
Reimplemented from LRECT2D.
| void LRECT3D::Extend | ( | const LPOINT3D & | pt | ) | [inline] |
Extend to contain specified point.
| void LRECT3D::Extend | ( | const LPOINT2D & | pt | ) | [inline] |
Extend to contain specified point.
Reimplemented from LRECT2D.
| void LRECT3D::Extend | ( | const LRECT3D & | rect | ) | [inline] |
Union rectangles together, resulting rect is extents of both.
Reimplemented from LRECT2D.
Extend rectangle to encompass both rectangles.
Extend rectangle to encompass both rectangles.
Reimplemented from LRECT2D.
| void LRECT3D::GetCenter | ( | DPOINT3D & | ret | ) | const [inline] |
Return center of the box.
| DPOINT3D LRECT3D::GetCenter | ( | ) | const [inline] |
Return center of the box.
Reimplemented from LRECT2D.
| INT32 LRECT3D::GetDepth | ( | ) | const [inline] |
Return depth of the box (z distance).
| int LRECT3D::GetDimension | ( | ) | const [inline] |
Compute number of non zero dimensions (0, 1, 2, or 3).
Reimplemented from LRECT2D.
| void LRECT3D::GetMaximum | ( | LPOINT3D & | maximum | ) | const [inline] |
Get maximum coordinate.
| void LRECT3D::GetMinimum | ( | LPOINT3D & | minimum | ) | const [inline] |
Get minimum coordinate.
| void LRECT3D::GetSize | ( | LPOINT3D & | ret | ) | const [inline] |
Get size of box.
| INT32 LRECT3D::GetVolume | ( | ) | const [inline] |
Compute volume of box.
| bool LRECT3D::IniRead | ( | INIHANDLE | IniHandle, | |
| const char * | IniGroup, | |||
| const char * | IniName | |||
| ) | [inline] |
Read rectangle from INI file.
Reimplemented from LRECT2D.
| void LRECT3D::IniWrite | ( | INIHANDLE | IniHandle, | |
| const char * | IniGroup, | |||
| const char * | IniName | |||
| ) | const [inline] |
Read rectangle from INI file.
Reimplemented from LRECT2D.
| void LRECT3D::Intersect | ( | const LRECT3D & | rect | ) | [inline] |
Intersect two LRECT3D's, may result in an invalid rectangle.
Reimplemented from LRECT2D.
| bool LRECT3D::IsValid | ( | ) | const [inline] |
Check if rectangle is valid.
Reimplemented from LRECT2D.
| bool LRECT3D::Overlaps | ( | const LRECT3D & | rhs | ) | const [inline] |
Check if rectangle overlaps.
Reimplemented from LRECT2D.
| void LRECT3D::Set | ( | INT32 | xmin, | |
| INT32 | ymin, | |||
| INT32 | zmin, | |||
| INT32 | xmax, | |||
| INT32 | ymax, | |||
| INT32 | zmax | |||
| ) | [inline] |
Set given (xmin,ymin,zmin), (xmax,ymax,zmax).
Set given (x1,y1), (x2,y2).
Reimplemented from LRECT2D.
| void LRECT3D::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 from LRECT2D.
| void LRECT3D::SwapBytes | ( | ) | [inline] |
Perform byte-order swapping.
Reimplemented from LRECT2D.
1.6.1