Changeset 4138 in orxonox.OLD for orxonox/branches
- Timestamp:
- May 10, 2005, 10:15:57 AM (20 years ago)
- Location:
- orxonox/branches/md2_loader/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/md2_loader/src/Makefile.in
r4078 r4138 73 73 track_manager.$(OBJEXT) track_node.$(OBJEXT) factory.$(OBJEXT) \ 74 74 animation.$(OBJEXT) animation3d.$(OBJEXT) \ 75 animation_player.$(OBJEXT) garbage_collector.$(OBJEXT) \ 76 story_entity.$(OBJEXT) campaign.$(OBJEXT) world.$(OBJEXT) \ 77 world_entity.$(OBJEXT) player.$(OBJEXT) environment.$(OBJEXT) \ 78 skysphere.$(OBJEXT) skybox.$(OBJEXT) terrain.$(OBJEXT) \ 79 weapon.$(OBJEXT) projectile.$(OBJEXT) satellite.$(OBJEXT) \ 75 animation_player.$(OBJEXT) object_manager.$(OBJEXT) \ 76 garbage_collector.$(OBJEXT) story_entity.$(OBJEXT) \ 77 campaign.$(OBJEXT) world.$(OBJEXT) world_entity.$(OBJEXT) \ 78 player.$(OBJEXT) environment.$(OBJEXT) skysphere.$(OBJEXT) \ 79 skybox.$(OBJEXT) terrain.$(OBJEXT) weapon.$(OBJEXT) \ 80 projectile.$(OBJEXT) satellite.$(OBJEXT) \ 80 81 character_attributes.$(OBJEXT) test_gun.$(OBJEXT) \ 81 82 test_bullet.$(OBJEXT) ai.$(OBJEXT) p_node.$(OBJEXT) \ … … 124 125 @AMDEP_TRUE@ ./$(DEPDIR)/material.Po ./$(DEPDIR)/md2Model.Po \ 125 126 @AMDEP_TRUE@ ./$(DEPDIR)/model.Po ./$(DEPDIR)/null_parent.Po \ 126 @AMDEP_TRUE@ ./$(DEPDIR)/objModel.Po ./$(DEPDIR)/orxonox.Po \ 127 @AMDEP_TRUE@ ./$(DEPDIR)/p_node.Po \ 127 @AMDEP_TRUE@ ./$(DEPDIR)/objModel.Po \ 128 @AMDEP_TRUE@ ./$(DEPDIR)/object_manager.Po \ 129 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/p_node.Po \ 128 130 @AMDEP_TRUE@ ./$(DEPDIR)/particle_emitter.Po \ 129 131 @AMDEP_TRUE@ ./$(DEPDIR)/particle_engine.Po \ … … 286 288 util/animation/animation3d.cc \ 287 289 util/animation/animation_player.cc \ 290 util/object_manager.cc \ 288 291 garbage_collector.cc \ 289 292 story_entities/story_entity.cc \ … … 347 350 util/animation/animation3d.h \ 348 351 util/animation/animation_player.h \ 352 util/object_manager.h \ 349 353 garbage_collector.h \ 350 354 story_entities/story_entity.h \ … … 550 554 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/null_parent.Po@am__quote@ 551 555 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objModel.Po@am__quote@ 556 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object_manager.Po@am__quote@ 552 557 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox.Po@am__quote@ 553 558 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_node.Po@am__quote@ … … 818 823 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 819 824 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o animation_player.obj `if test -f 'util/animation/animation_player.cc'; then $(CYGPATH_W) 'util/animation/animation_player.cc'; else $(CYGPATH_W) '$(srcdir)/util/animation/animation_player.cc'; fi` 825 826 object_manager.o: util/object_manager.cc 827 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT object_manager.o -MD -MP -MF "$(DEPDIR)/object_manager.Tpo" -c -o object_manager.o `test -f 'util/object_manager.cc' || echo '$(srcdir)/'`util/object_manager.cc; \ 828 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/object_manager.Tpo" "$(DEPDIR)/object_manager.Po"; else rm -f "$(DEPDIR)/object_manager.Tpo"; exit 1; fi 829 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/object_manager.cc' object='object_manager.o' libtool=no @AMDEPBACKSLASH@ 830 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/object_manager.Po' tmpdepfile='$(DEPDIR)/object_manager.TPo' @AMDEPBACKSLASH@ 831 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 832 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o object_manager.o `test -f 'util/object_manager.cc' || echo '$(srcdir)/'`util/object_manager.cc 833 834 object_manager.obj: util/object_manager.cc 835 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT object_manager.obj -MD -MP -MF "$(DEPDIR)/object_manager.Tpo" -c -o object_manager.obj `if test -f 'util/object_manager.cc'; then $(CYGPATH_W) 'util/object_manager.cc'; else $(CYGPATH_W) '$(srcdir)/util/object_manager.cc'; fi`; \ 836 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/object_manager.Tpo" "$(DEPDIR)/object_manager.Po"; else rm -f "$(DEPDIR)/object_manager.Tpo"; exit 1; fi 837 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/object_manager.cc' object='object_manager.obj' libtool=no @AMDEPBACKSLASH@ 838 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/object_manager.Po' tmpdepfile='$(DEPDIR)/object_manager.TPo' @AMDEPBACKSLASH@ 839 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 840 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o object_manager.obj `if test -f 'util/object_manager.cc'; then $(CYGPATH_W) 'util/object_manager.cc'; else $(CYGPATH_W) '$(srcdir)/util/object_manager.cc'; fi` 820 841 821 842 story_entity.o: story_entities/story_entity.cc -
orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc
r4126 r4138 49 49 } 50 50 51 /** 52 \brief draw function 53 54 these function will take NO argument in the final version, just for testing 55 */ 56 void MD2Model::draw(t3DModel *pModel) 57 { 58 if( pModel->objectList->getSize() <= 0) return; 59 60 t3DObject *pObject = pModel->objectList->firstElement(); 61 glBegin(GL_TRIANGLES); 62 for(int j = 0; j < pObject->numOfFaces; j++) 63 { 64 for(int whichVertex = 0; whichVertex < 3; whichVertex++) 65 { 66 int index = pObject->pFaces[j].vertIndex[whichVertex]; 67 int index2 = pObject->pFaces[j].coordIndex[whichVertex]; 68 /* we invert the normals since the md2 file format uses different style */ 69 glNormal3f(-pObject->pNormals[ index ].x, -pObject->pNormals[ index ].y, -pObject->pNormals[ index ].z); 70 if(pObject->pTexVerts) 71 { 72 glTexCoord2f(pObject->pTexVerts[ index2 ].x, pObject->pTexVerts[ index2 ].y); 73 } 74 glVertex3f(pObject->pVerts[ index ].x, pObject->pVerts[ index ].y, pObject->pVerts[ index ].z); 75 } 76 } 77 glEnd(); 78 } 51 79 52 80 /******************************************************************************** -
orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.h
r4079 r4138 118 118 void drawFrame(int frame); 119 119 120 void draw(t3DModel *pModel); 121 120 122 void setAnim(int type); 121 123 void scaleModel(float s); -
orxonox/branches/md2_loader/src/story_entities/world.cc
r4072 r4138 50 50 51 51 #include "substring.h" 52 53 #include "md2Model.h" 52 54 53 55 using namespace std; … … 473 475 terrain->setRelCoor(Vector(0,-10,0)); 474 476 this->spawn(terrain); 477 478 479 480 //This is for md2 test purposes only! if this is seen in the trunk: hit me :) 481 MD2Loader* md2loader = new MD2Loader(); 482 this->model = new t3DModel; 483 this->md2Model = new MD2Model(); 484 485 md2loader->importMD2(model, "test.md2", "test.bmp"); 475 486 476 487 } … … 931 942 } 932 943 delete iterator; 944 945 /* TESTGING TESTING TESTING */ 946 this->md2Model->draw(this->model); 933 947 934 948 glCallList (objectList); -
orxonox/branches/md2_loader/src/story_entities/world.h
r4015 r4138 23 23 class GarbageCollector; 24 24 class Text; 25 26 /* TESTING TESTING TESTING */ 27 struct t3DModel; 28 class MD2Model; 25 29 26 30 //! The game world Interface … … 118 122 GarbageCollector* garbageCollector; //!< reference to the garbage collector 119 123 124 /* TESTING TESTING TESTING */ 125 t3DModel* model; 126 MD2Model* md2Model; 127 128 120 129 /* function for main-loop */ 121 130 void mainLoop ();
Note: See TracChangeset
for help on using the changeset viewer.