DRECT3D Struct Reference

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

#include <mi32/rect.h>

Inheritance diagram for DRECT3D:

Inheritance graph
DRECT2D
[legend]
List of all members.

Public Member Functions

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 841 of file rect.h.


Constructor & Destructor Documentation

DRECT3D::DRECT3D (  )  [inline]

Initialize to nonexistent area.

Definition at line 847 of file rect.h.

DRECT3D::DRECT3D ( const FPOINT3D pt  )  [inline]

Construct from FPOINT3D.

Definition at line 851 of file rect.h.

DRECT3D::DRECT3D ( const DPOINT3D pt  )  [inline]

Construct from DPOINT3D.

Definition at line 856 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 863 of file rect.h.

DRECT3D::DRECT3D ( const DRECT2D rect  )  [inline]

Construct from DRECT2D.

Definition at line 894 of file rect.h.

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

Construct from DRECT2D and Z min/max.

Definition at line 899 of file rect.h.


Member Function Documentation

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

Check if rectangle is inside.

Definition at line 921 of file rect.h.

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

Check if point is inside.

Definition at line 916 of file rect.h.

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

Expand rectangle by specified amounts.

Reimplemented from DRECT2D.

Definition at line 935 of file rect.h.

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

Expand rectangle by specified amount.

Reimplemented from DRECT2D.

Definition at line 926 of file rect.h.

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

Extend to contain specified point.

Definition at line 974 of file rect.h.

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

Extend to contain specified point.

Reimplemented from DRECT2D.

Definition at line 969 of file rect.h.

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

Union rectangles together, resulting rect is extents of both.

Definition at line 959 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 947 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 941 of file rect.h.

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

Return center of the box.

Definition at line 988 of file rect.h.

DPOINT3D DRECT3D::GetCenter (  )  const [inline]

Return center of the box.

Reimplemented from DRECT2D.

Definition at line 984 of file rect.h.

double DRECT3D::GetDepth (  )  const [inline]

Return depth of the box (z distance).

Definition at line 998 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 1002 of file rect.h.

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

Get maximum coordinate.

Definition at line 1010 of file rect.h.

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

Get minimum coordinate.

Definition at line 1015 of file rect.h.

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

Get size of box.

Definition at line 1020 of file rect.h.

double DRECT3D::GetVolume (  )  const [inline]

Compute volume of box.

Definition at line 1030 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 1034 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 1041 of file rect.h.

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

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

Definition at line 1048 of file rect.h.

bool DRECT3D::IsValid (  )  const [inline]

Check if rectangle is valid.

Reimplemented from DRECT2D.

Definition at line 1063 of file rect.h.

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

Assignment from DPOINT3D.

Definition at line 906 of file rect.h.

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

Check if rectangle overlaps.

Definition at line 1067 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 1072 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 1084 of file rect.h.

void DRECT3D::SwapBytes (  )  [inline]

Perform byte-order swapping.

Reimplemented from DRECT2D.

Definition at line 1088 of file rect.h.


Member Data Documentation

double DRECT3D::zinit

Definition at line 843 of file rect.h.

double DRECT3D::zlast

Definition at line 844 of file rect.h.


The documentation for this struct was generated from the following file:
Generated on Thu Apr 26 04:11:33 2007 for TNTsdk by  doxygen 1.5.2