Last change
on this file since 3433 was
3427,
checked in by bensch, 20 years ago
|
orxonox/trunk/importer: cleaned up the includes, while watching some Monty Python
|
File size:
1.3 KB
|
Rev | Line | |
---|
[2842] | 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 | |
---|
[2842] | 11 | extern int verbose; //!< will be obsolete soon |
---|
[2804] | 12 | |
---|
[3196] | 13 | #include "../stdincl.h" |
---|
[2842] | 14 | |
---|
| 15 | //! Array Class that handles dynamic-float arrays. |
---|
[2754] | 16 | class Array |
---|
| 17 | { |
---|
| 18 | public: |
---|
| 19 | Array (); |
---|
[2847] | 20 | ~Array(); |
---|
[2754] | 21 | |
---|
[2842] | 22 | void initializeArray (); |
---|
[2754] | 23 | void finalizeArray (void); |
---|
| 24 | void addEntry (GLfloat entry); |
---|
| 25 | void addEntry(GLfloat entry0, GLfloat entry1, GLfloat entry2); |
---|
| 26 | |
---|
| 27 | GLfloat* getArray (); |
---|
[2760] | 28 | int getCount(); |
---|
[2758] | 29 | void debug(void); |
---|
[2754] | 30 | private: |
---|
[3186] | 31 | //! One entry of the Array |
---|
[2807] | 32 | struct Entry |
---|
| 33 | { |
---|
[3186] | 34 | GLfloat value; //!< The value of this Entry. |
---|
| 35 | Entry* next; //!< Pointer to the Next entry. |
---|
[2807] | 36 | }; |
---|
| 37 | |
---|
[3186] | 38 | GLfloat* array; //!< The array that will be produced when finalizing the Array. |
---|
| 39 | int entryCount; //!< The count of Entries in this Array. |
---|
| 40 | bool finalized; //!< If this variable is set to true, the Array can not be changed anymore. true if finalized, false else (initially). |
---|
| 41 | Entry* firstEntry; //!< Pointer to the first Entry of this Array |
---|
| 42 | Entry* currentEntry; //!< Pointer to the current Entry of this Array. The one Entry we are working with. |
---|
[2807] | 43 | |
---|
| 44 | |
---|
[2754] | 45 | }; |
---|
[2776] | 46 | |
---|
| 47 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.