void AreasBuilder::explore()
{
exploreAreas();
- // std::cout << "exploreAreas ended\n";
areas->cleanInvalidNodeAreas();
- // std::cout << "cleanInvalidNodeAreas ended\n";
filterHighPass();
- // std::cout << "explore ended\n";
- // std::cout << "-------\n";
- // for (mcIdType areaId = 0; areaId < areas->getNumberOfAreas(); ++areaId)
- // {
- // std::cout << "area " << areaId << ": "
- // << areas->getNumberOfNodes(areaId) << ", "
- // << areas->getPrimitiveTypeName(areaId)
- // << "\n";
- // }
}
void AreasBuilder::expand()
{
expandAreas();
- // std::cout << "expandAreas ended\n";
filterHighPass();
- // std::cout << "expand ended\n";
- // std::cout << "-------\n";
- // for (mcIdType areaId = 0; areaId < areas->getNumberOfAreas(); ++areaId)
- // {
- // std::cout << "area " << areaId << ": "
- // << areas->getNumberOfNodes(areaId) << ", "
- // << areas->getPrimitiveTypeName(areaId)
- // << "\n";
- // }
}
void AreasBuilder::rebuild()
{
rebuildInvalidAreas();
- // std::cout << "rebuildInvalidAreas ended\n";
filterHighPass();
- // std::cout << "filterHighPass ended\n";
expandAreasByType(PrimitiveType::Cone);
- // std::cout << "expandAreas Cone ended\n";
filterHighPass();
- // std::cout << "rebuild ended\n";
}
Areas *AreasBuilder::getAreas() const
else
areaId = areas->addArea(nodes->getPrimitiveType(nodeId));
areas->addNode(areaId, nodeId);
- // if (nbNodesExplored % 1 == 0)
- // {
- // std::cout << "nodeId: " << nodeId << " " << convertPrimitiveToString(nodes->getPrimitiveType(nodeId)) << "\n";
- // std::cout << "nbNodesExplored (current area: "
- // << areaId
- // << ", "
- // << areas->getPrimitiveTypeName(areaId)
- // << "): "
- // << nbNodesExplored
- // << "\n";
- // }
const std::vector<mcIdType> neighbors = nodes->getNeighbors(nodeId);
for (mcIdType neighborId : neighbors)
{
nodesToExplore.erase(neighborId);
if (doesItMatch(areaId, neighborId))
{
- // if (!exploredNodeIds[neighborId])
- // nbNodesExplored += 1;
- // if (areas->getNumberOfNodes(areaId) % 500 == 0)
- // {
- // std::cout << "nbNodesExplored (current area: "
- // << areaId
- // << ", " << areas->getPrimitiveTypeName(areaId)
- // << ", " << areas->getNumberOfNodes(areaId)
- // << "): "
- // << nbNodesExplored
- // << "\n";
- // std::cout << "neighborId: " << neighborId << " " << convertPrimitiveToString(nodes->getPrimitiveType(neighborId)) << "\n";
- // }
exploredNodeIds[neighborId] = true;
areas->addNode(areaId, neighborId);
const std::vector<mcIdType> neighborsOfNeighbor = nodes->getNeighbors(neighborId);