MCPcopy Create free account
hub / github.com/BIMCoderLiang/LNLib / pushDelaunayGraphEdge

Method pushDelaunayGraphEdge

src/LNLib/Algorithm/Voronoi.cpp:781–794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

779}
780
781void LNLib::VoronoiDiagramGenerator::pushDelaunayGraphEdge(float x1, float y1, float x2, float y2)
782{
783 if (std::sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))) < minDistanceBetweenSites)
784 {
785 return;
786 }
787 GraphEdge* newEdge = new GraphEdge;
788 newEdge->next = delaunayEdges;
789 delaunayEdges = newEdge;
790 newEdge->x1 = x1;
791 newEdge->y1 = y1;
792 newEdge->x2 = x2;
793 newEdge->y2 = y2;
794}
795
796char* LNLib::VoronoiDiagramGenerator::myalloc(unsigned n)
797{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected