source:
orxonox.OLD/orxonox/trunk/src/array.h
@
3186
Last change on this file since 3186 was 3185, checked in by bensch, 20 years ago | |
---|---|
File size: 837 bytes |
Rev | Line | |
---|---|---|
[2853] | 1 | /*! |
2 | \file array.h | |
3 | \brief Contains the Array Class that handles float arrays. | |
4 | this class creates a Array of a semi-Dynamic length. | |
5 | beware, that after finalizing the array may not be resized again. | |
6 | */ | |
7 | ||
[2776] | 8 | #ifndef _ARRAY_H |
9 | #define _ARRAY_H | |
10 | ||
[2853] | 11 | extern int verbose; //!< will be obsolete soon |
[2804] | 12 | |
[3185] | 13 | #include "stdincl.h" |
[2823] | 14 | #include <fstream> |
[2853] | 15 | |
16 | ||
17 | //! Array Class that handles dynamic-float arrays. | |
[2754] | 18 | class Array |
19 | { | |
20 | public: | |
21 | Array (); | |
[2853] | 22 | ~Array(); |
[2754] | 23 | |
[2853] | 24 | void initializeArray (); |
[2754] | 25 | void finalizeArray (void); |
26 | void addEntry (GLfloat entry); | |
27 | void addEntry(GLfloat entry0, GLfloat entry1, GLfloat entry2); | |
28 | ||
29 | GLfloat* getArray (); | |
[2760] | 30 | int getCount(); |
[2758] | 31 | void debug(void); |
[2754] | 32 | private: |
[2807] | 33 | struct Entry |
34 | { | |
35 | GLfloat value; | |
36 | Entry* next; | |
37 | }; | |
38 | ||
[2754] | 39 | GLfloat* array; |
[2807] | 40 | int entryCount; |
[2809] | 41 | bool finalized; |
[2807] | 42 | Entry* firstEntry; |
43 | Entry* currentEntry; | |
44 | ||
45 | ||
[2754] | 46 | }; |
[2776] | 47 | |
48 | #endif |
Note: See TracBrowser
for help on using the repository browser.