Пример #1
0
void BeeHive::MakeLine (const Hexagon& start, const Hexagon& end, vector<Hexagon>& line, ccColor4F color /*= ccc4f(1, 1, 1, 1)*/)
{
    float N = start.Distance (end);
    if (N==0)return;
    for (int i = 0; i <= N; ++i)
    {
        Hexagon  h = (start * (1 - i / N) + end * i / N).Round();
        h.color = color;
        line.push_back (h);
    }
}