MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / getCombinedPoint

Function getCombinedPoint

src/utilities/geometry/Geometry.cpp:423–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423Point3d getCombinedPoint(const Point3d& point3d, std::vector<Point3d>& allPoints, double tol) {
424 for (const Point3d& otherPoint : allPoints) {
425 if (std::sqrt(std::pow(point3d.x() - otherPoint.x(), 2) + std::pow(point3d.y() - otherPoint.y(), 2) + std::pow(point3d.z() - otherPoint.z(), 2))
426 < tol) {
427 return otherPoint;
428 }
429 }
430 allPoints.push_back(point3d);
431 return point3d;
432}
433
434std::vector<std::vector<Point3d>> computeTriangulation(const Point3dVector& vertices, const std::vector<std::vector<Point3d>>& holes, double tol) {
435 std::vector<std::vector<Point3d>> result;

Callers 5

computeTriangulationFunction · 0.85
boostPointFromPoint3dFunction · 0.85
verticesFromBoostPolygonFunction · 0.85
verticesFromBoostRingFunction · 0.85
PolygonFromBoostPolygonFunction · 0.85

Calls 5

powFunction · 0.50
xMethod · 0.45
yMethod · 0.45
zMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected