Kaim::AvoidanceSolver< TraverseLogic > Class Template Reference

Kaim::AvoidanceSolver< TraverseLogic > Class Template Reference

#include <avoidancesolver.h>

Class Description

template<class TraverseLogic>
class Kaim::AvoidanceSolver< TraverseLogic >

AvoidanceSolver computes a velocity compatible with all the colliders in AvoidanceWorkspace and the NavData accordingly to TraverseLogic.

Inherits Kaim::IAvoidanceSolver.

Public Member Functions

 AvoidanceSolver ()
 
virtual AvoidanceResult Solve (AvoidanceSolverConfig &config, const Vec2f &previousVelocity, const Vec2f &desiredVelocity, Vec2f &outputVelocity, Vec2f &outputFrontDirection, bool &collide)
 

Member Function Documentation

template<class TLogic >
AvoidanceResult Kaim::AvoidanceSolver< TLogic >::Solve ( AvoidanceSolverConfig &  config,
const Vec2f previousVelocity,
const Vec2f desiredVelocity,
Vec2f outputVelocity,
Vec2f outputFrontDirection,
bool &  collide 
)
virtual

Compute the more appropriate velocity.

It stops at the first compatible one in this order:

  1. directly check desiredVelocity
  2. try reducing speed in desiredVelocity direction
  3. search solutions in other directions.

    If no solution is found, outputVelocity is set to null vector.

Implements Kaim::IAvoidanceSolver.


The documentation for this class was generated from the following files: