source:
orxonox.OLD/trunk/src/lib/graphics/importer/grid.h
@
6492
Last change on this file since 6492 was 6458, checked in by bensch, 19 years ago | |
---|---|
File size: 900 bytes |
Rev | Line | |
---|---|---|
[4838] | 1 | /*! |
[6446] | 2 | * @file grid.h |
[4838] | 3 | * @brief Definition of ... |
[3245] | 4 | */ |
[1853] | 5 | |
[6446] | 6 | #ifndef _GRID_H |
7 | #define _GRID_H | |
[1853] | 8 | |
[6446] | 9 | #include "vertex_array_model.h" |
[1853] | 10 | |
[4838] | 11 | // FORWARD DECLARATION |
[3543] | 12 | |
13 | ||
[2036] | 14 | |
[3955] | 15 | //! A class for ... |
[6446] | 16 | class Grid : public VertexArrayModel |
17 | { | |
[1853] | 18 | |
[6446] | 19 | public: |
20 | Grid(float sizeX, float sizeY, unsigned int resolutionX, unsigned int resolutionY); | |
21 | virtual ~Grid(); | |
[1853] | 22 | |
[6446] | 23 | float sizeX() const { return this->_sizeX; }; |
24 | float sizeY() const { return this->_sizeY; }; | |
25 | unsigned int rows() const { return this->_rows; }; | |
26 | unsigned int columns() const { return this->_columns; }; | |
[3245] | 27 | |
[6457] | 28 | float& height(unsigned int row, unsigned int column) { return this->vertex(row*this->_columns + column).y;}; |
[6446] | 29 | |
[6457] | 30 | |
[6458] | 31 | void rebuildNormals(float maxHeight); |
[6457] | 32 | |
[6446] | 33 | private: |
34 | float _sizeX; | |
35 | float _sizeY; | |
36 | ||
[6458] | 37 | float _gridSpacingX; |
38 | float _gridSpacingY; | |
39 | ||
[6446] | 40 | unsigned int _rows; |
41 | unsigned int _columns; | |
[1853] | 42 | }; |
43 | ||
[6446] | 44 | #endif /* _GRID_H */ |
Note: See TracBrowser
for help on using the repository browser.