Changeset 6838 for code/branches/lod/src/orxonox/graphics
- Timestamp:
- May 3, 2010, 2:29:27 PM (15 years ago)
- Location:
- code/branches/lod/src/orxonox/graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/lod/src/orxonox/graphics/MeshLodInformation.h
r6786 r6838 42 42 private: 43 43 void setLodLevel(unsigned int lodLevel); 44 int getLodLevel();45 44 void setMeshSource(std::string meshSource); 46 45 std::string getMeshSource(); … … 52 51 virtual ~MeshLodInformation(); 53 52 53 int getLodLevel(); 54 54 std::string getMeshName(); 55 55 -
code/branches/lod/src/orxonox/graphics/Model.cc
r6828 r6838 29 29 #include "Model.h" 30 30 31 #include <OGRE/OgreEntity.h> 31 // What's this? With the directory in front the filename, my compiler can't find the file... 32 //#include <OGRE/OgreEntity.h> 33 #include <OgreEntity.h> 32 34 33 35 #include "core/CoreIncludes.h" … … 35 37 #include "core/XMLPort.h" 36 38 #include "Scene.h" 39 #include "graphics/MeshLodInformation.h" 40 #include "Level.h" 37 41 38 42 namespace orxonox … … 58 62 { 59 63 SUPER(Model, XMLPort, xmlelement, mode); 60 61 64 65 //LoD 62 66 XMLPortParam(Model, "lodLevel", setLodLevel, getLodLevel, xmlelement, mode).defaultValues(5); 63 67 64 68 XMLPortParam(Model, "mesh", setMeshSource, getMeshSource, xmlelement, mode); 65 69 XMLPortParam(Model, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true); … … 98 102 if(scale3d.z>scaleFactor) 99 103 scaleFactor = scale3d.z; 100 104 105 Level* level_ = this->getLevel(); 106 107 MeshLodInformation* lodInfo = level_->getLodInfo(this->meshSrc_); 108 if(lodInfo!=0) 109 setLodLevel(lodInfo->getLodLevel()); 110 101 111 COUT(0) << this->meshSrc_<< " lodLevel_: " << this->lodLevel_ <<" scale: "<< scaleFactor << std::endl; 102 112 //Fuer Asteroiden perfekt
Note: See TracChangeset
for help on using the changeset viewer.