Changeset 6786 for code/branches/lod/src/orxonox/graphics
- Timestamp:
- Apr 26, 2010, 4:05:45 PM (15 years ago)
- Location:
- code/branches/lod/src/orxonox/graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/lod/src/orxonox/graphics/MeshLodInformation.cc
r6724 r6786 40 40 CreateFactory(MeshLodInformation); 41 41 42 MeshLodInformation::MeshLodInformation(BaseObject* creator) : StaticEntity(creator) 42 MeshLodInformation::MeshLodInformation(BaseObject* creator) 43 : BaseObject(creator), lodLevel_(-1) 43 44 { 44 45 RegisterObject(MeshLodInformation); … … 56 57 } 57 58 58 std::string getMeshName()59 std::string MeshLodInformation::getMeshName() 59 60 { 60 if(mesh!=null) 61 return mesh; 62 return ""; 61 return MeshLodInformation::getMeshSource(); 63 62 } 64 63 64 void MeshLodInformation::setLodLevel(unsigned int lodLevel) 65 { 66 lodLevel_=lodLevel; 67 } 68 int MeshLodInformation::getLodLevel() 69 { 70 return lodLevel_; 71 } 72 void MeshLodInformation::setMeshSource(std::string meshSource) 73 { 74 meshSource_ = meshSource; 75 } 76 std::string MeshLodInformation::getMeshSource() 77 { 78 return meshSource_; 79 } 65 80 66 81 } -
code/branches/lod/src/orxonox/graphics/MeshLodInformation.h
r6724 r6786 40 40 class _OrxonoxExport MeshLodInformation : public BaseObject 41 41 { 42 private: 43 void setLodLevel(unsigned int lodLevel); 44 int getLodLevel(); 45 void setMeshSource(std::string meshSource); 46 std::string getMeshSource(); 47 std::string meshSource_; 48 int lodLevel_; 49 42 50 public: 43 51 MeshLodInformation(BaseObject* creator); -
code/branches/lod/src/orxonox/graphics/Model.cc
r6691 r6786 102 102 #endif 103 103 104 distList.push_back(70.0f*scaleFactor); 105 distList.push_back(140.0f*scaleFactor); 106 distList.push_back(170.0f*scaleFactor); 107 distList.push_back(200.0f*scaleFactor); 108 distList.push_back(230.0f*scaleFactor); 109 distList.push_back(250.0f*scaleFactor); 110 distList.push_back(270.0f*scaleFactor); 111 distList.push_back(290.0f*scaleFactor); 112 distList.push_back(310.0f*scaleFactor); 113 distList.push_back(330.0f*scaleFactor); 104 float factor = scaleFactor*scaleFactor*scaleFactor*scaleFactor; 114 105 115 float reductionValue = 0.2f; 106 distList.push_back(70.0f*factor); 107 distList.push_back(140.0f*factor); 108 distList.push_back(170.0f*factor); 109 distList.push_back(200.0f*factor); 110 distList.push_back(230.0f*factor); 111 distList.push_back(250.0f*factor); 112 distList.push_back(270.0f*factor); 113 distList.push_back(290.0f*factor); 114 distList.push_back(310.0f*factor); 115 distList.push_back(330.0f*factor); 116 117 float reductionValue = 0.5f; 116 118 117 119
Note: See TracChangeset
for help on using the changeset viewer.