Open3D (C++ API)  0.18.0+5c982c7
Draw.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 
10 #include <vector>
11 
14 
15 namespace open3d {
16 namespace visualization {
17 
18 struct DrawObject {
19  std::string name;
20  std::shared_ptr<geometry::Geometry3D> geometry;
21  std::shared_ptr<t::geometry::Geometry> tgeometry;
22  std::shared_ptr<rendering::TriangleMeshModel> model;
23  bool is_visible;
24 
25  DrawObject(const std::string &n,
26  std::shared_ptr<geometry::Geometry3D> g,
27  bool vis = true);
28  DrawObject(const std::string &n,
29  std::shared_ptr<t::geometry::Geometry> tg,
30  bool vis = true);
31  DrawObject(const std::string &n,
32  std::shared_ptr<rendering::TriangleMeshModel> m,
33  bool vis = true);
34 };
35 
36 struct DrawAction {
37  std::string name;
39 };
40 
41 void Draw(const std::vector<std::shared_ptr<geometry::Geometry3D>> &geometries,
42  const std::string &window_name = "Open3D",
43  int width = 1024,
44  int height = 768,
45  const std::vector<DrawAction> &actions = {});
46 
47 void Draw(
48  const std::vector<std::shared_ptr<t::geometry::Geometry>> &tgeometries,
49  const std::string &window_name = "Open3D",
50  int width = 1024,
51  int height = 768,
52  const std::vector<DrawAction> &actions = {});
53 
54 void Draw(const std::vector<std::shared_ptr<rendering::TriangleMeshModel>>
55  &models,
56  const std::string &window_name = "Open3D",
57  int width = 1024,
58  int height = 768,
59  const std::vector<DrawAction> &actions = {});
60 
61 void Draw(const std::vector<DrawObject> &objects,
62  const std::string &window_name = "Open3D",
63  int width = 1024,
64  int height = 768,
65  const std::vector<DrawAction> &actions = {});
66 
67 } // namespace visualization
68 } // namespace open3d
int width
Definition: FilePCD.cpp:52
int height
Definition: FilePCD.cpp:53
const char const char value recording_handle imu_sample void
Definition: K4aPlugin.cpp:250
void Draw(const std::vector< std::shared_ptr< geometry::Geometry3D >> &geometries, const std::string &window_name, int width, int height, const std::vector< DrawAction > &actions)
Definition: Draw.cpp:44
Definition: PinholeCameraIntrinsic.cpp:16
std::string name
Definition: Draw.h:37
std::function< void(visualizer::O3DVisualizer &)> callback
Definition: Draw.h:38
bool is_visible
Definition: Draw.h:23
std::shared_ptr< t::geometry::Geometry > tgeometry
Definition: Draw.h:21
std::shared_ptr< geometry::Geometry3D > geometry
Definition: Draw.h:20
std::string name
Definition: Draw.h:19
DrawObject(const std::string &n, std::shared_ptr< geometry::Geometry3D > g, bool vis=true)
Definition: Draw.cpp:19
std::shared_ptr< rendering::TriangleMeshModel > model
Definition: Draw.h:22