Template Class SpatialDatabase

Class Documentation

template<typename ObjectIdType>
class vi_map_helpers::SpatialDatabase

Public Types

typedef std::unordered_map<Eigen::Vector3i, std::vector<ObjectIdType>> SpatialMap
typedef AlignedUnorderedSet<Eigen::Vector3i> GridCellSet
typedef AlignedUnorderedMap<vi_map::MissionId, GridCellSet> MissionGridCellsMap
typedef SpatialMap::value_type value_type
typedef SpatialMap::const_iterator const_iterator

Public Functions

SpatialDatabase(const vi_map::VIMap &map, const Eigen::Vector3i &grid_resolution)
SpatialDatabase(const vi_map::VIMap &map, const Eigen::Vector3d &grid_cell_size)
const_iterator begin() const
const_iterator end() const
void getGridResolution(Eigen::Vector3i *resolution) const
void getObjectIdsInRadius(const Eigen::Vector3d &p_G_center, double radius_meters, std::unordered_set<ObjectIdType> *neighbors) const
void getObjectIdsOfMissionInRadius(const vi_map::MissionId &mission_id, const Eigen::Vector3d &p_G_center, double radius, std::unordered_set<ObjectIdType> *neighbors) const
bool isCellEmpty(const Eigen::Vector3i &grid_index_3d) const
double getDistanceToMission(const Eigen::Vector3d &p_G, const vi_map::MissionId &mission_id) const
double getSquaredDistanceToGridCell(const Eigen::Vector3d &p_G, const Eigen::Vector3i &grid_index) const
void getObjectIdsInCuboid(const Eigen::Vector3d &p_G_min, const Eigen::Vector3d &p_G_max, std::vector<ObjectIdType> *output_vertex_ids) const
void getObjectIdsOfMissionInCuboid(const vi_map::MissionId &mission_id, const Eigen::Vector3d &p_G_min, const Eigen::Vector3d &p_G_max, std::vector<ObjectIdType> *output_object_ids) const
void getObjectIdsOfGridIndex(const Eigen::Vector3i &grid_index, std::vector<ObjectIdType> *grid_unit_vertex_ids) const
void getGridIndexForPosition(const Eigen::Vector3d &p_G_I, Eigen::Vector3i *grid_index_3d) const
Eigen::Vector3d getGridCellCenterPositionForGridIndex(const Eigen::Vector3i &grid_index_3d) const
Eigen::Vector3d getGridCellSize() const
const vi_map::VIMap &getMap() const
inline size_t size() const
inline size_t empty() const

Protected Attributes

const vi_map::VIMap &map_