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

Function VAlignmentToObjThree

src/cpp/test/dumpToThree.h:426–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424 }
425
426 inline std::string VAlignmentToObjThree(const std::vector<webifc::geometry::IfcAlignment>& geom)
427 {
428 std::stringstream obj;
429 for (uint32_t ia = 0; ia < geom.size(); ia++)
430 {
431 for (uint32_t ic = 0; ic < geom[ia].Vertical.curves.size(); ic++)
432 {
433 for (uint32_t ip = 0; ip < geom[ia].Vertical.curves[ic].points.size(); ip++)
434 {
435 glm::dvec3 t = glm::dvec4(geom[ia].Vertical.curves[ic].points[ip].x, geom[ia].Vertical.curves[ic].points[ip].y, 0, 1);
436 obj << "v " << t.x << " " << t.y << " " << t.z << "\n";
437 }
438 }
439 }
440 uint32_t idx = 0;
441 for (uint32_t ia = 0; ia < geom.size(); ia++)
442 {
443 if (geom[ia].Vertical.curves.size() > 0)
444 {
445 for (uint32_t ic = 0; ic < geom[ia].Vertical.curves.size(); ic++)
446 {
447 if (geom[ia].Vertical.curves[ic].points.size() > 0)
448 {
449 for (uint32_t ip = 0; ip < geom[ia].Vertical.curves[ic].points.size() - 1; ip++)
450 {
451 obj << "l " << (idx) << " " << (idx + 1) << "\n";
452 idx++;
453 }
454 }
455 }
456 }
457 }
458 return obj.str();
459 }
460
461 inline std::string HAlignmentToObjThree(const std::vector<webifc::geometry::IfcAlignment>& geom)
462 {

Callers 1

DumpAlignmentThreeFunction · 0.85

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected