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

Function CountFacesInPolymodel

model/polymodel.cpp:3104–3119  ·  view source on GitHub ↗

MTS: not used? Returns the total number of faces in a model

Source from the content-addressed store, hash-verified

3102// MTS: not used?
3103// Returns the total number of faces in a model
3104int CountFacesInPolymodel(poly_model *pm) {
3105 int i;
3106 ASSERT(pm->used > 0);
3107 int count = 0;
3108
3109 ASSERT(!(pm->flags & PMF_NOT_RESIDENT));
3110
3111 for (i = 0; i < pm->n_models; i++) {
3112 if (IsNonRenderableSubmodel(pm, i))
3113 continue;
3114
3115 count += pm->submodel[i].num_faces;
3116 }
3117
3118 return count;
3119}
3120
3121// Given an object, a submodel, and a vertex number, calculates the world position
3122// of that point

Callers 3

UpdateDialogMethod · 0.85
GetTotalObjectFacesFunction · 0.85

Calls 1

IsNonRenderableSubmodelFunction · 0.85

Tested by

no test coverage detected