- Timestamp:
- Nov 13, 2004, 12:12:33 AM (20 years ago)
- Location:
- orxonox/trunk/importer
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/importer/array.cc
r2842 r2847 22 22 { 23 23 initializeArray (); 24 } 25 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 delete [] array; 24 43 } 25 44 -
orxonox/trunk/importer/array.h
r2842 r2847 21 21 public: 22 22 Array (); 23 ~Array(); 23 24 24 25 void initializeArray (); -
orxonox/trunk/importer/framework.cc
r2846 r2847 2 2 #include "object.h" 3 3 4 int verbose = 1;4 int verbose = 2; 5 5 WindowHandler wHandler; // Create an instance of the whandler basecode class 6 6 Object* obj; -
orxonox/trunk/importer/material.cc
r2842 r2847 36 36 37 37 setName (mtlName); 38 } 39 40 /** 41 \brief deletes a Material 42 */ 43 Material::~Material() 44 { 45 if (verbose >= 2) 46 printf ("delete Material %s\n", name); 47 if (nextMat != NULL) 48 delete nextMat; 38 49 } 39 50 -
orxonox/trunk/importer/object.cc
r2846 r2847 24 24 25 25 initialize(); 26 // importFile (""); 26 27 27 BoxObject(); 28 28 … … 57 57 58 58 finalize(); 59 } 60 61 /** 62 \brief deletes an Object 63 */ 64 Object::~Object() 65 { 66 if (verbose >= 2) 67 printf ("Don't know what to delete, or how to destroy a glList\n"); 68 59 69 } 60 70 … … 80 90 vTexture = new Array(); 81 91 92 material = new Material(); 93 82 94 glNewList (listNumber, GL_COMPILE); 83 95 glEnableClientState (GL_VERTEX_ARRAY); … … 111 123 glEnd(); 112 124 glEndList(); 125 delete vertices; 126 delete normals; 127 delete vTexture; 128 if (material != NULL) 129 delete material; 113 130 return true; 114 131 } … … 351 368 printf ("Opening mtlFile: %s\n", mtlFileName); 352 369 char Buffer[500]; 353 vertices = new Array();354 material = new Material();355 370 Material* tmpMat = material; 356 371 while(!MTL_FILE->eof())
Note: See TracChangeset
for help on using the changeset viewer.