MCPcopy Create free account
hub / github.com/comaps/comaps / StripToTriangles

Function StripToTriangles

libs/coding/geometry_coding.hpp:280–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280inline void StripToTriangles(size_t count, OutPointsT const & strip, OutPointsT & triangles)
281{
282 CHECK_GREATER_OR_EQUAL(count, 2, ());
283 triangles.clear();
284 triangles.reserve((count - 2) * 3);
285 for (size_t i = 2; i < count; ++i)
286 {
287 triangles.push_back(strip[i - 2]);
288 triangles.push_back(strip[i - 1]);
289 triangles.push_back(strip[i]);
290 }
291}
292
293inline void const * LoadInnerTriangles(void const * pBeg, size_t count, GeometryCodingParams const & params,
294 OutPointsT & triangles)

Callers 1

LoadInnerTrianglesFunction · 0.85

Calls 3

clearMethod · 0.45
reserveMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected