MCPcopy Create free account
hub / github.com/Kitware/VTK / FindEdge

Function FindEdge

Filters/Geometry/vtkDataSetSurfaceFilter.cxx:296–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294 Map.insert(std::make_pair(std::make_pair(endpoint1, endpoint2), midpoint));
295 }
296 vtkIdType FindEdge(vtkIdType endpoint1, vtkIdType endpoint2)
297 {
298 if (endpoint1 == endpoint2)
299 {
300 return endpoint1;
301 }
302 if (endpoint1 > endpoint2)
303 std::swap(endpoint1, endpoint2);
304 MapType::iterator iter = Map.find(std::make_pair(endpoint1, endpoint2));
305 if (iter != Map.end())
306 {
307 return iter->second;
308 }
309 else
310 {
311 return -1;
312 }
313 }
314
315 void clear() { Map.clear(); }
316

Callers 1

CreateMethod · 0.85

Calls 3

swapFunction · 0.50
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected