3D rectangle using 'double' precision coordinates. More...
#include <mi32/rect.h>

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