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 <string>
30 #include <memory>
31 #include <vector>
32 #include <map>
33 #include <functional>
35 
36 namespace open3d {
37 namespace visualization {
38 
39 class Visualizer;
40 
45 
46 bool DrawGeometries(const std::vector<std::shared_ptr<const geometry::Geometry>>
47  &geometry_ptrs,
48  const std::string &window_name = "Open3D",
49  int width = 640,
50  int height = 480,
51  int left = 50,
52  int top = 50);
53 
55  const std::vector<std::shared_ptr<const geometry::Geometry>>
56  &geometry_ptrs,
57  const std::string &window_name = "Open3D",
58  int width = 640,
59  int height = 480,
60  int left = 50,
61  int top = 50,
62  const std::string &json_filename = "");
63 
65  const std::vector<std::shared_ptr<const geometry::Geometry>>
66  &geometry_ptrs,
67  std::function<bool(Visualizer *)> callback_func,
68  const std::string &window_name = "Open3D",
69  int width = 640,
70  int height = 480,
71  int left = 50,
72  int top = 50);
73 
75  const std::vector<std::shared_ptr<const geometry::Geometry>>
76  &geometry_ptrs,
77  const std::map<int, std::function<bool(Visualizer *)>> &key_to_callback,
78  const std::string &window_name = "Open3D",
79  int width = 640,
80  int height = 480,
81  int left = 50,
82  int top = 50);
83 
85  const std::vector<std::shared_ptr<const geometry::Geometry>>
86  &geometry_ptrs,
87  const std::string &window_name = "Open3D",
88  int width = 640,
89  int height = 480,
90  int left = 50,
91  int top = 50);
92 
93 } // namespace visualization
94 } // 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:33
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