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

Function getBounds

src/cpp/test/dumpToThree.h:661–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

659 }
660
661 inline Bounds getBounds(std::vector<std::vector<glm::dvec2>> input, glm::dvec2 size, glm::dvec2 offset)
662 {
663 std::vector<glm::dvec2> retval;
664 glm::dvec2 min(DBL_MAX, DBL_MAX);
665 glm::dvec2 max(-DBL_MAX, -DBL_MAX);
666 for (auto& loop : input)
667 {
668 for (auto& point : loop)
669 {
670 min = glm::min(min, point);
671 max = glm::max(max, point);
672 }
673 }
674 double width = max.x - min.x;
675 double height = max.y - min.y;
676 if (width == 0 && height == 0)
677 {
678 printf("asdf");
679 }
680 return { min, max };
681 }
682
683 inline void DumpCurveToHtml(std::vector<glm::dvec3> points, std::string filename, std::vector<uint32_t> indices = {})
684 {

Callers 1

GetBoundsMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected