Program Listing for File goal_acq_metrics.hpp
↰ Return to documentation for file (cosm/spatial/metrics/goal_acq_metrics.hpp
)
#pragma once
/*******************************************************************************
* Includes
******************************************************************************/
#include <utility>
#include <boost/optional.hpp>
#include "rcppsw/metrics/base_metrics.hpp"
#include "rcppsw/math/vector3.hpp"
#include "rcppsw/types/named_type.hpp"
#include "rcppsw/types/type_uuid.hpp"
#include "cosm/cosm.hpp"
/*******************************************************************************
* Namespaces
******************************************************************************/
namespace cosm::spatial::metrics {
/*******************************************************************************
* Class Definitions
******************************************************************************/
class goal_acq_metrics : public virtual rmetrics::base_metrics {
public:
struct exp_status {
bool is_exploring{false};
bool is_true{false};
};
using goal_type = rtypes::named_type<int, struct goal_type_tag>;
goal_acq_metrics(void) = default;
~goal_acq_metrics(void) override = default;
virtual goal_type acquisition_goal(void) const = 0;
virtual exp_status is_exploring_for_goal(void) const = 0;
virtual bool is_vectoring_to_goal(void) const = 0;
virtual bool goal_acquired(void) const = 0;
virtual rtypes::type_uuid entity_acquired_id(void) const = 0;
virtual boost::optional<rmath::vector3z> acquisition_loc3D(void) const = 0;
virtual boost::optional<rmath::vector3z> explore_loc3D(void) const = 0;
virtual boost::optional<rmath::vector3z> vector_loc3D(void) const = 0;
};
/*******************************************************************************
* Operators
******************************************************************************/
template<typename TInt>
bool operator==(const TInt& other, const goal_acq_metrics::goal_type& goal) {
return goal.v() == other;
}
template<typename TInt>
bool operator!=(const TInt& other, const goal_acq_metrics::goal_type& goal) {
return goal.v() != other;
}
} /* namespace cosm::spatial::metrics */