Changeset 1070 for GTP/trunk/Lib/Geom/shared/GeoTool/src
- Timestamp:
- 06/30/06 14:22:34 (19 years ago)
- Location:
- GTP/trunk/Lib/Geom/shared/GeoTool/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshLoader.cpp
r1050 r1070 426 426 } 427 427 428 list.clear(); 428 list.clear(); 429 429 430 430 // Gets material name. … … 879 879 880 880 // Remove degenerate triangles of a submesh given. 881 geoSubMesh = removeDegenerateTriangles(geoSubMesh);881 //geoSubMesh = removeDegenerateTriangles(geoSubMesh); 882 882 883 883 return geoSubMesh; … … 910 910 indices = new Index[new_index_count]; 911 911 912 // Initialize the current index ;912 // Initialize the current index. 913 913 current_index = 0; 914 914 -
GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshSaver.cpp
r1024 r1070 23 23 GeoMeshSaver::GeoMeshSaver() 24 24 { 25 leavesSubMesh =-1;26 leavesVB =NULL;27 numindices =0;28 indices =NULL;25 leavesSubMesh = -1; 26 leavesVB = NULL; 27 numindices = 0; 28 indices = NULL; 29 29 } 30 30 … … 147 147 } 148 148 149 //OSCAR150 149 // Write skeleton info if required 151 150 if (geoMesh->hasSkeleton) … … 158 157 { 159 158 160 for (int i =0; i< geoMesh->mBones.size(); i++)159 for (int i = 0; i< geoMesh->mBones.size(); i++) 161 160 { 162 161 writeMeshBoneAssignment(geoMesh->mBones[i]); … … 206 205 Index *indexBegin; 207 206 Index *indexEnd; 208 207 209 208 // Header. 210 209 writeChunkHeader(M_SUBMESH, calcSubMeshSize(geoSubMesh)); … … 222 221 223 222 indexCount = geoSubMesh->mIndexCount; 224 223 224 /* 225 225 // If the submesh is in triangle strips. 226 226 if (geoSubMesh->mType == GEO_TRIANGLE_STRIPS) 227 227 { 228 indexCount += 2 * geoSubMesh->mStripCount - 2; 229 } 228 indexCount += (2 * geoSubMesh->mStripCount) 229 - 230 2; 231 } 232 */ 230 233 231 234 // Write index count. … … 236 239 writeBools(idx32bit, 1); 237 240 241 /* 238 242 // If the submesh is in triangle strips. 239 243 if (geoSubMesh->mType == GEO_TRIANGLE_STRIPS) … … 260 264 i = 0; 261 265 266 // Degenerate. 262 267 if (strip != 0) 263 268 { … … 274 279 } 275 280 281 // Degenerate. 276 282 if (strip != (geoSubMesh->mStripCount - 1)) 277 283 { 278 284 writeInts(indexBegin[i - 1], 1); 279 285 } 280 281 286 } 282 287 } … … 284 289 else 285 290 { 291 */ 286 292 // Write the index array. 287 293 for (int i = 0; i < geoSubMesh->mIndexCount; i++) … … 289 295 writeInts(geoSubMesh->mIndex[i], 1); 290 296 } 291 }297 //} 292 298 293 299 // M_GEOMETRY stream (Optional: present only if useSharedVertices = false) … … 300 306 writeSubMeshOperation(geoSubMesh); 301 307 302 // Bone assignments 308 // Bone assignments. 303 309 if (!geoSubMesh->mBones.empty()) 304 310 { … … 347 353 348 354 buffer_count = 3; 349 350 355 351 356 // Calculate the size in bytes of the geometry chunk. -
GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshView.cpp
r1069 r1070 1007 1007 }//End drawTriangleStrip. 1008 1008 1009 1010 1009 //--------------------------------------------------------------------------- 1011 1010 // Paint lodtree object. … … 1172 1171 } 1173 1172 1174 1175 1176 1173 //--------------------------------------------------------------------------- 1177 1174 // Sets the lodstripslibrary object. … … 1213 1210 draw(); 1214 1211 } 1215 1216 1212 1217 1213 //--------------------------------------------------------------------------- … … 1319 1315 1320 1316 // Calculate the FPS. 1321 calcFPS(); 1322 } 1323 1317 //calcFPS(); 1318 } 1324 1319 1325 1320 #include <IL/ILUT.h> … … 1338 1333 } 1339 1334 1340 1341 1335 void GeoMeshView::LoadTextureSubMesh(int isubmesh, const char *imgfile) 1342 1336 { … … 1366 1360 } 1367 1361 } 1368 1369 1362 1370 1363 bool GeoMeshView::SetTextureRenderingState(int submesh) … … 1388 1381 } 1389 1382 1390 1391 1383 int GeoMeshView::findLeavesSubMesh(void) 1392 1384 { … … 1396 1388 return -1; 1397 1389 } 1390 -
GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshViewUI.cpp
r1058 r1070 183 183 } 184 184 185 // If answer yes to replace question .185 // If answer yes to replace question 186 186 // or if file not exists. 187 187 if (answer_yes) 188 188 { 189 189 mesh_saver = new GeoMeshSaver(); 190 191 // Debug. 192 mGeoMesh = mGeoMesh->toSharedVertex(); 193 //------------------------------------- 190 194 191 195 mesh_saver->save(mGeoMesh,filename_name(file_name)); … … 803 807 // Loads a mesh file. 804 808 openMeshFile(); 805 806 809 807 810 // If an object is loaded. … … 828 831 delete fcho; 829 832 830 // Hide the right panel.831 hideRightPanel();832 833 // Show title.834 mProcessTitle->label("Visualize LodStrips");835 836 // Show the Visulize LodStrips panel.837 showLodStripSlider();838 839 // Repaint the window.840 mMainWindow->redraw();833 // Hide the right panel. 834 hideRightPanel(); 835 836 // Show title. 837 mProcessTitle->label("Visualize LodStrips"); 838 839 // Show the Visulize LodStrips panel. 840 showLodStripSlider(); 841 842 // Repaint the window. 843 mMainWindow->redraw(); 841 844 842 845 } … … 2408 2411 2409 2412 // Puts the slider in the max position. 2410 //mLodStripSlider->value(lodStripsLib->MinLod());2413 mLodStripSlider->value(1.0f); 2411 2414 } 2412 2415 … … 3109 3112 o->begin(); 3110 3113 3114 /* 3111 3115 { 3112 3116 fltk::Widget* o; … … 3116 3120 o->color((fltk::Color)0xe0dfe300); 3117 3121 } 3122 */ 3118 3123 3119 3124 { … … 3133 3138 3134 3139 // Hide triangle count. 3135 o->hide();3140 //o->hide(); 3136 3141 } 3137 3142
Note: See TracChangeset
for help on using the changeset viewer.