Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

SL_Grid.h

Go to the documentation of this file.
00001 // SL_Grid.h: interface for the SL_Grid class.
00002 //
00004 
00005 #if !defined(AFX_SL_GRID_H__155DC654_3FD2_4C29_9DD3_D3A91876C7FA__INCLUDED_)
00006 #define AFX_SL_GRID_H__155DC654_3FD2_4C29_9DD3_D3A91876C7FA__INCLUDED_
00007 
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011 
00012 #include <vector>
00013 //#include "SL_struct.h"
00014 #include "SL_GridCell.h"
00015 
00016 #include "GlobalState.h"
00017 
00018 using namespace std;
00019 
00020 class SL_StreamLine;
00021 
00022 class SL_Grid  
00023 {
00024 public:
00025         SL_Grid();
00026         SL_Grid(CGlobalState* refGlobal);
00027         virtual ~SL_Grid();
00028 
00029         bool AddDot( const Vec2f dotPtr );
00030 
00031         //void SetCellSize( float fSet);
00032 
00033         float GetCellSize() { return this->fCellSize;};
00034 
00035         void SetWidthHeight( float fWidth, float fHeight, float fDsep );
00036 
00037         int GetNumerElements_Grid() {return iElementsCell;};
00038 
00039         bool AllowSetPoint_AskNeibour( const Vec2f dotPtr );
00040         
00041         //bool AllowSetPoint_AddPoint( Vec2f dotPtr );
00042 
00043         void toString();
00044 
00045 protected:
00049         //bool AllowSetPoint( const Vec2f dotPtr, int &indexInDataArray);
00050         bool AllowSetPoint( const Vec2f dotPtr, 
00051                 int indexX, int indexY, int iGridIndex1D );
00052 
00053         bool AllowSetPoint( const Vec2f dotPtr, 
00054                                         int indexX, int indexY );
00055 
00056 public:
00057         vector< SL_GridCell > v_grid;
00058         
00059         float fWidthX;
00060         float fHeightY;
00061 
00062 private:
00063         float fCellSize;
00064         float m_fCellSizeSqr;
00065         int iWidthX;
00066         int iHeightY;
00067 
00068         int iElementsCell;
00069 
00070         CGlobalState* refGlobalState;
00071         // Copy of the values from globalstate->data etc.
00072         float fminXposCopy;  
00073         float fminYposCopy;
00074         float fmaxXposCopy;
00075         float fmaxYposCopy;
00076 };
00077 
00078 #endif // !defined(AFX_SL_GRID_H__155DC654_3FD2_4C29_9DD3_D3A91876C7FA__INCLUDED_)

Generated on Thu Jan 23 04:30:11 2003 for FlowVis- vector field in 2D by doxygen1.3-rc2