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

Method point3dToTuple

src/model/Space.cpp:3293–3305  ·  view source on GitHub ↗

helper function to get a boost polygon point from a Point3d

Source from the content-addressed store, hash-verified

3291
3292 // helper function to get a boost polygon point from a Point3d
3293 boost::tuple<double, double> Space_Impl::point3dToTuple(const Point3d& point3d, std::vector<Point3d>& allPoints, double tol) const {
3294 // simple method
3295 //return boost::make_tuple(point3d.x(), point3d.y());
3296
3297 // detailed method, try to combine points within tolerance
3298 for (const Point3d& otherPoint : allPoints) {
3299 if (std::sqrt(std::pow(point3d.x() - otherPoint.x(), 2) + std::pow(point3d.y() - otherPoint.y(), 2)) < tol) {
3300 return boost::make_tuple(otherPoint.x(), otherPoint.y());
3301 }
3302 }
3303 allPoints.push_back(point3d);
3304 return boost::make_tuple(point3d.x(), point3d.y());
3305 }
3306
3307 std::vector<ZoneMixing> Space_Impl::zoneMixing() const {
3308 return getObject<ModelObject>().getModelObjectSources<ZoneMixing>();

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected