Open3D (C++ API)  0.12.0
Receiver.h
Go to the documentation of this file.
1 
2 // ----------------------------------------------------------------------------
3 // - Open3D: www.open3d.org -
4 // ----------------------------------------------------------------------------
5 // The MIT License (MIT)
6 //
7 // Copyright (c) 2020 www.open3d.org
8 //
9 // Permission is hereby granted, free of charge, to any person obtaining a copy
10 // of this software and associated documentation files (the "Software"), to deal
11 // in the Software without restriction, including without limitation the rights
12 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 // copies of the Software, and to permit persons to whom the Software is
14 // furnished to do so, subject to the following conditions:
15 //
16 // The above copyright notice and this permission notice shall be included in
17 // all copies or substantial portions of the Software.
18 //
19 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
25 // IN THE SOFTWARE.
26 // ----------------------------------------------------------------------------
27 
28 #pragma once
29 
32 
33 namespace open3d {
34 namespace visualization {
35 
36 namespace gui {
37 class Window;
38 }
39 
42 public:
44  std::shared_ptr<rendering::Open3DScene> scene,
45  const std::string& address,
46  int timeout)
47  : ReceiverBase(address, timeout), window_(window), scene_(scene) {}
48 
49  std::shared_ptr<zmq::message_t> ProcessMessage(
50  const io::rpc::messages::Request& req,
52  const MsgpackObject& obj) override;
53 
54 private:
55  void SetGeometry(std::shared_ptr<geometry::Geometry3D> geom,
56  const std::string& path,
57  int time,
58  const std::string& layer);
59 
60  gui::Window* window_;
61  std::shared_ptr<rendering::Open3DScene> scene_;
62 };
63 
64 } // namespace visualization
65 } // namespace open3d
Definition: Window.h:50
Definition: ReceiverBase.cpp:54
Definition: Messages.h:343
Definition: Messages.h:460
Receiver implementation which interfaces with the Open3DScene and a Window.
Definition: Receiver.h:41
Definition: PinholeCameraIntrinsic.cpp:35
Definition: ReceiverBase.h:58
Receiver(gui::Window *window, std::shared_ptr< rendering::Open3DScene > scene, const std::string &address, int timeout)
Definition: Receiver.h:43