ColGridObj.h

00001 //---------------------------------------------------------------------------
00002 //                              GridObj
00003 //---------------------------------------------------------------------------
00004 //  Copyright (C):
00005 //---------------------------------------------------------------------------
00006 
00007 
00008 #ifndef GridObj_H
00009 #define GridObj_H
00010 #if defined(__sgi) || defined(_WIN32)
00011 #pragma once
00012 #endif
00013 
00014 
00015 //---------------------------------------------------------------------------
00016 //  Includes
00017 //---------------------------------------------------------------------------
00018 
00019 #include <vector>
00020 
00021 #include <col_import_export.h>
00022 
00023 
00024 namespace col {
00025 
00026 //---------------------------------------------------------------------------
00027 //  Forward References
00028 //---------------------------------------------------------------------------
00029 
00030 class Grid;
00031 class ColObj;
00032 class ColPair;
00033 
00034 
00035 //---------------------------------------------------------------------------
00036 //  GridObj
00037 //---------------------------------------------------------------------------
00038 
00039 class COL_EXPORTIMPORT GridObj
00040 {
00041 
00042 public:
00043 
00044 //---------------------------------------------------------------------------
00045 //  Public Instance methods
00046 //---------------------------------------------------------------------------
00047 
00048     GridObj( Grid* grid, ColObj* data,
00049              float min[3] = NULL, float max[3] = NULL );
00050 
00051     virtual ~GridObj();
00052 
00053     void moveTo( const float min[3], const float max[3] );
00054 
00055     void setObjTestCycle( unsigned int n )
00056     { m_objTestCycle = n; }
00057 
00058 
00059     void findCollPartners( vector<ColPair> *collPairs,
00060                            unsigned int *neighbors,
00061                            unsigned int collTestCycle,
00062                            unsigned int objTestCycle );
00063 
00064 
00065     void setColObj( ColObj* obj)
00066     { m_colObj = obj; }
00067 
00068     unsigned int  getCollTestCycle( void ) const
00069     { return( m_collTestCycle ); }
00070 
00071     unsigned int  getObjTestCycle( void ) const
00072     { return( m_objTestCycle ); }
00073 
00074     ColObj* getColObj( void ) const
00075     { return  m_colObj; }
00076 
00077     void getBounds( unsigned int min[3], unsigned int max[3] );
00078 
00079 
00080 //---------------------------------------------------------------------------
00081 //  Instance variables
00082 //---------------------------------------------------------------------------
00083 
00084 protected:
00085 
00087     unsigned int    m_min[3], m_max[3];
00088 
00090     ColObj*         m_colObj;
00091 
00092     Grid*   m_grid;
00093     unsigned int    m_collTestCycle;
00094     unsigned int    m_objTestCycle;
00095 
00096 
00097 private:
00098 
00099 //---------------------------------------------------------------------------
00100 //  Private Instance methods
00101 //---------------------------------------------------------------------------
00102 
00103     GridObj( const GridObj &source );
00104     GridObj operator = ( const GridObj source );
00105 };
00106 
00107 
00108 }   //  namespace col
00109 
00110 
00111 #endif /* GridObj_H */
00112 

Generated on Tue Oct 16 18:12:21 2007 for CollDet by  doxygen 1.5.2