Changeset 6008 in orxonox.OLD for trunk/src/lib/graphics/importer/vertex_list_model.cc
- Timestamp:
- Dec 10, 2005, 3:52:33 PM (18 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/vertex_list_model.cc
r6006 r6008 18 18 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER 19 19 20 #include " model.h"20 #include "vertex_list_model.h" 21 21 22 22 #include "stdlibincl.h" … … 26 26 27 27 using namespace std; 28 29 30 ////////////////////31 /// SUB-Elements ///32 ////////////////////33 /**34 * creates a new ModelFaceElement35 */36 ModelFaceElement::ModelFaceElement()37 {38 this->vertexNumber = -1;39 this->normalNumber = -1;40 this->texCoordNumber = -1;41 42 this->next = NULL;43 }44 45 /**46 * destroys a ModelFaceElement47 */48 ModelFaceElement::~ModelFaceElement()49 {50 if (this->next)51 delete this->next;52 }53 54 /**55 * creates a new ModelFace56 */57 ModelFace::ModelFace()58 {59 this->vertexCount = 0;60 61 this->firstElem = NULL;62 63 this->material = NULL;64 65 this->next = NULL;66 }67 68 /**69 * deletes a ModelFace70 */71 ModelFace::~ModelFace()72 {73 PRINTF(5)("Cleaning up Face\n");74 75 if (this->firstElem != NULL)76 delete this->firstElem;77 78 if (this->next != NULL)79 delete this->next;80 }81 82 /**83 * Creates a new ModelGroup84 */85 ModelGroup::ModelGroup()86 {87 PRINTF(4)("Adding new Group\n");88 this->name = "";89 this->faceMode = -1;90 this->faceCount = 0;91 this->next = NULL;92 this->listNumber = 0;93 94 this->firstFace = new ModelFace;95 this->currentFace = this->firstFace;96 }97 98 /**99 * deletes a ModelGroup100 */101 ModelGroup::~ModelGroup()102 {103 PRINTF(5)("Cleaning up group\n");104 if (this->firstFace != NULL)105 delete this->firstFace;106 107 // deleting the glList108 if (this->listNumber != 0)109 glDeleteLists(this->listNumber, 1);110 111 if (this->name[0] != '\0')112 delete[] this->name;113 114 if (this->next !=NULL)115 delete this->next;116 117 }118 28 119 29 /**
Note: See TracChangeset
for help on using the changeset viewer.