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

Function GradientVerticalToObjThree

src/cpp/test/dumpToThree.h:380–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

DumpGradientCurveThreeFunction · 0.85
DumpSectionCurvesThreeFunction · 0.85

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected