void HexGrid::addPoint(Point p) { Hexagon *h = findHexagon(p); if (!h->dense()) { h->increment(); if (dense(h)) { h->setDense(); m_miny = std::min(m_miny, h->y() - 1); if (h->possibleRoot()) { m_pos_roots.insert(h); } markNeighborBelow(h); } } }
void HexGrid::addPoint(Point p) { if (m_width < 0) { m_sample.push_back(p); if (m_sample.size() >= m_maxSample) processSample(); return; } Hexagon *h = findHexagon(p); h->increment(); if (!h->dense()) { if (dense(h)) { h->setDense(); m_miny = std::min(m_miny, h->y() - 1); if (h->possibleRoot()) m_pos_roots.insert(h); markNeighborBelow(h); } } }