Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Spectral/DatGrid.h

Go to the documentation of this file.
00001 // DatGrid.h
00002 //
00004 
00005 #ifndef _SPECTRAL_DATGRID_H_
00006 #define _SPECTRAL_DATGRID_H_
00007 
00008 #include "Util.h"
00009 #include "DatPnt.h"
00010 
00011 namespace ns_vu1112112 {
00012 using namespace ns_vu1112112;
00013 
00014 class vuSampleRay;
00015 class vu1112112;
00016 
00023 class DatGrid  
00024 {
00025   friend class vuSampleRay;
00026 public:
00028         void calculate_gradients();
00031         void shade(vu1112112 &r);
00035         void classify(vu1112112 &r);
00038         bool load_vol(byte* data, vu1112112 &r);
00040         void createSphere();
00042         int init(int maxx, int maxy, int maxz);
00043         
00045         DatGrid();
00047         ~DatGrid();
00048 
00049  protected:
00051         int get_vol_mem();
00053         int free_vol_mem();
00054 
00055         int maxX, maxY, maxZ;                   
00056         int layXY;                              
00057         int size;                               
00058 
00059         void distributeIllum(ColourType &il);
00060 
00061         DatPnt  *vol;                   // linear array for the grid points
00062 
00063 private:
00064         float clipRay(vuSampleRay &r, bool bidirectional, int& m_Side) const;
00065 
00066         vuVector m_C0;          // The smaller corner of the cube
00067         vuVector m_C1;          // The larger corner of the cube
00068 };
00069 
00070 } // end of namespace
00071 #endif
00072 

Generated on Wed Dec 15 21:20:28 2004 for vuVolume by  doxygen 1.3.9.1