Last active
August 29, 2015 14:13
-
-
Save jose-villegas/3aa7f4b95019a3f95a39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto it = std::find_if(progVertices.begin(), progVertices.end(), | |
[&minCostVertex](const std::pair<unsigned int, Vertex *> &index) { | |
// found smaller cost so swap vertex candidate | |
if (index.second->collapseCost < minCostVertex->collapseCost) { | |
minCostVertex = index.second; | |
// early loop break if the collapse cost is zero or really close to zero | |
if (minCostVertex->collapseCost > -glm::epsilon<float>() && minCostVertex->collapseCost < glm::epsilon<float>()) { | |
return true; | |
} | |
} | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment