Open3D (C++ API)  0.11.0
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 <Eigen/Core>
30 #include <functional>
31 #include <map>
32 #include <memory>
33 #include <string>
34 #include <vector>
35 
37 
38 namespace open3d {
39 namespace visualization {
40 
41 class Visualizer;
42 
65 bool DrawGeometries(const std::vector<std::shared_ptr<const geometry::Geometry>>
66  &geometry_ptrs,
67  const std::string &window_name = "Open3D",
68  int width = 640,
69  int height = 480,
70  int left = 50,
71  int top = 50,
72  bool point_show_normal = false,
73  bool mesh_show_wireframe = false,
74  bool mesh_show_back_face = false,
75  Eigen::Vector3d *lookat = nullptr,
76  Eigen::Vector3d *up = nullptr,
77  Eigen::Vector3d *front = nullptr,
78  double *zoom = nullptr);
79 
92  const std::vector<std::shared_ptr<const geometry::Geometry>>
93  &geometry_ptrs,
94  const std::string &window_name = "Open3D",
95  int width = 640,
96  int height = 480,
97  int left = 50,
98  int top = 50,
99  const std::string &json_filename = "");
100 
113  const std::vector<std::shared_ptr<const geometry::Geometry>>
114  &geometry_ptrs,
115  std::function<bool(Visualizer *)> callback_func,
116  const std::string &window_name = "Open3D",
117  int width = 640,
118  int height = 480,
119  int left = 50,
120  int top = 50);
121 
134  const std::vector<std::shared_ptr<const geometry::Geometry>>
135  &geometry_ptrs,
136  const std::map<int, std::function<bool(Visualizer *)>> &key_to_callback,
137  const std::string &window_name = "Open3D",
138  int width = 640,
139  int height = 480,
140  int left = 50,
141  int top = 50);
142 
154  const std::vector<std::shared_ptr<const geometry::Geometry>>
155  &geometry_ptrs,
156  const std::string &window_name = "Open3D",
157  int width = 640,
158  int height = 480,
159  int left = 50,
160  int top = 50);
161 
163  const std::vector<std::shared_ptr<const geometry::Geometry>>
164  &geometry_ptrs,
165  const std::string &window_name = "Open3D",
166  int width = 640,
167  int height = 480,
168  int left = 50,
169  int top = 50);
170 
171 } // namespace visualization
172 } // 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:188
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, Eigen::Vector3d *lookat, Eigen::Vector3d *up, Eigen::Vector3d *front, double *zoom)
Function to draw a list of geometry objects.
Definition: DrawGeometry.cpp:44
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:154
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:225
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:107
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:255
Definition: PinholeCameraIntrinsic.cpp:35
int height
Definition: FilePCD.cpp:72
int width
Definition: FilePCD.cpp:71