Beispiel #1
0
Circle::Circle(const Vector2& _center, const double& _radius)
{
    centroid = _center;
    radius = _radius;
    drag_point = -1;

    // init default polygon
    calculate_points();
}
    VTankObject::StatisticsList compile_and_calculate()
    {
        // Wait for the tasks to stop executing.
        thread_pool.wait();

        boost::unique_lock<boost::shared_mutex> guard(mutex);

        // Now gather statistics.
        VTankObject::StatisticsList stats;

        std::map<int, VTankObject::Statistics>::iterator i = statistics.begin();
        for (; i != statistics.end(); i++) {
            calculate_points(i->second);
			if (i->second.kills == 0 && i->second.assists == 0 && i->second.deaths == 0 &&
				i->second.objectivesCaptured == 0 && i->second.objectivesCompleted == 0) {
				continue;
			}
            stats.push_back(i->second);
        }

        return stats;
    }