Changeset 7016
- Timestamp:
- May 30, 2010, 2:52:34 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3/src/orxonox/graphics/Model.cc
r6964 r7016 100 100 this->mesh_.setVisible(this->isVisible()); 101 101 102 102 103 //LOD 103 104 if(this->mesh_.getEntity()->getMesh()->getNumLodLevels()==1 104 105 &&this->meshSrc_!="laserbeam.mesh") 105 106 { 107 float volume = this->mesh_.getEntity()->getBoundingBox().volume(); 106 108 float scaleFactor = 1; 109 107 110 BaseObject* creatorPtr = this; 108 111 … … 112 115 creatorPtr = creatorPtr->getCreator(); 113 116 } 117 // COUT(0) << "name: " << this->meshSrc_ << "scaleFactor: " << scaleFactor << ", volume: " << volume << endl; 114 118 115 119 Level* level = this->getLevel(); … … 127 131 #endif 128 132 129 if( lodLevel_>0&&lodLevel_<=5)133 if( lodLevel_>0 ) 130 134 { 131 float factor = scaleFactor*5/lodLevel_; 135 // float factor = scaleFactor*5/lodLevel_; 136 float factor = volume/3/lodLevel_; 132 137 133 138 COUT(4)<<"LodLevel set with factor: "<<factor<<std::endl;
Note: See TracChangeset
for help on using the changeset viewer.