19 std::map<size_t, std::function<void()>> contextMenuActions;
20 std::optional<std::function<void(
Eigen::Matrix4f const&)>> transformEndAction;
23 template <
typename ElementT>
28 auto iterator = observedLayers.find(layer.
data_.name);
30 if (iterator == observedLayers.end())
32 std::tie(iterator, std::ignore) = observedLayers.emplace(layer.
data_.name, layer);
35 auto& [name, observedLayer] = *iterator;
36 return observedLayer.observations[element.data_->id];
47 explicit ObservedLayer(
viz::Layer & layer) : layer(layer) {}
49 std::reference_wrapper<viz::Layer> layer;
50 std::map<std::string, Observation> observations;
53 std::map<std::string, ObservedLayer> observedLayers;