Changeset 3360 in orxonox.OLD for orxonox/branches
- Timestamp:
- Jan 6, 2005, 9:37:39 PM (20 years ago)
- Location:
- orxonox/branches/parenting/src
- Files:
-
- 11 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/parenting/src/Makefile.am
r3357 r3360 24 24 story_entity.cc \ 25 25 environment.cc \ 26 importer/ object.cc \26 importer/model.cc \ 27 27 importer/array.cc \ 28 28 importer/material.cc \ -
orxonox/branches/parenting/src/Makefile.in
r3357 r3360 59 59 track.$(OBJEXT) base_entity.$(OBJEXT) game_loader.$(OBJEXT) \ 60 60 campaign.$(OBJEXT) story_entity.$(OBJEXT) \ 61 environment.$(OBJEXT) object.$(OBJEXT) array.$(OBJEXT) \61 environment.$(OBJEXT) model.$(OBJEXT) array.$(OBJEXT) \ 62 62 material.$(OBJEXT) texture.$(OBJEXT) list.$(OBJEXT) \ 63 63 p_node.$(OBJEXT) null_parent.$(OBJEXT) base_object.$(OBJEXT) \ … … 81 81 @AMDEP_TRUE@ ./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \ 82 82 @AMDEP_TRUE@ ./$(DEPDIR)/list.Po ./$(DEPDIR)/material.Po \ 83 @AMDEP_TRUE@ ./$(DEPDIR)/matrix.Po ./$(DEPDIR)/ null_parent.Po \84 @AMDEP_TRUE@ ./$(DEPDIR)/ object.Po ./$(DEPDIR)/orxonox.Po \83 @AMDEP_TRUE@ ./$(DEPDIR)/matrix.Po ./$(DEPDIR)/model.Po \ 84 @AMDEP_TRUE@ ./$(DEPDIR)/null_parent.Po ./$(DEPDIR)/orxonox.Po \ 85 85 @AMDEP_TRUE@ ./$(DEPDIR)/p_node.Po ./$(DEPDIR)/player.Po \ 86 86 @AMDEP_TRUE@ ./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/texture.Po \ … … 222 222 story_entity.cc \ 223 223 environment.cc \ 224 importer/ object.cc \224 importer/model.cc \ 225 225 importer/array.cc \ 226 226 importer/material.cc \ … … 299 299 esac; \ 300 300 done; \ 301 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/Makefile'; \301 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ 302 302 cd $(top_srcdir) && \ 303 $(AUTOMAKE) -- gnusrc/Makefile303 $(AUTOMAKE) --foreign src/Makefile 304 304 .PRECIOUS: Makefile 305 305 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status … … 370 370 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@ 371 371 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Po@am__quote@ 372 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model.Po@am__quote@ 372 373 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/null_parent.Po@am__quote@ 373 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Po@am__quote@374 374 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox.Po@am__quote@ 375 375 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_node.Po@am__quote@ … … 399 399 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 400 400 401 object.o: importer/object.cc402 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT object.o -MD -MP -MF "$(DEPDIR)/object.Tpo" -c -o object.o `test -f 'importer/object.cc' || echo '$(srcdir)/'`importer/object.cc; \403 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/ object.Tpo" "$(DEPDIR)/object.Po"; else rm -f "$(DEPDIR)/object.Tpo"; exit 1; fi404 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='importer/ object.cc' object='object.o' libtool=no @AMDEPBACKSLASH@405 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/ object.Po' tmpdepfile='$(DEPDIR)/object.TPo' @AMDEPBACKSLASH@406 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 407 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o object.o `test -f 'importer/object.cc' || echo '$(srcdir)/'`importer/object.cc408 409 object.obj: importer/object.cc410 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT object.obj -MD -MP -MF "$(DEPDIR)/object.Tpo" -c -o object.obj `if test -f 'importer/object.cc'; then $(CYGPATH_W) 'importer/object.cc'; else $(CYGPATH_W) '$(srcdir)/importer/object.cc'; fi`; \411 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/ object.Tpo" "$(DEPDIR)/object.Po"; else rm -f "$(DEPDIR)/object.Tpo"; exit 1; fi412 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='importer/ object.cc' object='object.obj' libtool=no @AMDEPBACKSLASH@413 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/ object.Po' tmpdepfile='$(DEPDIR)/object.TPo' @AMDEPBACKSLASH@414 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 415 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o object.obj `if test -f 'importer/object.cc'; then $(CYGPATH_W) 'importer/object.cc'; else $(CYGPATH_W) '$(srcdir)/importer/object.cc'; fi`401 model.o: importer/model.cc 402 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT model.o -MD -MP -MF "$(DEPDIR)/model.Tpo" -c -o model.o `test -f 'importer/model.cc' || echo '$(srcdir)/'`importer/model.cc; \ 403 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/model.Tpo" "$(DEPDIR)/model.Po"; else rm -f "$(DEPDIR)/model.Tpo"; exit 1; fi 404 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='importer/model.cc' object='model.o' libtool=no @AMDEPBACKSLASH@ 405 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/model.Po' tmpdepfile='$(DEPDIR)/model.TPo' @AMDEPBACKSLASH@ 406 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 407 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o model.o `test -f 'importer/model.cc' || echo '$(srcdir)/'`importer/model.cc 408 409 model.obj: importer/model.cc 410 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT model.obj -MD -MP -MF "$(DEPDIR)/model.Tpo" -c -o model.obj `if test -f 'importer/model.cc'; then $(CYGPATH_W) 'importer/model.cc'; else $(CYGPATH_W) '$(srcdir)/importer/model.cc'; fi`; \ 411 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/model.Tpo" "$(DEPDIR)/model.Po"; else rm -f "$(DEPDIR)/model.Tpo"; exit 1; fi 412 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='importer/model.cc' object='model.obj' libtool=no @AMDEPBACKSLASH@ 413 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/model.Po' tmpdepfile='$(DEPDIR)/model.TPo' @AMDEPBACKSLASH@ 414 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 415 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o model.obj `if test -f 'importer/model.cc'; then $(CYGPATH_W) 'importer/model.cc'; else $(CYGPATH_W) '$(srcdir)/importer/model.cc'; fi` 416 416 417 417 array.o: importer/array.cc -
orxonox/branches/parenting/src/environment.cc
r3336 r3360 21 21 #include "world_entity.h" 22 22 #include "vector.h" 23 #include "importer/ object.h"23 #include "importer/model.h" 24 24 25 25 using namespace std; … … 29 29 Environment::Environment () : WorldEntity() 30 30 { 31 this->model = new Object("reaplow.obj");31 this->model = new Model("reaplow.obj"); 32 32 } 33 33 -
orxonox/branches/parenting/src/importer/Makefile.am
r3340 r3360 8 8 importer_SOURCES= framework.cc \ 9 9 windowHandler.cc \ 10 object.cc \10 model.cc \ 11 11 array.cc \ 12 12 material.cc \ … … 16 16 noinst_HEADERS= framework.h \ 17 17 windowHandler.h \ 18 object.h \18 model.h \ 19 19 array.h \ 20 20 material.h \ -
orxonox/branches/parenting/src/importer/Makefile.in
r3353 r3360 54 54 PROGRAMS = $(bin_PROGRAMS) 55 55 am_importer_OBJECTS = framework.$(OBJEXT) windowHandler.$(OBJEXT) \ 56 object.$(OBJEXT) array.$(OBJEXT) material.$(OBJEXT) \56 model.$(OBJEXT) array.$(OBJEXT) material.$(OBJEXT) \ 57 57 texture.$(OBJEXT) vector.$(OBJEXT) 58 58 importer_OBJECTS = $(am_importer_OBJECTS) … … 62 62 am__depfiles_maybe = depfiles 63 63 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po ./$(DEPDIR)/framework.Po \ 64 @AMDEP_TRUE@ ./$(DEPDIR)/material.Po ./$(DEPDIR)/ object.Po \64 @AMDEP_TRUE@ ./$(DEPDIR)/material.Po ./$(DEPDIR)/model.Po \ 65 65 @AMDEP_TRUE@ ./$(DEPDIR)/texture.Po ./$(DEPDIR)/vector.Po \ 66 66 @AMDEP_TRUE@ ./$(DEPDIR)/windowHandler.Po … … 177 177 importer_SOURCES = framework.cc \ 178 178 windowHandler.cc \ 179 object.cc \179 model.cc \ 180 180 array.cc \ 181 181 material.cc \ … … 185 185 noinst_HEADERS = framework.h \ 186 186 windowHandler.h \ 187 object.h \187 model.h \ 188 188 array.h \ 189 189 material.h \ … … 259 259 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framework.Po@am__quote@ 260 260 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@ 261 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ object.Po@am__quote@261 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model.Po@am__quote@ 262 262 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@ 263 263 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@ -
orxonox/branches/parenting/src/importer/framework.cc
r3340 r3360 71 71 PRINTF(2)("screensize: %i, %i\n", wHandler.screen->w, wHandler.screen->h); 72 72 if (argc>=3) 73 obj = new Object(argv[1], atof(argv[2]));73 obj = new Model (argv[1], atof(argv[2])); 74 74 else if (argc>=2) 75 obj = new Object(argv[1]);75 obj = new Model(argv[1]); 76 76 else 77 obj = new Object();77 obj = new Model(); 78 78 79 79 M = Vector(wHandler.screen->w/2, wHandler.screen->h/2, 0); … … 215 215 case SDLK_c: 216 216 if (!obj) 217 obj = new Object(argv[1]);217 obj = new Model(argv[1]); 218 218 break; 219 219 } -
orxonox/branches/parenting/src/importer/framework.h
r2963 r3360 3 3 4 4 #include "windowHandler.h" // Include the Whandler Basecode 5 #include " object.h"5 #include "model.h" 6 6 #include "vector.h" 7 7 … … 33 33 34 34 WindowHandler wHandler; // Create an instance of the whandler basecode class 35 Object* obj;35 Model* obj; 36 36 37 37 -
orxonox/branches/parenting/src/importer/model.cc
r3357 r3360 14 14 */ 15 15 16 #include " object.h"16 #include "model.h" 17 17 int verbose = 1; //! \todo should be GLOBAL 18 18 using namespace std; 19 19 20 20 /** 21 \brief Creates a 3D- Object, but does not load any 3D-models.22 23 This Constructor is pretty useless, because why load no object in an object-loader??24 */ 25 Object::Object()21 \brief Creates a 3D-Model, but does not load any 3D-models. 22 23 This Constructor is pretty useless, because why load no model in an model-loader?? 24 */ 25 Model::Model () 26 26 { 27 27 28 28 this->initialize(); 29 29 30 this->Box Object();30 this->BoxModel(); 31 31 32 32 this->importToGL (); … … 36 36 37 37 /** 38 \brief Crates a 3D- Objectand loads in a File.38 \brief Crates a 3D-Model and loads in a File. 39 39 \param fileName file to parse and load (must be a .obj file) 40 40 */ 41 Object::Object(char* fileName)41 Model::Model(char* fileName) 42 42 { 43 43 this->initialize(); … … 51 51 52 52 /** 53 \brief Crates a 3D- Object, loads in a File and scales it.53 \brief Crates a 3D-Model, loads in a File and scales it. 54 54 \param fileName file to parse and load (must be a .obj file) 55 \param scaling The factor that the objectwill be scaled with.56 */ 57 Object::Object(char* fileName, float scaling)55 \param scaling The factor that the model will be scaled with. 56 */ 57 Model::Model(char* fileName, float scaling) 58 58 { 59 59 this->initialize(); … … 68 68 69 69 /** 70 \brief deletes an Object.71 72 Looks if any from objectallocated space is still in use, and if so deleted it.73 */ 74 Object::~Object()70 \brief deletes an Model. 71 72 Looks if any from model allocated space is still in use, and if so deleted it. 73 */ 74 Model::~Model() 75 75 { 76 76 PRINTF(2)("Deleting display Lists.\n"); … … 97 97 98 98 /** 99 \brief Draws the Objects of all Groups.99 \brief Draws the Models of all Groups. 100 100 It does this by just calling the Lists that must have been created earlier. 101 101 */ 102 void Object::draw (void) const103 { 104 PRINTF(2)("drawing the 3D- Objects\n");102 void Model::draw (void) const 103 { 104 PRINTF(2)("drawing the 3D-Models\n"); 105 105 Group* walker = this->firstGroup; 106 106 while (walker != NULL) 107 107 { 108 PRINTF(3)("Drawing object%s\n", walker->name);108 PRINTF(3)("Drawing model %s\n", walker->name); 109 109 glCallList (walker->listNumber); 110 110 walker = walker->next; … … 113 113 114 114 /** 115 \brief Draws the Objectnumber groupNumber115 \brief Draws the Model number groupNumber 116 116 \param groupNumber The number of the group that will be displayed. 117 117 118 118 It does this by just calling the List that must have been created earlier. 119 119 */ 120 void Object::draw (int groupNumber) const120 void Model::draw (int groupNumber) const 121 121 { 122 122 if (groupNumber >= this->groupCount) 123 123 { 124 PRINTF(1)("You requested object number %i, but this File only contains of %i Objects.\n", groupNumber-1, this->groupCount);124 PRINTF(1)("You requested model number %i, but this File only contains of %i Models.\n", groupNumber-1, this->groupCount); 125 125 return; 126 126 } 127 PRINTF(2)("drawing the requested 3D- Objects if found.\n");127 PRINTF(2)("drawing the requested 3D-Models if found.\n"); 128 128 Group* walker = this->firstGroup; 129 129 int counter = 0; … … 132 132 if (counter == groupNumber) 133 133 { 134 PRINTF(2)("Drawing objectnumber %i named %s\n", counter, walker->name);134 PRINTF(2)("Drawing model number %i named %s\n", counter, walker->name); 135 135 glCallList (walker->listNumber); 136 136 return; … … 139 139 walker = walker->next; 140 140 } 141 PRINTF(1)(" Objectnumber %i in %s not Found.\n", groupNumber, this->objFileName);141 PRINTF(1)("Model number %i in %s not Found.\n", groupNumber, this->objFileName); 142 142 return; 143 143 … … 145 145 146 146 /** 147 \brief Draws the Objectwith a specific groupName147 \brief Draws the Model with a specific groupName 148 148 \param groupName The name of the group that will be displayed. 149 149 150 150 It does this by just calling the List that must have been created earlier. 151 151 */ 152 void Object::draw (char* groupName) const153 { 154 PRINTF(2)("drawing the requested 3D- Objects if found.\n");152 void Model::draw (char* groupName) const 153 { 154 PRINTF(2)("drawing the requested 3D-Models if found.\n"); 155 155 Group* walker = this->firstGroup; 156 156 while (walker != NULL) … … 158 158 if (!strcmp(walker->name, groupName)) 159 159 { 160 PRINTF(2)("Drawing object%s\n", walker->name);160 PRINTF(2)("Drawing model %s\n", walker->name); 161 161 glCallList (walker->listNumber); 162 162 return; … … 164 164 walker = walker->next; 165 165 } 166 PRINTF(1)(" ObjectNamed %s in %s not Found.\n", groupName, this->objFileName);166 PRINTF(1)("Model Named %s in %s not Found.\n", groupName, this->objFileName); 167 167 return; 168 168 } 169 169 170 170 /** 171 \returns Count of the Objects in this File172 */ 173 int Object::getGroupCount (void) const171 \returns Count of the Models in this File 172 */ 173 int Model::getGroupCount (void) const 174 174 { 175 175 return this->groupCount; … … 177 177 178 178 /** 179 \brief initializes the Object.179 \brief initializes the Model. 180 180 181 181 This Function initializes all the needed arrays, Lists and clientStates. 182 182 It also defines default values. 183 183 */ 184 bool Object::initialize (void)185 { 186 PRINTF(2)("new 3D- Objectis being created\n");184 bool Model::initialize (void) 185 { 186 PRINTF(2)("new 3D-Model is being created\n"); 187 187 188 188 // setting the start group; … … 206 206 207 207 /** 208 \brief initializes a new Group object208 \brief initializes a new Group model 209 209 \param group the group that should be initialized. 210 210 \todo Maybe Group should be a Class, because it does a lot of stuff 211 211 212 212 */ 213 bool Object::initGroup(Group* group)213 bool Model::initGroup(Group* group) 214 214 { 215 215 PRINTF(3)("Adding new Group\n"); … … 228 228 \param face The face to initialize 229 229 */ 230 bool Object::initFace (Face* face)230 bool Model::initFace (Face* face) 231 231 { 232 232 face->vertexCount = 0; … … 242 242 243 243 /** 244 \brief finalizes an Object.244 \brief finalizes an Model. 245 245 This funcion is needed, to delete all the Lists, and arrays that are no more needed because they are already imported into openGL. This will be applied at the end of the importing Process. 246 246 */ 247 bool Object::cleanup(void)248 { 249 PRINTF(3)("cleaning up the 3D- Objectto save Memory.\n");247 bool Model::cleanup(void) 248 { 249 PRINTF(3)("cleaning up the 3D-Model to save Memory.\n"); 250 250 251 251 if (this->vertices) … … 264 264 \param group the first Group to clean 265 265 */ 266 bool Object::cleanupGroup (Group* group)266 bool Model::cleanupGroup (Group* group) 267 267 { 268 268 PRINTF(3)("Cleaning up group\n"); … … 282 282 \param face the first face to clean. 283 283 */ 284 bool Object::cleanupFace (Face* face)284 bool Model::cleanupFace (Face* face) 285 285 { 286 286 PRINTF(3)("Cleaning up Face\n"); … … 307 307 \param faceElem the first FaceElement to clean. 308 308 */ 309 bool Object::cleanupFaceElement(FaceElement* faceElem)309 bool Model::cleanupFaceElement(FaceElement* faceElem) 310 310 { 311 311 if (faceElem->next != NULL) … … 320 320 \param fileName The file to import 321 321 */ 322 bool Object::importFile (char* fileName)322 bool Model::importFile (char* fileName) 323 323 { 324 324 PRINTF(3)("preparing to read in file: %s\n", fileName); … … 361 361 This function does read the file, parses it for the occurence of things like vertices, faces and so on, and executes the specific tasks 362 362 */ 363 bool Object::readFromObjFile (void)363 bool Model::readFromObjFile (void) 364 364 { 365 365 char* fileName = new char [strlen(objPath)+strlen(objFileName)+1]; … … 372 372 if (OBJ_FILE->fail()) 373 373 { 374 PRINTF(1)("unable to open .OBJ file: %s\n Loading Box Objectinstead.\n", fileName);375 Box Object();374 PRINTF(1)("unable to open .OBJ file: %s\n Loading Box Model instead.\n", fileName); 375 BoxModel(); 376 376 OBJ_FILE->close(); 377 377 delete []fileName; … … 443 443 444 444 This function initializes a new Group. 445 With it you should be able to import .obj-files with more than one Objects inside.446 */ 447 bool Object::readGroup (char* groupString)445 With it you should be able to import .obj-files with more than one Models inside. 446 */ 447 bool Model::readGroup (char* groupString) 448 448 { 449 449 PRINTF(3)("Read Group: %s.\n", groupString); … … 470 470 If a vertex line is found this function will inject it into the vertex-Array 471 471 */ 472 bool Object::readVertex (char* vertexString)472 bool Model::readVertex (char* vertexString) 473 473 { 474 474 float subbuffer1; … … 488 488 The function makes a difference between QUADS and TRIANGLES, and will if changed re-open, set and re-close the gl-processe. 489 489 */ 490 bool Object::readFace (char* faceString)490 bool Model::readFace (char* faceString) 491 491 { 492 492 if (this->currentGroup->faceCount >0) … … 551 551 If a vertexNormal line is found this function will inject it into the vertexNormal-Array 552 552 */ 553 bool Object::readVertexNormal (char* normalString)553 bool Model::readVertexNormal (char* normalString) 554 554 { 555 555 float subbuffer1; … … 569 569 this function will inject it into the vertexTexture-Array 570 570 */ 571 bool Object::readVertexTexture (char* vTextureString)571 bool Model::readVertexTexture (char* vTextureString) 572 572 { 573 573 float subbuffer1; … … 589 589 590 590 */ 591 bool Object::readMtlLib (char* mtlFile)591 bool Model::readMtlLib (char* mtlFile) 592 592 { 593 593 this->mtlFileName = new char [strlen(mtlFile)+1]; … … 688 688 \param matString the Material that will be set. 689 689 */ 690 bool Object::readUseMtl (char* matString)690 bool Model::readUseMtl (char* matString) 691 691 { 692 692 if (!this->mtlFileName) … … 711 711 \brief reads and includes the Faces/Materials into the openGL state Machine 712 712 */ 713 bool Object::importToGL (void)713 bool Model::importToGL (void) 714 714 { 715 715 … … 729 729 if ((this->currentGroup->listNumber = glGenLists(1)) == 0) 730 730 { 731 PRINTF(1)("list could not be created for this Object\n");731 PRINTF(1)("list could not be created for this Model\n"); 732 732 return false; 733 733 } … … 810 810 merging this information, the face will be drawn. 811 811 */ 812 bool Object::addGLElement (FaceElement* elem)812 bool Model::addGLElement (FaceElement* elem) 813 813 { 814 814 PRINTF(3)("importing grafical Element to openGL.\n"); … … 832 832 4. It goes through all the normale-Points and calculates the VertexNormale and includes it in the normals-Array. 833 833 */ 834 bool Object::buildVertexNormals ()834 bool Model::buildVertexNormals () 835 835 { 836 836 … … 903 903 904 904 /** 905 \brief Includes a default object906 907 This will inject a Cube, because this is the most basic object.908 */ 909 void Object::BoxObject(void)905 \brief Includes a default model 906 907 This will inject a Cube, because this is the most basic model. 908 */ 909 void Model::BoxModel(void) 910 910 { 911 911 this->readVertex ("-0.5 -0.5 0.5"); -
orxonox/branches/parenting/src/importer/model.h
r3357 r3360 1 1 /*! 2 \file object.h3 \brief Contains the Object Class that handles 3D-Objects2 \file model.h 3 \brief Contains the Model Class that handles 3D-Models 4 4 */ 5 5 6 #ifndef _ OBJECT_H7 #define _ OBJECT_H6 #ifndef _MODEL_H 7 #define _MODEL_H 8 8 9 9 #include "../stdincl.h" … … 18 18 19 19 20 //! Class that handles 3D- Objects. it can also read them in and display them.21 class Object20 //! Class that handles 3D-Models. it can also read them in and display them. 21 class Model 22 22 { 23 23 public: 24 Object();25 Object(char* fileName);26 Object(char* fileName, float scaling);27 ~ Object();24 Model (); 25 Model (char* fileName); 26 Model(char* fileName, float scaling); 27 ~Model (); 28 28 29 29 void draw (void) const; … … 60 60 }; 61 61 62 //! Group to handle multiple Objects per obj-file.62 //! Group to handle multiple Models per obj-file. 63 63 struct Group 64 64 { … … 86 86 87 87 Material* material; //!< Initial pointer to the Material. This can hold many materials, because Material can be added with Material::addMaterial(..) 88 float scaleFactor; //!< The Factor with which the Object hould be scaled. \todo maybe one wants to scale the Objectafter Initialisation88 float scaleFactor; //!< The Factor with which the Model should be scaled. \todo maybe one wants to scale the Model after Initialisation 89 89 90 90 char* objPath; //!< The Path wher the obj and mtl-file are located. … … 117 117 bool buildVertexNormals (); 118 118 119 void Box Object(void);119 void BoxModel (void); 120 120 }; 121 121 -
orxonox/branches/parenting/src/player.cc
r3325 r3360 19 19 #include "stdincl.h" 20 20 #include "collision.h" 21 #include "importer/ object.h"21 #include "importer/model.h" 22 22 23 23 using namespace std; … … 27 27 { 28 28 29 this->model = new Object("reaplow.obj");29 this->model = new Model("reaplow.obj"); 30 30 /* 31 31 objectList = glGenLists(1); -
orxonox/branches/parenting/src/player.h
r3309 r3360 9 9 #include "world_entity.h" 10 10 11 class Object;11 class Model; 12 12 13 13 //! Basic controllable WorldEntity -
orxonox/branches/parenting/src/world.cc
r3358 r3360 190 190 trackManager->addPoint(Vector(150,0,-10)); 191 191 trackManager->setDuration(.5); 192 int fork11, fork12, fork13 ;193 trackManager->fork( 3, &fork11, &fork12, &fork13);192 int fork11, fork12, fork13, fork14; 193 trackManager->fork(4, &fork11, &fork12, &fork13, &fork14); 194 194 trackManager->workOn(fork11); 195 195 trackManager->addPoint(Vector(170, 0, -15)); … … 217 217 trackManager->addPoint(Vector(200,-10,5)); 218 218 trackManager->addPoint(Vector(250,-10,5)); 219 trackManager->join(3, fork21, fork22, fork13); 219 printf("fork14: %d\n", fork14); 220 trackManager->workOn(fork14); 221 trackManager->addPoint(Vector(200,15,0)); 222 trackManager->addPoint(Vector(210,0,10)); 223 224 225 226 trackManager->join(4, fork21, fork22, fork13, fork14); 227 220 228 /* 221 229 tmpCurve->addNode(Vector(10,0,-10)); -
orxonox/branches/parenting/src/world_entity.h
r3342 r3360 11 11 12 12 class CollisionCluster; 13 class Object;13 class Model; 14 14 15 15 //! Basic class from which all interactive stuff in the world is derived from … … 22 22 virtual ~WorldEntity (); 23 23 24 Object* model;24 Model* model; 25 25 26 26 void setCollision (CollisionCluster* newhull);
Note: See TracChangeset
for help on using the changeset viewer.