gtsam_points
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
gtsam_points::FastOccupancyBlock Struct Reference

Fast occupancy grid block. More...

#include <fast_occupancy_grid.hpp>

Public Member Functions

int cell_index (const Eigen::Vector3i &coord) const
 Calculate the index of the cell in the block.
 
bool occupied (const Eigen::Vector3i &coord) const
 Check if the cell is occupied.
 
bool free (const Eigen::Vector3i &coord) const
 Check if the cell is free.
 
void set_occupied (const Eigen::Vector3i &coord)
 Set the cell as occupied.
 
void set_free (const Eigen::Vector3i &coord)
 Set the cell as free.
 
int count () const
 Count the number of occupied cells.
 

Public Attributes

std::bitset< num_cellscells
 Occupancy status of each cell in the block.
 

Static Public Attributes

static constexpr int stride = 8
 Size of the block in each dimension.
 
static constexpr int num_cells = stride * stride * stride
 Number of cells in the block.
 

Detailed Description

Fast occupancy grid block.

Member Function Documentation

◆ cell_index()

int gtsam_points::FastOccupancyBlock::cell_index ( const Eigen::Vector3i &  coord) const
inline

Calculate the index of the cell in the block.

Parameters
coordCoordinate of the cell.

◆ count()

int gtsam_points::FastOccupancyBlock::count ( ) const
inline

Count the number of occupied cells.

Returns
Number of occupied cells.

◆ free()

bool gtsam_points::FastOccupancyBlock::free ( const Eigen::Vector3i &  coord) const
inline

Check if the cell is free.

Parameters
coordCoordinate of the cell.
Returns
True if the cell is free.

◆ occupied()

bool gtsam_points::FastOccupancyBlock::occupied ( const Eigen::Vector3i &  coord) const
inline

Check if the cell is occupied.

Parameters
coordCoordinate of the cell.
Returns
True if the cell is occupied.

◆ set_free()

void gtsam_points::FastOccupancyBlock::set_free ( const Eigen::Vector3i &  coord)
inline

Set the cell as free.

Parameters
coordCoordinate of the cell.

◆ set_occupied()

void gtsam_points::FastOccupancyBlock::set_occupied ( const Eigen::Vector3i &  coord)
inline

Set the cell as occupied.

Parameters
coordCoordinate of the cell.

The documentation for this struct was generated from the following file: