Open3D (C++ API)  0.11.0
RemoteFunctions.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // The MIT License (MIT)
5 //
6 // Copyright (c) 2020 www.open3d.org
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to deal
10 // in the Software without restriction, including without limitation the rights
11 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 // copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be included in
16 // all copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 // IN THE SOFTWARE.
25 // ----------------------------------------------------------------------------
26 
27 #pragma once
28 
29 #include <map>
30 
32 #include "open3d/core/Tensor.h"
36 
37 namespace zmq {
38 class message_t;
39 }
40 
41 namespace open3d {
42 namespace io {
43 namespace rpc {
44 
45 namespace messages {
46 struct Status;
47 }
48 
62 bool SetPointCloud(const geometry::PointCloud& pcd,
63  const std::string& path = "",
64  int time = 0,
65  const std::string& layer = "",
66  std::shared_ptr<ConnectionBase> connection =
67  std::shared_ptr<ConnectionBase>());
68 
82 bool SetTriangleMesh(const geometry::TriangleMesh& mesh,
83  const std::string& path = "",
84  int time = 0,
85  const std::string& layer = "",
86  std::shared_ptr<ConnectionBase> connection =
87  std::shared_ptr<ConnectionBase>());
88 
125 bool SetMeshData(const core::Tensor& vertices,
126  const std::string& path = "",
127  int time = 0,
128  const std::string& layer = "",
129  const std::map<std::string, core::Tensor>& vertex_attributes =
130  std::map<std::string, core::Tensor>(),
131  const core::Tensor& faces = core::Tensor({0},
132  core::Dtype::Int32),
133  const std::map<std::string, core::Tensor>& face_attributes =
134  std::map<std::string, core::Tensor>(),
135  const core::Tensor& lines = core::Tensor({0},
136  core::Dtype::Int32),
137  const std::map<std::string, core::Tensor>& line_attributes =
138  std::map<std::string, core::Tensor>(),
139  const std::map<std::string, core::Tensor>& textures =
140  std::map<std::string, core::Tensor>(),
141  std::shared_ptr<ConnectionBase> connection =
142  std::shared_ptr<ConnectionBase>());
143 
157 bool SetLegacyCamera(const camera::PinholeCameraParameters& camera,
158  const std::string& path = "",
159  int time = 0,
160  const std::string& layer = "",
161  std::shared_ptr<ConnectionBase> connection =
162  std::shared_ptr<ConnectionBase>());
163 
170 bool SetTime(int time,
171  std::shared_ptr<ConnectionBase> connection =
172  std::shared_ptr<ConnectionBase>());
173 
181 bool SetActiveCamera(const std::string& path,
182  std::shared_ptr<ConnectionBase> connection =
183  std::shared_ptr<ConnectionBase>());
184 
185 } // namespace rpc
186 } // namespace io
187 } // namespace open3d
bool SetPointCloud(const geometry::PointCloud &pcd, const std::string &path, int time, const std::string &layer, std::shared_ptr< ConnectionBase > connection)
Definition: RemoteFunctions.cpp:44
bool SetTriangleMesh(const geometry::TriangleMesh &mesh, const std::string &path, int time, const std::string &layer, std::shared_ptr< ConnectionBase > connection)
Definition: RemoteFunctions.cpp:85
bool SetLegacyCamera(const camera::PinholeCameraParameters &camera, const std::string &path, int time, const std::string &layer, std::shared_ptr< ConnectionBase > connection)
Definition: RemoteFunctions.cpp:320
Definition: PinholeCameraIntrinsic.cpp:35
bool SetMeshData(const core::Tensor &vertices, const std::string &path, int time, const std::string &layer, const std::map< std::string, core::Tensor > &vertex_attributes, const core::Tensor &faces, const std::map< std::string, core::Tensor > &face_attributes, const core::Tensor &lines, const std::map< std::string, core::Tensor > &line_attributes, const std::map< std::string, core::Tensor > &textures, std::shared_ptr< ConnectionBase > connection)
Definition: RemoteFunctions.cpp:163
Definition: ConnectionBase.h:31
bool SetTime(int time, std::shared_ptr< ConnectionBase > connection)
Definition: RemoteFunctions.cpp:377
bool SetActiveCamera(const std::string &path, std::shared_ptr< ConnectionBase > connection)
Definition: RemoteFunctions.cpp:394