Open3D (C++ API)  0.13.0
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 
64 bool DrawGeometries(const std::vector<std::shared_ptr<const geometry::Geometry>>
65  &geometry_ptrs,
66  const std::string &window_name = "Open3D",
67  int width = 640,
68  int height = 480,
69  int left = 50,
70  int top = 50,
71  bool point_show_normal = false,
72  bool mesh_show_wireframe = false,
73  bool mesh_show_back_face = false,
74  Eigen::Vector3d *lookat = nullptr,
75  Eigen::Vector3d *up = nullptr,
76  Eigen::Vector3d *front = nullptr,
77  double *zoom = nullptr);
78 
91  const std::vector<std::shared_ptr<const geometry::Geometry>>
92  &geometry_ptrs,
93  const std::string &window_name = "Open3D",
94  int width = 640,
95  int height = 480,
96  int left = 50,
97  int top = 50,
98  const std::string &json_filename = "");
99 
112  const std::vector<std::shared_ptr<const geometry::Geometry>>
113  &geometry_ptrs,
114  std::function<bool(Visualizer *)> callback_func,
115  const std::string &window_name = "Open3D",
116  int width = 640,
117  int height = 480,
118  int left = 50,
119  int top = 50);
120 
133  const std::vector<std::shared_ptr<const geometry::Geometry>>
134  &geometry_ptrs,
135  const std::map<int, std::function<bool(Visualizer *)>> &key_to_callback,
136  const std::string &window_name = "Open3D",
137  int width = 640,
138  int height = 480,
139  int left = 50,
140  int top = 50);
141 
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 
162  const std::vector<std::shared_ptr<const geometry::Geometry>>
163  &geometry_ptrs,
164  const std::string &window_name = "Open3D",
165  int width = 640,
166  int height = 480,
167  int left = 50,
168  int top = 50);
169 
170 } // namespace visualization
171 } // 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:179
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:145
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:216
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:98
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:246
Definition: PinholeCameraIntrinsic.cpp:35
int height
Definition: FilePCD.cpp:72
int width
Definition: FilePCD.cpp:71