void TaskRenderer::Draw(const OrderedTask &task) { tpv.SetBoundingBox(task.GetBoundingBox(screen_bounds)); tpv.SetActiveIndex(task.GetActiveIndex()); for (unsigned i = 0; i < 4; i++) { tpv.ResetIndex(); if (i != TaskPointRenderer::LAYER_SYMBOLS && i != TaskPointRenderer::LAYER_LEG) { tpv.SetModeOptional(true); for (const auto &tp : task.GetOptionalStartPoints()) tpv.Draw(tp, (TaskPointRenderer::Layer)i); } tpv.SetModeOptional(false); for (const auto &tp : task.GetPoints()) tpv.Draw(tp, (TaskPointRenderer::Layer)i); } if (task.GetFactoryType() == TaskFactoryType::MAT) { // now draw MAT circles tpv.ResetIndex(); tpv.SetModeOptional(false); for (const auto *i : task.GetMatPoints()) tpv.Draw(*i, (TaskPointRenderer::Layer)2); } }
void TaskRenderer::Draw(const OrderedTask &task) { tpv.SetBoundingBox(task.GetBoundingBox(screen_bounds)); tpv.SetActiveIndex(task.GetActiveIndex()); for (unsigned i = 0; i < 4; i++) { tpv.ResetIndex(); if (i != TaskPointRenderer::LAYER_SYMBOLS && i != TaskPointRenderer::LAYER_LEG) { tpv.SetModeOptional(true); for (const auto &tp : task.GetOptionalStartPoints()) tpv.Draw(tp, (TaskPointRenderer::Layer)i); } tpv.SetModeOptional(false); for (const auto &tp : task.GetPoints()) tpv.Draw(tp, (TaskPointRenderer::Layer)i); } }
void TaskRenderer::Draw(const OrderedTask &task) { tpv.SetBoundingBox(task.GetBoundingBox(screen_bounds)); tpv.SetActiveIndex(task.GetActiveIndex()); for (unsigned i = 0; i < 4; i++) { tpv.ResetIndex(); if (i != TaskPointRenderer::LAYER_SYMBOLS && i != TaskPointRenderer::LAYER_LEG) { tpv.SetModeOptional(true); for (unsigned j = 0, end = task.GetOptionalStartPointCount(); j < end; ++j) tpv.Draw(task.GetOptionalStartPoint(j), (TaskPointRenderer::Layer)i); } tpv.SetModeOptional(false); for (unsigned j = 0, end = task.TaskSize(); j < end; ++j) tpv.Draw(task.GetTaskPoint(j), (TaskPointRenderer::Layer)i); } }