ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
DrawGeometry.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <Eigen/Core>
11 #include <functional>
12 #include <map>
13 #include <memory>
14 #include <string>
15 #include <vector>
16 
17 class ccHObject;
18 
19 namespace cloudViewer {
20 namespace visualization {
21 
22 class Visualizer;
23 
45 bool DrawGeometries(
46  const std::vector<std::shared_ptr<const ccHObject>> &geometry_ptrs,
47  const std::string &window_name = "cloudViewer",
48  int width = 640,
49  int height = 480,
50  int left = 50,
51  int top = 50,
52  bool point_show_normal = false,
53  bool mesh_show_wireframe = false,
54  bool mesh_show_back_face = false,
55  Eigen::Vector3d *lookat = nullptr,
56  Eigen::Vector3d *up = nullptr,
57  Eigen::Vector3d *front = nullptr,
58  double *zoom = nullptr);
59 
72  const std::vector<std::shared_ptr<const ccHObject>> &geometry_ptrs,
73  const std::string &window_name = "CloudViewer",
74  int width = 640,
75  int height = 480,
76  int left = 50,
77  int top = 50,
78  const std::string &json_filename = "");
79 
92  const std::vector<std::shared_ptr<const ccHObject>> &geometry_ptrs,
93  std::function<bool(Visualizer *)> callback_func,
94  const std::string &window_name = "CloudViewer",
95  int width = 640,
96  int height = 480,
97  int left = 50,
98  int top = 50);
99 
112  const std::vector<std::shared_ptr<const ccHObject>> &geometry_ptrs,
113  const std::map<int, std::function<bool(Visualizer *)>> &key_to_callback,
114  const std::string &window_name = "CloudViewer",
115  int width = 640,
116  int height = 480,
117  int left = 50,
118  int top = 50);
119 
131  const std::vector<std::shared_ptr<const ccHObject>> &geometry_ptrs,
132  const std::string &window_name = "CloudViewer",
133  int width = 640,
134  int height = 480,
135  int left = 50,
136  int top = 50);
137 
139  const std::vector<std::shared_ptr<const ccHObject>> &geometry_ptrs,
140  const std::string &window_name = "CloudViewer",
141  int width = 640,
142  int height = 480,
143  int left = 50,
144  int top = 50);
145 
146 } // namespace visualization
147 } // namespace cloudViewer
int width
int height
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
bool DrawGeometriesWithVertexSelection(const std::vector< std::shared_ptr< const ccHObject >> &geometry_ptrs, const std::string &window_name, int width, int height, int left, int top)
bool DrawGeometriesWithKeyCallbacks(const std::vector< std::shared_ptr< const ccHObject >> &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.
bool DrawGeometriesWithCustomAnimation(const std::vector< std::shared_ptr< const ccHObject >> &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.
bool DrawGeometriesWithEditing(const std::vector< std::shared_ptr< const ccHObject >> &geometry_ptrs, const std::string &window_name, int width, int height, int left, int top)
Function to draw a list of geometry.
bool DrawGeometries(const std::vector< std::shared_ptr< const ccHObject >> &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.
bool DrawGeometriesWithAnimationCallback(const std::vector< std::shared_ptr< const ccHObject >> &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.
Generic file read and write utility for python interface.