Finds the vertex Index from all Vertices of a planar Surface param : point3d param : allPoints param : tol returns : index of the Vertex
| 117 | // param : tol |
| 118 | // returns : index of the Vertex |
| 119 | size_t getOrCreateVertexIndexT(const Point3d& point3d, std::vector<Point3d>& allPoints, double tol = 0.001) { |
| 120 | size_t n = allPoints.size(); |
| 121 | for (size_t i = 0; i < n; ++i) { |
| 122 | if (openstudio::getDistance(point3d, allPoints[i]) < tol) { |
| 123 | return i; |
| 124 | } |
| 125 | } |
| 126 | allPoints.push_back(point3d); |
| 127 | return (allPoints.size() - 1); |
| 128 | } |
| 129 | |
| 130 | template <typename T> |
| 131 | std::vector<T> getObjectsAndSort(const model::Model& model) { |
no test coverage detected