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

Function getVertexIndex

src/model/ThreeJSForwardTranslator.cpp:152–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150 }
151
152 size_t getVertexIndex(const Point3d& point3d, std::vector<Point3d>& allPoints, double tol = 0.001) {
153 size_t n = allPoints.size();
154 for (size_t i = 0; i < n; ++i) {
155 if (std::sqrt(std::pow(point3d.x() - allPoints[i].x(), 2) + std::pow(point3d.y() - allPoints[i].y(), 2)
156 + std::pow(point3d.z() - allPoints[i].z(), 2))
157 < tol) {
158 return i;
159 }
160 }
161 allPoints.push_back(point3d);
162 return (allPoints.size() - 1);
163 }
164
165 std::string getBoundaryMaterialName(const ThreeUserData& userData) {
166 std::string result;

Callers 1

makeGeometriesFunction · 0.70

Calls 6

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

Tested by

no test coverage detected