Template Class base_grid_overlay

Inheritance Relationships

Base Type

Class Documentation

template<typename TOriginType>
class base_grid_overlay : public rcppsw::er::client<base_grid_overlay<TOriginType>>

Base class for logical grids that are overlayed over a continuous environment. It discretizes the continuous volume into a grid of a specified resolution (e.g. it takes a continuous 10.0 x 5.0 x 5.0 space and discretizes it into a 50 x 25 x 25 grid of cells with a resolution of 0.2).

The origin of the continuous environment onto which the discretized grid is overlayed are not necessarily the same, so an anchor/origin point for the discretized grid is required.

Public Types

using origin_dtype = typename std::conditional<std::is_same<TOriginType, math::vector2z>::value, math::vector2z, math::vector3z>::type
using origin_rtype = typename std::conditional<std::is_same<TOriginType, math::vector2d>::value, math::vector2d, math::vector3d>::type

Public Functions

inline base_grid_overlay(const origin_rtype &origin, const types::discretize_ratio &grid_resolution, const types::discretize_ratio &field_resolution)
virtual ~base_grid_overlay(void) = default
inline const origin_dtype &origind(void) const

Return the discretized origin of the grid.

inline const origin_rtype &originr(void) const

Return the real origin of the grid in real coordinates.

inline const types::discretize_ratio &resolution(void) const

Return the resolution of the grid.