Program Listing for File point_argument.hpp

Return to documentation for file (cosm/spatial/fsm/point_argument.hpp)

#pragma once

/*******************************************************************************
 * Includes
 ******************************************************************************/
#include "rcppsw/math/vector2.hpp"
#include "rcppsw/patterns/fsm/event.hpp"

#include "cosm/cosm.hpp"
#include "cosm/ta/taskable_argument.hpp"

/*******************************************************************************
 * Namespaces/Decls
 ******************************************************************************/
namespace cosm::spatial::fsm {

/*******************************************************************************
 * Class Definitions
 ******************************************************************************/
class point_argument final : public ta::taskable_argument,
                             public rpfsm::event_data {
 public:
  point_argument(void) = default;
  point_argument(double tolerance, const rmath::vector2d& v)
      : m_tolerance(tolerance), m_point(v) {}

  ~point_argument(void) override = default;

  const rmath::vector2d& point(void) const { return m_point; }
  double tolerance(void) const { return m_tolerance; }

 private:
  /* clang-format off */
  double          m_tolerance{-1};
  rmath::vector2d m_point{};
  /* clang-format on */
};

} /* namespace cosm::spatial::fsm */