Template Class base_grid_los

Inheritance Relationships

Base Types

  • public rer::client< base_grid_los< TGridViewEntityType, TFieldCoordRType > >

  • public TGridViewEntityType

Class Documentation

template<typename TGridViewEntityType, typename TFieldCoordRType>
class base_grid_los : public rer::client<base_grid_los<TGridViewEntityType, TFieldCoordRType>>, public TGridViewEntityType

A representation of the robot’s current line-of-sight as it moves through a grid of some kind. The robot is only able to update its internal state based on the information present in the per-timestep updates to this object.

The LOS for a robot is always square UNLESS the robot is near the edge of the source field, and a square grid would result in out-of-bounds array accesses. In that case, a truncated LOS is created.

All coordinates within a LOS are relative to the LOS itself (not its location within the arena). The origin is in the lower left corner of the LOS, regardless of the orientation of the robot.

Public Types

using field_coord_dtype = typename grid_view_entity_type::coord_type
using field_coord_rtype = TFieldCoordRType
using grid_view_entity_type = TGridViewEntityType
using los_coord_type = rmath::vector2z

Public Functions

inline base_grid_los(const rtypes::type_uuid &c_id, const grid_view_type &c_view, const rtypes::discretize_ratio &c_resolution)
virtual field_coord_dtype abs_ll(void) const = 0
virtual field_coord_dtype abs_lr(void) const = 0
virtual field_coord_dtype abs_ul(void) const = 0
virtual field_coord_dtype abs_ur(void) const = 0