00001
00002
00004
00005 #ifndef _RAYCAST_DATGRID_H_
00006 #define _RAYCAST_DATGRID_H_
00007
00008 #include "vuVector.h"
00009 #include "DatPnt.h"
00010
00011 class vu1112113;
00012
00013 namespace ns_vu1112113 {
00014
00015 class vuSampleRay;
00016
00023 class DatGrid
00024 {
00025 friend class vuSampleRay;
00026 public:
00028 void calculate_gradients();
00031 void shade(vu1112113 &r);
00034 bool copy_vol(byte* data, vu1112113 &r);
00036 int init(int maxx, int maxy, int maxz);
00037
00039 DatGrid();
00041 ~DatGrid();
00042
00043 protected:
00045 int get_vol_mem();
00047 int free_vol_mem();
00048
00049 int maxX, maxY, maxZ;
00050 int layXY;
00051 int size;
00052
00053 DatPnt *vol;
00054
00055 private:
00056 float clipRay(vuSampleRay &r, bool bidirectional, int& m_Side) const;
00057
00058 vuVector m_C0;
00059 vuVector m_C1;
00060 };
00061
00062 };
00063 #endif
00064