MCPcopy Create free account
hub / github.com/ThatOpen/engine_web-ifc / GradientVerticalToObj

Function GradientVerticalToObj

src/cpp/test/io_helpers.cpp:372–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370 }
371
372 std::string GradientVerticalToObj(const std::vector<webifc::geometry::IfcCurve> &geom)
373 {
374 std::stringstream obj;
375
376 for (uint32_t ia = 0; ia < geom.size(); ia++)
377 {
378 if (geom[ia].points.size() > 0)
379 {
380 for (uint32_t ic = 0; ic < geom[ia].points.size(); ic++)
381 {
382 glm::dvec3 t = glm::dvec4(geom[ia].points[ic].x, geom[ia].points[ic].y, 0, 1);
383 obj << "v " << t.x << " " << t.y << " " << t.z << "\n";
384 }
385 }
386 }
387
388 uint32_t idx = 0;
389
390 for (uint32_t ia = 0; ia < geom.size(); ia++)
391 {
392 if (geom[ia].points.size() > 0)
393 {
394 for (uint32_t ic = 0; ic < geom[ia].points.size() - 1; ic++)
395 {
396 obj << "l " << (idx) << " " << (idx + 1) << "\n";
397 idx++;
398 }
399 }
400 }
401
402 return obj.str();
403 }
404
405 std::string GradientHorizontalToObj(const webifc::geometry::IfcCurve &geom)
406 {

Callers 2

DumpGradientCurveFunction · 0.85
DumpSectionCurvesFunction · 0.85

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected