Template Class BaseDenseGrid2
Defined in File dense_grid.hpp
Inheritance Relationships
Base Type
public beluga::BaseRegularGrid< Derived >
(Template Class BaseRegularGrid)
Derived Types
public beluga::BaseLinearGrid2< ValueGrid2< T > >
(Template Class BaseLinearGrid2)public beluga::BaseLinearGrid2< ValueGrid2< float > >
(Template Class BaseLinearGrid2)public beluga::BaseLinearGrid2< Derived >
(Template Class BaseLinearGrid2)
Class Documentation
-
template<typename Derived>
class BaseDenseGrid2 : public beluga::BaseRegularGrid<Derived> Dense 2D grid base type.
When instantiated, it satisfies Beluga named requirements: DenseGrid2.
- Template Parameters:
Derived – Concrete dense grid type. It must define
Derived::width()
,Derived::height()
,Derived::resolution()
,Derived::data_at(index)
, andDerived::index_at(int, int)
as described in Beluga named requirements: DenseGrid2.
Subclassed by beluga::BaseLinearGrid2< ValueGrid2< T > >, beluga::BaseLinearGrid2< ValueGrid2< float > >, beluga::BaseLinearGrid2< Derived >
Public Functions
-
inline bool contains(int xi, int yi) const
Checks if a cell is included in the grid.
- Parameters:
xi – Grid cell x-axis coordinate.
yi – Grid cell y-axis coordinate.
-
inline bool contains(const Eigen::Vector2i &pi) const
Checks if a cell is included in the grid.
- Parameters:
pi – Grid cell coordinates.
-
inline auto data_at(int xi, int yi) const
Gets cell data, if included.
- Parameters:
xi – Grid cell x-axis coordinate.
yi – Grid cell y-axis coordinate.
- Returns:
Cell data if included,
std::nullopt
otherwise.
-
inline auto data_at(const Eigen::Vector2i &pi) const
Gets cell data, if included.
- Parameters:
pi – Grid cell coordinates.
- Returns:
Cell data if included,
std::nullopt
otherwise.
-
inline auto data_near(double x, double y) const
Gets nearest cell data, if included.
- Parameters:
x – Plane x-axis coordinate.
y – Plane y-axis coordinate.
- Returns:
Cell data if included,
std::nullopt
otherwise.
-
inline auto data_near(const Eigen::Vector2d &p) const
Gets nearest cell data, if included.
- Parameters:
p – Plane coordinates.
- Returns:
Cell data if included,
std::nullopt
otherwise.
-
inline auto neighborhood4(int xi, int yi) const
Computes 4-connected neighborhood for cell.
- Parameters:
xi – Grid cell x-axis coordinate.
yi – Grid cell y-axis coordinate.
- Returns:
range of neighbor cells.
-
inline auto neighborhood4(const Eigen::Vector2i &pi) const
Computes 4-connected neighborhood for cell.
- Parameters:
pi – Grid cell coordinates.
- Returns:
range of neighbor cells.