source:
orxonox.OLD/orxonox/branches/sound/src/array.h
@
2964
Last change on this file since 2964 was 2964, checked in by bensch, 20 years ago | |
---|---|
File size: 855 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 | |
[2773] | 13 | #include <GL/gl.h> |
14 | #include <GL/glu.h> | |
[2823] | 15 | #include <fstream> |
[2853] | 16 | |
17 | ||
18 | //! Array Class that handles dynamic-float arrays. | |
[2754] | 19 | class Array |
20 | { | |
21 | public: | |
22 | Array (); | |
[2853] | 23 | ~Array(); |
[2754] | 24 | |
[2853] | 25 | void initializeArray (); |
[2754] | 26 | void finalizeArray (void); |
27 | void addEntry (GLfloat entry); | |
28 | void addEntry(GLfloat entry0, GLfloat entry1, GLfloat entry2); | |
29 | ||
30 | GLfloat* getArray (); | |
[2760] | 31 | int getCount(); |
[2758] | 32 | void debug(void); |
[2754] | 33 | private: |
[2807] | 34 | struct Entry |
35 | { | |
36 | GLfloat value; | |
37 | Entry* next; | |
38 | }; | |
39 | ||
[2754] | 40 | GLfloat* array; |
[2807] | 41 | int entryCount; |
[2809] | 42 | bool finalized; |
[2807] | 43 | Entry* firstEntry; |
44 | Entry* currentEntry; | |
45 | ||
46 | ||
[2754] | 47 | }; |
[2776] | 48 | |
49 | #endif |
Note: See TracBrowser
for help on using the repository browser.