Commit 8fab26d8 authored by Jean-Marie Favreau's avatar Jean-Marie Favreau
Browse files

The pseudo-volumic approach is now ready

parent 04cc2e63
......@@ -822,14 +822,13 @@ bool MeshPathes::isValidPathPseudoVolumic(const std::deque<VertexID> & path,
newCoords.back().getY(),
newCoords.back().getZ()) != 0)
inregion = true;
if (mask(newCoords.back().getX(),
if (insideMask(newCoords.back().getX(),
newCoords.back().getY(),
newCoords.back().getZ()) != 0)
++nbInside;
}
// TODO
return true;
return (!inregion) || ((nbInside > path.size() / 2) && inside) || ((nbInside < path.size() / 2) && !inside);
}
......@@ -884,7 +883,7 @@ std::deque<VertexID> MeshPathes::getShortestNonSeparatingCyclePseudoVolumic(doub
if ((lastLength < 0) || (lastLength > bS.second + addedLength)) {
if (cMesh.isNonSeparatingCycle(newResult)) {
if (isValidPathPseudoVolumic(newResult, insideMask, region, inside)) {
if ((minLength < bS.second + addedLength) && isValidPathPseudoVolumic(newResult, insideMask, region, inside)) {
lastLength = bS.second + addedLength;
result = newResult;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment