C:/Projekte/InfoVIS/InfoVIS/LinearGrid.h

00001 #pragma once
00002 
00003 #include <cstdlib>
00004 #include <GL/glut.h>
00005 #include <complex>
00006 #include <vector>
00007 #include <iostream>
00008 
00009 //HACK
00010 #include "Texture.h"
00011 
00012 const double PI = 3.14159;
00013 
00014 typedef std::complex<double> Complex;
00015 typedef struct TexturedGrid {Complex complex; bool isCut; double uCoordinate; double vCoordinate; } TexturedGrid;
00016 typedef std::vector<TexturedGrid> ComplexVector;
00017 typedef std::vector<ComplexVector> ComplexGrid;
00018 
00019 typedef ComplexGrid::const_iterator GridIteratorConst;
00020 typedef ComplexVector::const_iterator VectorIteratorConst;
00021 
00022 class LinearGrid 
00023 {
00024 public:
00025         //LinearGrid(const unsigned int _gridWidth, const unsigned int _gridHeight);
00026         LinearGrid(const unsigned int _gridSize);
00027         ~LinearGrid(void);
00028 
00029         //HACK
00030         void Draw();
00031 
00032         unsigned int GetSize() const {return gridSize; }
00033 
00034         const Texture* GetTexture() const;
00035 
00036         const ComplexGrid GetGrid() const { return linearGrid; }
00037 
00038 private:
00039         void SetVector(TexturedGrid _tg);
00040         void SetGrid(void);
00041 
00042 private:
00043         ComplexVector linearVector;     // row vector
00044         ComplexGrid linearGrid; // row/col-vector
00045 
00046         unsigned int gridSize;
00047         static const double eps;
00048 
00049         Texture* texture;
00050 };

Generated on Wed Jun 27 10:14:23 2007 for CLV by  doxygen 1.5.2