Program Listing for File seek_force.hpp
↰ Return to documentation for file (cosm/apf2D/nav/seek_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 {
/*******************************************************************************
* Class Definitions
******************************************************************************/
class seek_force : public rer::client<seek_force>,
public capf2D::base_force {
public:
explicit seek_force(double max)
: ER_CLIENT_INIT("cosm.apf2D.nav.seek_force"),
mc_max(max) {}
rmath::vector2d operator()(const boid& agent,
const rmath::vector2d& target) const;
private:
/* clang-format off */
const double mc_max;
/* clang-format on */
};
} /* namespace cosm::apf2D::nav */