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 
59 bool DrawGeometries(const std::vector<std::shared_ptr<const geometry::Geometry>>
60  &geometry_ptrs,
61  const std::string &window_name = "Open3D",
62  int width = 640,
63  int height = 480,
64  int left = 50,
65  int top = 50,
66  bool point_show_normal = false,
67  bool mesh_show_wireframe = false,
68  bool mesh_show_back_face = false);
69 
82  const std::vector<std::shared_ptr<const geometry::Geometry>>
83  &geometry_ptrs,
84  const std::string &window_name = "Open3D",
85  int width = 640,
86  int height = 480,
87  int left = 50,
88  int top = 50,
89  const std::string &json_filename = "");
90 
103  const std::vector<std::shared_ptr<const geometry::Geometry>>
104  &geometry_ptrs,
105  std::function<bool(Visualizer *)> callback_func,
106  const std::string &window_name = "Open3D",
107  int width = 640,
108  int height = 480,
109  int left = 50,
110  int top = 50);
111 
124  const std::vector<std::shared_ptr<const geometry::Geometry>>
125  &geometry_ptrs,
126  const std::map<int, std::function<bool(Visualizer *)>> &key_to_callback,
127  const std::string &window_name = "Open3D",
128  int width = 640,
129  int height = 480,
130  int left = 50,
131  int top = 50);
132 
144  const std::vector<std::shared_ptr<const geometry::Geometry>>
145  &geometry_ptrs,
146  const std::string &window_name = "Open3D",
147  int width = 640,
148  int height = 480,
149  int left = 50,
150  int top = 50);
151 
153  const std::vector<std::shared_ptr<const geometry::Geometry>>
154  &geometry_ptrs,
155  const std::string &window_name = "Open3D",
156  int width = 640,
157  int height = 480,
158  int left = 50,
159  int top = 50);
160 
161 } // namespace visualization
162 } // namespace open3d
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)
Function to draw a list of geometry.
Definition: DrawGeometry.cpp:167
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)
Function to draw a list of geometry objects with a customized animation callback function.
Definition: DrawGeometry.cpp:133
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)
Function to draw a list of geometry.
Definition: DrawGeometry.cpp:204
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)
Function to draw a list of geometry objects with a GUI that supports animation.
Definition: DrawGeometry.cpp:86
bool DrawGeometriesWithVertexSelection(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:234
Definition: Open3DViewer.h:29
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, bool point_show_normal, bool mesh_show_wireframe, bool mesh_show_back_face)
Function to draw a list of geometry objects.
Definition: DrawGeometry.cpp:42
int height
Definition: FilePCD.cpp:70
int width
Definition: FilePCD.cpp:69