MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / GetTotalObjectFaces

Function GetTotalObjectFaces

editor/editor_object_lighting.cpp:444–465  ·  view source on GitHub ↗

Gets the total number of object faces that exist in a mine

Source from the content-addressed store, hash-verified

442
443// Gets the total number of object faces that exist in a mine
444int GetTotalObjectFaces(int terrain) {
445 int i;
446 int facecount = 0;
447
448 for (i = 0; i <= Highest_object_index; i++) {
449 if (Objects[i].type != OBJ_NONE) {
450 if ((terrain != 0) != (OBJECT_OUTSIDE(&Objects[i]) != 0))
451 continue;
452
453 if (Objects[i].lighting_render_type == LRT_LIGHTMAPS) {
454 poly_model *po = &Poly_models[Objects[i].rtype.pobj_info.model_num];
455
456 if (!po->new_style)
457 continue;
458
459 facecount += CountFacesInPolymodel(po);
460 }
461 }
462 }
463
464 return facecount;
465}
466
467// Gets the total number of object faces that exist in a room
468int GetTotalObjectFacesForSingleRoom(int roomnum) {

Callers 2

DoRadiosityForRoomsFunction · 0.85
DoRadiosityForTerrainFunction · 0.85

Calls 1

CountFacesInPolymodelFunction · 0.85

Tested by

no test coverage detected