using Duality;
using System;
using System.Collections.Generic;
namespace Steering
{
///
/// Creates velocity samples which are going to get tested with .
/// If the samples are poorly chosen or if there are simply not enough samples the agent won't be able to
/// choose "good" velocities which lead to a bad steering quality. If on the other hand to many samples are
/// generated the performance will suffer because for every sample the agent needs to calculate time of imapacts
/// with obstacles.
///
public interface IVelocitySampler
{
///
/// This method is called in every time step for every agent before the sampling starts.
/// If your implementation is adaptive you should throw away your old state here and start over.
///
void Reset();
///
/// Get the current sample velocity. The implementation is free to use internal information gathered from
/// previous calls to . You should make sure that your implementation
/// samples the zero-velocity.
///
/// Velocity which should be evaluated
Vector2 GetCurrentSample(Agent agent);
///
/// Feeds the evaluated cost back into the sampler. The cost value can be used to adapt and intelligent choose the next
/// velocities.
///
/// The cost which was returned from
/// with the current velocity as parameter
///
///
/// true
if more velocities should be sampled and false
if
/// no new velocities should be sampled.
///
bool SetCurrentCost(float cost);
}
}