MCPcopy Create free account
hub / github.com/OpenWebCAD/node-occ / push_point

Method push_point

src/Mesh.cc:76–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76uint32_t Mesh::push_point(const Coord3f& point) {
77 long hash = hashpoint(point.x, point.y, point.z);
78 auto it = this->_mapVertices.find(hash);
79 if (it == this->_mapVertices.end()) {
80 this->_vertices.push_back(point);
81 uint32_t index = (uint32_t)(this->_vertices.size() - 1);
82 this->_mapVertices[hash] = index;
83 return index;
84 }
85 return it->second;
86}
87
88uint32_t Mesh::push_normal(const Coord3f& normal) {
89 long hash = hashpoint(normal.x, normal.y, normal.z);

Callers

nothing calls this directly

Calls 1

hashpointFunction · 0.85

Tested by

no test coverage detected