Go to the documentation of this file.
15 #ifndef BELUGA_SENSOR_DATA_REGULAR_GRID_HPP
16 #define BELUGA_SENSOR_DATA_REGULAR_GRID_HPP
22 #include <range/v3/view/transform.hpp>
64 template <
typename Derived,
int NDim>
75 const auto inv_resolution = 1. / this->
self().resolution();
76 return (p * inv_resolution).array().floor().template cast<int>();
95 template <
class Range>
97 return cells | ranges::views::transform([
this](
const auto& cell) {
return this->
self().
coordinates_at(cell); });
101 template <
typename Derived>
105 template <
typename Derived>
Eigen::Vector< double, NDim > coordinates_at(const Eigen::Vector< int, NDim > &pi) const
Compute plane coordinates given grid cell coordinates.
auto coordinates_for(Range &&cells) const
Compute plane coordinates given a range of cell coordinates.
Eigen::Vector< int, NDim > cell_near(const Eigen::Vector< double, NDim > &p) const
Compute nearest grid cell coordinates given plane coordinates.
Regularly spaced N dimensional grid base type.
Eigen::Matrix< Scalar, Dims, 1 > Vector
Type alias for single-column matrices, available starting Eigen 3.4.
The main Beluga namespace.
beluga
Author(s):
autogenerated on Tue Jul 16 2024 02:59:53