MCPcopy Create free account
hub / github.com/TheRealMJP/SHforHLSL / countTriangles

Function countTriangles

SHTest/Externals/meshoptimizer/simplifier.cpp:1319–1333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1317}
1318
1319static size_t countTriangles(const unsigned int* vertex_ids, const unsigned int* indices, size_t index_count)
1320{
1321 size_t result = 0;
1322
1323 for (size_t i = 0; i < index_count; i += 3)
1324 {
1325 unsigned int id0 = vertex_ids[indices[i + 0]];
1326 unsigned int id1 = vertex_ids[indices[i + 1]];
1327 unsigned int id2 = vertex_ids[indices[i + 2]];
1328
1329 result += (id0 != id1) & (id0 != id2) & (id1 != id2);
1330 }
1331
1332 return result;
1333}
1334
1335static size_t fillVertexCells(unsigned int* table, size_t table_size, unsigned int* vertex_cells, const unsigned int* vertex_ids, size_t vertex_count)
1336{

Callers 1

meshopt_simplifySloppyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected