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

Function boostPointFromPoint3d

src/utilities/geometry/Intersection.cpp:324–334  ·  view source on GitHub ↗

convert a Point3d to a BoostPoint

Source from the content-addressed store, hash-verified

322
323// convert a Point3d to a BoostPoint
324boost::tuple<double, double> boostPointFromPoint3d(const Point3d& point3d, std::vector<Point3d>& allPoints, double tol) {
325 OS_ASSERT(std::abs(point3d.z()) <= tol);
326
327 // simple method
328 //return boost::make_tuple(point3d.x(), point3d.y());
329
330 // detailed method, try to combine points within tolerance
331 const Point3d resultPoint = getCombinedPoint(point3d, allPoints, tol);
332
333 return boost::make_tuple(resultPoint.x() * scaleBy, resultPoint.y() * scaleBy);
334}
335
336// convert vertices to a boost polygon, all vertices must lie on z = 0 plane
337boost::optional<BoostPolygon> boostPolygonFromVertices(const std::vector<Point3d>& vertices, std::vector<Point3d>& allPoints, double tol) {

Callers 6

boostPolygonFromVerticesFunction · 0.85
boostRingFromVerticesFunction · 0.85
polygonInPolygonFunction · 0.85
pointInPolygonFunction · 0.85
withinFunction · 0.85
BoostPolygonFromPolygonFunction · 0.85

Calls 5

absFunction · 0.85
getCombinedPointFunction · 0.85
zMethod · 0.45
xMethod · 0.45
yMethod · 0.45

Tested by

no test coverage detected