proj home

Files   Classes   Functions   Hierarchy  

d4grid Class Reference

#include <d4grid.h>

Inheritance diagram for d4grid:
Collaboration diagram for d4grid:

List of all members.

Public Member Functions

 d4grid (uintc _dimX, uintc _dimY, uintc _dimZ, realc x0, realc x1, realc y0, realc y1, realc z0, realc z1)
template<typename F >
void setf (F const &f)
void draw (realc cut=0.0) const


Detailed Description

Definition at line 24 of file d4grid.h.


Constructor & Destructor Documentation

d4grid::d4grid ( uintc  _dimX,
uintc  _dimY,
uintc  _dimZ,
realc  x0,
realc  x1,
realc  y0,
realc  y1,
realc  z0,
realc  z1 
)

Definition at line 80 of file d4grid.cpp.

00091   : d4tess(6*(_dimX+1)*(_dimY+1)*(_dimZ+1)),
00092   dimX(_dimX), dimY(_dimY), dimZ(_dimZ)
00093 {
00094   realc dx = 1.0/dimX;
00095   realc dy = 1.0/dimY;
00096   realc dz = 1.0/dimZ;
00097 
00098   realc xlen=x1-x0;
00099   realc ylen=y1-y0;
00100   realc zlen=z1-z0;
00101 
00102   unsigned int i,k,m;
00103 
00104   for (m=0; m<(dimZ+1); ++m)
00105     for (k=0; k<(dimY+1); ++k)
00106       for (i=0; i<(dimX+1); ++i)
00107       {
00108         pt.push_back( point4<real>(x0+i*dx*xlen,y0+k*dy*ylen,z0+m*dz*zlen,0.0) );
00109         //ptadd(x0+i*dx*xlen,y0+k*dy*ylen,z0+m*dz*zlen); 
00110         //add(i,k,m);
00111       }
00112 
00113 
00114   for (m=0; m<dimZ; ++m)
00115     for (k=0; k<dimY; ++k)
00116       for (i=0; i<dimX; ++i)
00117         add(i,k,m);
00118 
00119 
00120 }


Member Function Documentation

void d4grid::draw ( realc  cut = 0.0  )  const

Definition at line 127 of file d4grid.cpp.

00128 {
00129 
00130 //  d4tessdraw tetd(*this);
00131 
00132 cout << "Recode - code was broken." << endl;
00133 assert(false);
00134 
00135 //  tetd.draw(cut);
00136 
00137 //  uintc visz = vi.size();
00138 //  for (unsigned int i=0; i<visz; ++i)
00139 //    tetd.draw(i,cut);
00140 }

template<typename F >
void d4grid::setf ( F const &  f  )  [inline]

Definition at line 60 of file d4grid.h.

References d4tess::pt.

00061 {
00062   uint indx=0;
00063 
00064   uint i,k,m;
00065   for (m=0; m<(dimZ+1); ++m)
00066     for (k=0; k<(dimY+1); ++k)
00067       for (i=0; i<(dimX+1); ++i)
00068       {
00069         f(pt[indx].a,pt[indx].x,pt[indx].y,pt[indx].z);
00070         ++indx;
00071       }
00072 }


The documentation for this class was generated from the following files:

Generated on Fri Mar 4 00:49:54 2011 for Chelton Evans Source by  doxygen 1.5.8