DRECT3D Struct Reference

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

#include <rect.h>

Inheritance diagram for DRECT3D:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 DRECT3D ()
 DRECT3D (const FPOINT3D &pt)
 DRECT3D (const DPOINT3D &pt)
 DRECT3D (const DRECT2D &rect)
 DRECT3D (const DRECT2D &rect, double zmin, double zmax)
DRECT3Doperator= (const DPOINT3D &pt)
bool Contains (const DPOINT3D &pt) const
bool Contains (const DRECT3D &rhs) const
void Expand (const double value)
void Expand (const double xval, const double yval)
void Extend (const double xval, const double yval)
void Extend (const double xval, const double yval, const double zval)
void Extend (const DRECT3D &rect)
void Extend (const DPOINT2D &pt)
void Extend (const DPOINT3D &pt)
DPOINT3D GetCenter () const
void GetCenter (DPOINT3D &ret) 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
bool Overlaps (const DRECT3D &rhs) const
void Set (double x1, double y1, double x2, double y2)
void SetInvalid ()
void SwapBytes ()
 CHECKSIZE (48)

Public Attributes

double zinit
double zlast

Detailed Description

3D rectangle using 'double' precision coordinates.

Definition at line 769 of file rect.h.


Constructor & Destructor Documentation

DRECT3D::DRECT3D  )  [inline]
 

Initialize to nonexistent area.

Definition at line 775 of file rect.h.

DRECT3D::DRECT3D const FPOINT3D pt  )  [inline]
 

Construct from FPOINT3D.

Definition at line 779 of file rect.h.

DRECT3D::DRECT3D const DPOINT3D pt  )  [inline]
 

Construct from DPOINT3D.

Definition at line 784 of file rect.h.

DRECT3D::DRECT3D const DRECT2D rect  )  [inline]
 

Construct from DRECT2D.

Definition at line 789 of file rect.h.

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

Construct from DRECT2D and Z min/max.

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

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

Check if point is inside.

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

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

Expand the rectangle by 'value' amount.

Reimplemented from DRECT2D.

Definition at line 821 of file rect.h.

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

Extend to contain specified point.

Definition at line 869 of file rect.h.

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

Extend to contain specified point.

Reimplemented from DRECT2D.

Definition at line 864 of file rect.h.

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

Union rectangles together, resulting rect is extents of both.

Definition at line 854 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 842 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 836 of file rect.h.

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

Return center of the box.

Definition at line 883 of file rect.h.

DPOINT3D DRECT3D::GetCenter  )  const [inline]
 

Return center of the box.

Reimplemented from DRECT2D.

Definition at line 879 of file rect.h.

double DRECT3D::GetDepth  )  const [inline]
 

Return depth of the box (z distance).

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

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

Get maximum coordinate.

Definition at line 905 of file rect.h.

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

Get minimum coordinate.

Definition at line 910 of file rect.h.

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

Get size of box.

Definition at line 915 of file rect.h.

double DRECT3D::GetVolume  )  const [inline]
 

Compute volume of box.

Definition at line 925 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 929 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 936 of file rect.h.

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

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

Definition at line 943 of file rect.h.

bool DRECT3D::IsValid  )  const [inline]
 

Check if rectangle is valid.

Reimplemented from DRECT2D.

Definition at line 958 of file rect.h.

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

Assignment from DPOINT3D.

Definition at line 801 of file rect.h.

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

Check if rectangle overlaps.

Definition at line 962 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 967 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 979 of file rect.h.

void DRECT3D::SwapBytes  )  [inline]
 

Perform byte-order swapping.

Reimplemented from DRECT2D.

Definition at line 983 of file rect.h.


Member Data Documentation

double DRECT3D::zinit
 

Definition at line 771 of file rect.h.

double DRECT3D::zlast
 

Definition at line 772 of file rect.h.


The documentation for this struct was generated from the following file:
Generated on Thu Aug 12 06:26:17 2004 for TNTsdk by doxygen 1.3.4-20031026