Program Listing for File avoidance_force.hpp

Return to documentation for file (cosm/apf2D/nav/avoidance_force.hpp)

#pragma once

/*******************************************************************************
 * Includes
 ******************************************************************************/
#include "rcppsw/rcppsw.hpp"

#include "cosm/cosm.hpp"
#include "cosm/apf2D/boid.hpp"
#include "cosm/apf2D/base_force.hpp"

/*******************************************************************************
 * Namespaces/Decls
 ******************************************************************************/
namespace cosm::apf2D::nav {

namespace config {
struct avoidance_force_config;
} /* namespace config */

/*******************************************************************************
 * Class Definitions
 ******************************************************************************/

class avoidance_force : public capf2D::base_force {
 public:
  explicit avoidance_force(const config::avoidance_force_config* config);

  rmath::vector2d operator()(const boid&, const rmath::vector2d& closest) const;

 private:
  /* clang-format off */
  const double mc_max;
  /* clang-format on */
};

} /* namespace cosm::apf2D::nav */