17 #include <mrpt/maps/CPointsMap.h> 18 #include <mrpt/math/TLine3D.h> 19 #include <mrpt/math/TPoint3D.h> 20 #include <mrpt/math/geometry.h> 21 #include <mrpt/serialization/CSerializable.h> 48 public std::enable_shared_from_this<metric_map_t>
74 std::map<layer_name_t, mrpt::maps::CMetricMap::Ptr>
layers;
77 std::vector<mrpt::math::TLine3D>
lines;
87 std::optional<uint64_t>
id;
95 std::optional<std::string>
label;
103 virtual bool empty()
const;
106 virtual size_t size()
const;
116 virtual void clear();
150 const ->
std::shared_ptr<
mrpt::opengl::CSetOfObjects>;
162 const
std::optional<
mrpt::math::TPose3D>& otherRelativePose =
180 const
mrpt::maps::CPointsMap::Ptr& pts);
193 ConstPtr get_shared_from_this() const;
194 ConstPtr get_shared_from_this_or_clone() const;
201 [maybe_unused]]
mrpt::serialization::CArchive&
out)
const 207 [maybe_unused]] mrpt::serialization::CArchive& in)
232 for (
const auto& kv : pc.
layers)
236 std::dynamic_pointer_cast<mrpt::maps::CPointsMap>(kv.second);
238 point_layers[kv.first].assign(pts->size(), initBoolValue);
240 std::set<layer_name_t> layersToRemove;
241 for (
auto& kv : point_layers)
243 if (pc.
layers.count(kv.first) == 0) layersToRemove.insert(kv.first);
245 for (
const auto& ly : layersToRemove) point_layers.erase(ly);
248 lines.assign(pc.
lines.size(), initBoolValue);
251 planes.assign(pc.
planes.size(), initBoolValue);
std::map< layer_name_t, mrpt::maps::CMetricMap::Ptr > layers
virtual void derivedSerializeFrom([[maybe_unused]] mrpt::serialization::CArchive &in)
virtual std::string contents_summary() const
void initialize_from(const metric_map_t &pc, bool initBoolValue=false)
Generic container of pointcloud(s), extracted features and other maps.
virtual void merge_with(const metric_map_t &otherPc, const std::optional< mrpt::math::TPose3D > &otherRelativePose=std::nullopt)
Ptr get_shared_from_this()
Render parameters for the different geometric entities.
Ptr get_shared_from_this_or_clone()
virtual bool empty() const
std::optional< std::string > label
static constexpr const char * PT_LAYER_PLANE_CENTROIDS
void get_visualization_points(mrpt::opengl::CSetOfObjects &o, const render_params_points_t &p) const
std::vector< bool > planes
std::vector< mrpt::math::TLine3D > lines
static constexpr const char * PT_LAYER_RAW
virtual size_t size() const
virtual size_t size_points_only() const
virtual auto get_visualization(const render_params_t &p=render_params_t()) const -> std::shared_ptr< mrpt::opengl::CSetOfObjects >
bool load_from_file(const std::string &fileName)
bool save_to_file(const std::string &fileName) const
mrpt::maps::CPointsMap::Ptr point_layer(const layer_name_t &name) const
void get_visualization_lines(mrpt::opengl::CSetOfObjects &o, const render_params_lines_t &p) const
std::vector< bool > lines
virtual void derivedSerializeTo([[maybe_unused]] mrpt::serialization::CArchive &out) const
void get_visualization_planes(mrpt::opengl::CSetOfObjects &o, const render_params_planes_t &p) const
static void get_visualization_point_layer(mrpt::opengl::CSetOfObjects &o, const render_params_point_layer_t &p, const mrpt::maps::CPointsMap::Ptr &pts)
std::vector< plane_patch_t > planes
std::optional< uint64_t > id
std::map< layer_name_t, std::vector< bool > > point_layers