Changeset 2853 in orxonox.OLD for orxonox/trunk/src/array.cc
- Timestamp:
- Nov 14, 2004, 6:41:02 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/array.cc
r2835 r2853 16 16 #include "array.h" 17 17 18 /** 19 \brief creates a new Array 20 */ 18 21 Array::Array () 19 22 { 20 createArray ();23 initializeArray (); 21 24 } 22 25 23 void Array::createArray () 26 /** 27 \brief deletes an Array. 28 It does this by first deleting all the array-entries, and then delete the array[] itself 29 */ 30 Array::~Array() 31 { 32 if (verbose >= 2) 33 printf("deleting array\n"); 34 Entry* walker = firstEntry; 35 Entry* last; 36 while (walker != NULL) 37 { 38 last = walker; 39 walker = walker->next; 40 delete last; 41 } 42 if (finalized) 43 delete [] array; 44 } 45 46 /** 47 \brief initializes an Array 48 the Function does this by setting up a fistEntry, and setting the entryCount. 49 */ 50 void Array::initializeArray () 24 51 { 25 52 if (verbose >= 2) … … 33 60 } 34 61 62 /** 63 \brief finalizes an array. 64 This Function creates the array, and makes it ready to be sent to the application. 65 */ 35 66 void Array::finalizeArray (void) 36 67 { … … 49 80 } 50 81 51 82 /** 83 \brief adds a new Entry to the Array 84 \param entry Entry to add. 85 */ 52 86 void Array::addEntry (GLfloat entry) 53 87 { … … 68 102 } 69 103 104 /** 105 \brief Adds 3 entries at once (convenience) 106 */ 70 107 void Array::addEntry (GLfloat entry0, GLfloat entry1, GLfloat entry2) 71 108 { … … 75 112 } 76 113 77 114 /** 115 \brief Gives back the array !! MUST be executed AFTER finalize. 116 \returns The created array. 117 */ 78 118 GLfloat* Array::getArray () 79 119 { … … 81 121 } 82 122 123 /** 124 \returns The Count of entries in the Array 125 */ 83 126 int Array::getCount() 84 127 { … … 86 129 } 87 130 88 89 131 /** 132 \brief Simple debug info about the Array 133 */ 90 134 void Array::debug () 91 135 {
Note: See TracChangeset
for help on using the changeset viewer.