Changeset 10730 in orxonox.OLD for branches/presentation/src/lib/graphics/importer
- Timestamp:
- Jun 20, 2007, 1:19:11 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/lib/graphics/importer/static_model.cc
r10729 r10730 101 101 void StaticModel::extractMountPoints() 102 102 { 103 // printf("extracting MP...");104 103 // go through all groups and check if they are mounts 105 104 std::vector<StaticModelData::Group>::iterator groupIt = this->data->getGroups().begin(); … … 114 113 // check if the name has a "MP" prefix or else it won't work 115 114 if( groupName.find("MP.", 0) == std::string::npos){ 116 // groupIt++;117 // printf("Found MP: ");118 115 continue; 119 116 } … … 128 125 PRINTF(4)("the face count of %s is wrong, perhaps you missnamed this object or used the wrong mount point object (got %i faces)\n", 129 126 groupName.c_str(), (*groupIt)._faces.size()); 130 // printf("wrong number of faces\n\n");131 // groupIt++;132 127 continue; 133 128 } … … 143 138 } 144 139 145 // printf("confirmed ");146 140 147 141 Vector center; … … 150 144 Vector zAxis; 151 145 // now process all points 152 // printf("entering loop: ");153 146 for( int i = 0; i < 3; i++) 154 147 { 155 // printf("%i ", i);156 148 // convert the float vertices to vectors 157 149 Vector a( this->data->getVertices()[triangle[i]._elements[0].vertexNumber * 3], 158 150 this->data->getVertices()[triangle[i]._elements[0].vertexNumber * 3 + 1], 159 151 this->data->getVertices()[triangle[i]._elements[0].vertexNumber * 3 + 2]); 160 // printf("a");161 152 Vector b( this->data->getVertices()[triangle[i]._elements[1].vertexNumber * 3], 162 153 this->data->getVertices()[triangle[i]._elements[1].vertexNumber * 3 + 1], 163 154 this->data->getVertices()[triangle[i]._elements[1].vertexNumber * 3 + 2]); 164 // printf("b");165 155 Vector c( this->data->getVertices()[triangle[i]._elements[2].vertexNumber * 3], 166 156 this->data->getVertices()[triangle[i]._elements[2].vertexNumber * 3 + 1], 167 157 this->data->getVertices()[triangle[i]._elements[2].vertexNumber * 3 + 2]); 168 // printf("c ");169 158 170 159 Vector ab = a - b; … … 220 209 } 221 210 222 // printf("adding MP\n"); 223 // now add the mount point 211 printf("adding MP\n"); 224 212 this->addMountPoint( zAxis, yAxis, center, groupName); 225 213 226 // printf("removing item...");227 // remove the group from the model list (mount points do not need to be drawn)228 // std::vector<StaticModelData::Group>::iterator tmpIt = groupIt;229 // groupIt++;230 // printf(" removing...");231 // this->data->getGroups().erase(tmpIt);232 // printf(" REMOVED\n");233 214 } 234 // printf("done\n");235 215 } 236 216
Note: See TracChangeset
for help on using the changeset viewer.