DRECT3D Struct Reference

3D rectangle using 'double' precision coordinates. More...

#include <mi32/rect.h>

Inheritance diagram for DRECT3D:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 CHECKSIZE (48)
bool Contains (const DRECT3D &rhs) const
bool Contains (const DPOINT3D &pt) const
 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 ()
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
DRECT3Doperator= (const DPOINT3D &pt)
bool Overlaps (const DRECT3D &rhs) const
void Set (double x1, double y1, double x2, double y2)
void SetInvalid ()
void SwapBytes ()

Public Attributes

double zinit
double zlast

Detailed Description

3D rectangle using 'double' precision coordinates.

Definition at line 835 of file rect.h.


Constructor & Destructor Documentation

DRECT3D::DRECT3D  )  [inline]
 

Initialize to nonexistent area.

Definition at line 841 of file rect.h.

DRECT3D::DRECT3D const FPOINT3D pt  )  [inline]
 

Construct from FPOINT3D.

Definition at line 845 of file rect.h.

DRECT3D::DRECT3D const DPOINT3D pt  )  [inline]
 

Construct from DPOINT3D.

Definition at line 850 of file rect.h.

DRECT3D::DRECT3D const DPOINT3D pt1,
const DPOINT3D pt2
[inline]
 

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.

Definition at line 857 of file rect.h.

DRECT3D::DRECT3D const DRECT2D rect  )  [inline]
 

Construct from DRECT2D.

Definition at line 888 of file rect.h.

DRECT3D::DRECT3D const DRECT2D rect,
double  zmin,
double  zmax
[inline]
 

Construct from DRECT2D and Z min/max.

Definition at line 893 of file rect.h.


Member Function Documentation

DRECT3D::CHECKSIZE 48   ) 
 

Make compiler validate structure size.

bool DRECT3D::Contains const DRECT3D rhs  )  const [inline]
 

Check if rectangle is inside.

Definition at line 915 of file rect.h.

bool DRECT3D::Contains const DPOINT3D pt  )  const [inline]
 

Check if point is inside.

Definition at line 910 of file rect.h.

void DRECT3D::Expand const double  xval,
const double  yval
[inline]
 

Expand the rectangle by 'value' amount.

Reimplemented from DRECT2D.

Definition at line 929 of file rect.h.

void DRECT3D::Expand const double  value  )  [inline]
 

Expand the rectangle by 'value' amount.

Reimplemented from DRECT2D.

Definition at line 920 of file rect.h.

void DRECT3D::Extend const DPOINT3D pt  )  [inline]
 

Extend to contain specified point.

Definition at line 968 of file rect.h.

void DRECT3D::Extend const DPOINT2D pt  )  [inline]
 

Extend to contain specified point.

Reimplemented from DRECT2D.

Definition at line 963 of file rect.h.

void DRECT3D::Extend const DRECT3D rect  )  [inline]
 

Union rectangles together, resulting rect is extents of both.

Definition at line 953 of file rect.h.

void DRECT3D::Extend const double  xval,
const double  yval,
const double  zval
[inline]
 

Extend rectangle to encompass both rectangles.

Definition at line 941 of file rect.h.

void DRECT3D::Extend const double  xval,
const double  yval
[inline]
 

Extend rectangle to encompass both rectangles.

Reimplemented from DRECT2D.

Definition at line 935 of file rect.h.

void DRECT3D::GetCenter DPOINT3D ret  )  const [inline]
 

Return center of the box.

Definition at line 982 of file rect.h.

DPOINT3D DRECT3D::GetCenter  )  const [inline]
 

Return center of the box.

Reimplemented from DRECT2D.

Definition at line 978 of file rect.h.

double DRECT3D::GetDepth  )  const [inline]
 

Return depth of the box (z distance).

Definition at line 992 of file rect.h.

int DRECT3D::GetDimension  )  const [inline]
 

Compute number of non zero dimensions (0, 1, 2, or 3).

Reimplemented from DRECT2D.

Definition at line 996 of file rect.h.

void DRECT3D::GetMaximum DPOINT3D maximum  )  const [inline]
 

Get maximum coordinate.

Definition at line 1004 of file rect.h.

void DRECT3D::GetMinimum DPOINT3D minimum  )  const [inline]
 

Get minimum coordinate.

Definition at line 1009 of file rect.h.

void DRECT3D::GetSize DPOINT3D ret  )  const [inline]
 

Get size of box.

Definition at line 1014 of file rect.h.

double DRECT3D::GetVolume  )  const [inline]
 

Compute volume of box.

Definition at line 1024 of file rect.h.

bool DRECT3D::IniRead INIHANDLE  IniHandle,
const char *  IniGroup,
const char *  IniName
[inline]
 

Read rectangle from INI file.

Reimplemented from DRECT2D.

Definition at line 1028 of file rect.h.

void DRECT3D::IniWrite INIHANDLE  IniHandle,
const char *  IniGroup,
const char *  IniName
const [inline]
 

Read rectangle from INI file.

Reimplemented from DRECT2D.

Definition at line 1035 of file rect.h.

void DRECT3D::Intersect const DRECT3D rect  )  [inline]
 

Intersect two DRECT3D's, may result in an invalid rectangle.

Definition at line 1042 of file rect.h.

bool DRECT3D::IsValid  )  const [inline]
 

Check if rectangle is valid.

Reimplemented from DRECT2D.

Definition at line 1057 of file rect.h.

DRECT3D& DRECT3D::operator= const DPOINT3D pt  )  [inline]
 

Assignment from DPOINT3D.

Definition at line 900 of file rect.h.

bool DRECT3D::Overlaps const DRECT3D rhs  )  const [inline]
 

Check if rectangle overlaps.

Definition at line 1061 of file rect.h.

void DRECT3D::Set double  x1,
double  y1,
double  x2,
double  y2
[inline]
 

Set given (x1,y1), (x2,y2).

Reimplemented from DRECT2D.

Definition at line 1066 of file rect.h.

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.

Definition at line 1078 of file rect.h.

void DRECT3D::SwapBytes  )  [inline]
 

Perform byte-order swapping.

Reimplemented from DRECT2D.

Definition at line 1082 of file rect.h.


Member Data Documentation

double DRECT3D::zinit
 

Definition at line 837 of file rect.h.

double DRECT3D::zlast
 

Definition at line 838 of file rect.h.


The documentation for this struct was generated from the following file:
Generated on Tue Dec 14 13:19:42 2004 for TNTsdk by  doxygen 1.3.8-20040913