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

Raycast/vuSampleRay.h

Go to the documentation of this file.
00001 #ifndef _VUSAMPLERAY_H_
00002 #define _VUSAMPLERAY_H_
00003 
00004 #include "vuVector.h"
00005 #include "vuRay.h"
00006 #include "DatGrid.h"
00007 #include "DatPnt.h"
00008 
00009 namespace ns_vu1112113 {
00010 
00012 
00016 class vuSampleRay : public vuRay
00017 {
00018     friend class DatGrid;
00019 public:
00021     vuSampleRay();
00022     vuSampleRay(const vuSampleRay &r);    
00023     vuSampleRay(const vuRay &r);    
00024     ~vuSampleRay();               
00025 
00026     void SamplingDistance(float sd);    
00027     float SamplingDistance() const;             
00028 
00030     vuSampleRay& operator=(vuSampleRay &rhs);
00031 
00032     bool advanceRay();
00033 
00037     float getSamplePoint(DatPnt& dat, bool getnormal = true) const;
00038 
00039     bool attachToGrid(const DatGrid& grid);
00040     
00041 protected:
00042     float         m_SmpDist;                    
00043 
00044     const DatGrid *m_Grid;                      
00045     int           grid_index;
00046     int           gridPos[3];                   
00047     int           axis[3];                      
00048     int           step[3];                      
00049     float         incr[2][2];                   
00050     float         dist[3];                      
00051     int           maxSmp, numSmp;               
00052 
00053     int           m_Side, m_InSide;             
00054 
00055     int                 steps;                  // number of samples until leaving the grid
00056     
00057     DatPnt              *cell[8];
00058     float               w[8];                   // weights for triliniar interpolation
00059     int                 p[3];                   // indexed position in the grid (for cell[0])
00060     float               t[3];                   // components are between 0 and 1
00061 };
00062 
00063 };
00064 
00065 #endif

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