Open3D (C++ API)  0.18.0
MessageProcessor.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
11 
12 namespace open3d {
13 
14 namespace geometry {
15 class Geometry3D;
16 } // namespace geometry
17 
18 namespace visualization {
19 
20 namespace gui {
21 class Window;
22 } // namespace gui
23 
27 public:
28  using OnGeometryFunc = std::function<void(
29  std::shared_ptr<geometry::Geometry3D>, // geometry
30  const std::string&, // path
31  int, // time
32  const std::string&)>; // layer
34  : MessageProcessorBase(), window_(window), on_geometry_(on_geometry) {}
35 
36  std::shared_ptr<zmq::message_t> ProcessMessage(
37  const io::rpc::messages::Request& req,
39  const msgpack::object_handle& obj) override;
40 
41 private:
42  gui::Window* window_;
43  OnGeometryFunc on_geometry_;
44 
45  void SetGeometry(std::shared_ptr<geometry::Geometry3D> geom,
46  const std::string& path,
47  int time,
48  const std::string& layer);
49 };
50 
51 } // namespace visualization
52 } // namespace open3d
Definition: MessageProcessorBase.h:40
MessageProcessorBase()
Constructs a receiver listening on the specified address.
Definition: MessageProcessorBase.cpp:49
Definition: MessageProcessor.h:26
MessageProcessor(gui::Window *window, OnGeometryFunc on_geometry)
Definition: MessageProcessor.h:33
std::shared_ptr< zmq::message_t > ProcessMessage(const io::rpc::messages::Request &req, const io::rpc::messages::SetMeshData &msg, const msgpack::object_handle &obj) override
Definition: MessageProcessor.cpp:26
std::function< void(std::shared_ptr< geometry::Geometry3D >, const std::string &, int, const std::string &)> OnGeometryFunc
Definition: MessageProcessor.h:32
Definition: Window.h:30
const char const char value recording_handle imu_sample void
Definition: K4aPlugin.cpp:250
Definition: PinholeCameraIntrinsic.cpp:16
Definition: Messages.h:508
Definition: Messages.h:391