Ejemplo n.º 1
0
    void LocationModelManager::updateDebugLine(ModelPair const &key)
    {
        if(!(isValid(key.first) && isValid(key.second)))
            return;

        DynamicLines *line = nullptr;

        if(getDebugLine(key, line))
        {
            line->clear();
            line->addPoint(at(key.first)->position());
            line->addPoint(at(key.second)->position());
            line->update();
        }
    }
Ejemplo n.º 2
0
    void LocationModelManager::removeDebugLine(ModelPair const &key)
    {
        if(INVALID_ID == key.first || INVALID_ID == key.second)
            return;

        DynamicLines *line;

        if(getDebugLine(key, line))
        {
            line->clear();
            line->update();
            mLevel->levelRoot()->detachObject(line);
            delete line;
        }

        mDebugLines.erase(key);
    }