Open3D (C++ API)
DrawGeometry.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // The MIT License (MIT)
5 //
6 // Copyright (c) 2018 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 <functional>
30 #include <map>
31 #include <memory>
32 #include <string>
33 #include <vector>
34 
36 
37 namespace open3d {
38 namespace visualization {
39 
40 class Visualizer;
41 
46 
47 bool DrawGeometries(const std::vector<std::shared_ptr<const geometry::Geometry>>
48  &geometry_ptrs,
49  const std::string &window_name = "Open3D",
50  int width = 640,
51  int height = 480,
52  int left = 50,
53  int top = 50);
54 
56  const std::vector<std::shared_ptr<const geometry::Geometry>>
57  &geometry_ptrs,
58  const std::string &window_name = "Open3D",
59  int width = 640,
60  int height = 480,
61  int left = 50,
62  int top = 50,
63  const std::string &json_filename = "");
64 
66  const std::vector<std::shared_ptr<const geometry::Geometry>>
67  &geometry_ptrs,
68  std::function<bool(Visualizer *)> callback_func,
69  const std::string &window_name = "Open3D",
70  int width = 640,
71  int height = 480,
72  int left = 50,
73  int top = 50);
74 
76  const std::vector<std::shared_ptr<const geometry::Geometry>>
77  &geometry_ptrs,
78  const std::map<int, std::function<bool(Visualizer *)>> &key_to_callback,
79  const std::string &window_name = "Open3D",
80  int width = 640,
81  int height = 480,
82  int left = 50,
83  int top = 50);
84 
86  const std::vector<std::shared_ptr<const geometry::Geometry>>
87  &geometry_ptrs,
88  const std::string &window_name = "Open3D",
89  int width = 640,
90  int height = 480,
91  int left = 50,
92  int top = 50);
93 
94 } // namespace visualization
95 } // namespace open3d
bool DrawGeometriesWithCustomAnimation(const std::vector< std::shared_ptr< const geometry::Geometry >> &geometry_ptrs, const std::string &window_name, int width, int height, int left, int top, const std::string &json_filename)
Definition: DrawGeometry.cpp:67
bool DrawGeometriesWithAnimationCallback(const std::vector< std::shared_ptr< const geometry::Geometry >> &geometry_ptrs, std::function< bool(Visualizer *)> callback_func, const std::string &window_name, int width, int height, int left, int top)
Definition: DrawGeometry.cpp:114
bool DrawGeometriesWithEditing(const std::vector< std::shared_ptr< const geometry::Geometry >> &geometry_ptrs, const std::string &window_name, int width, int height, int left, int top)
Definition: DrawGeometry.cpp:185
bool DrawGeometriesWithKeyCallbacks(const std::vector< std::shared_ptr< const geometry::Geometry >> &geometry_ptrs, const std::map< int, std::function< bool(Visualizer *)>> &key_to_callback, const std::string &window_name, int width, int height, int left, int top)
Definition: DrawGeometry.cpp:148
Definition: PinholeCameraIntrinsic.cpp:34
int height
Definition: FilePCD.cpp:68
bool DrawGeometries(const std::vector< std::shared_ptr< const geometry::Geometry >> &geometry_ptrs, const std::string &window_name, int width, int height, int left, int top)
Definition: DrawGeometry.cpp:39
int width
Definition: FilePCD.cpp:67