Пример #1
0
        static bool reachedGoal(RVOSimulator sim)
        {
            /* Check if all agents have reached their goals. */
            for (int i = 0; i < sim.getNumAgents(); ++i) {
                if ((sim.getAgentPosition(i) - goals[i]).LengthSquared() > 4.0f * sim.getAgentRadius(i) * sim.getAgentRadius(i)) {
                    return false;
                }
            }

            return true;
        }