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

Function GradientHorizontalToObj

src/cpp/test/io_helpers.cpp:405–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

403 }
404
405 std::string GradientHorizontalToObj(const webifc::geometry::IfcCurve &geom)
406 {
407 std::stringstream obj;
408
409 for (uint32_t ic = 0; ic < geom.points.size(); ic++)
410 {
411 glm::dvec3 t = glm::dvec4(geom.points[ic].x, geom.points[ic].y, 0, 1);
412 obj << "v " << t.x << " " << t.y << " " << t.z << "\n";
413 }
414
415 uint32_t idx = 0;
416
417 for (uint32_t ic = 0; ic < geom.points.size() - 1; ic++)
418 {
419 obj << "l " << (idx) << " " << (idx + 1) << "\n";
420 idx++;
421 }
422
423 return obj.str();
424 }
425
426 std::string VAlignmentToObj(const std::vector<webifc::geometry::IfcAlignment> &geom)
427 {

Callers 1

DumpGradientCurveFunction · 0.85

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected