@@ -114,41 +114,28 @@ void pybind_visualization_utility_definitions(py::module &m) {
114
114
&geometry_ptrs,
115
115
const std::string &window_name, int width, int height, int left,
116
116
int top, bool point_show_normal, bool mesh_show_wireframe,
117
- bool mesh_show_back_face) {
117
+ bool mesh_show_back_face,
118
+ utility::optional<Eigen::Vector3d> lookat,
119
+ utility::optional<Eigen::Vector3d> up,
120
+ utility::optional<Eigen::Vector3d> front,
121
+ utility::optional<double > zoom) {
118
122
std::string current_dir =
119
123
utility::filesystem::GetWorkingDirectory ();
120
124
DrawGeometries (geometry_ptrs, window_name, width, height, left,
121
125
top, point_show_normal, mesh_show_wireframe,
122
- mesh_show_back_face);
126
+ mesh_show_back_face,
127
+ lookat.has_value () ? &lookat.value () : nullptr ,
128
+ up.has_value () ? &up.value () : nullptr ,
129
+ front.has_value () ? &front.value () : nullptr ,
130
+ zoom.has_value () ? &zoom.value () : nullptr );
123
131
utility::filesystem::ChangeWorkingDirectory (current_dir);
124
132
},
125
133
" Function to draw a list of geometry::Geometry objects" ,
126
134
" geometry_list" _a, " window_name" _a = " Open3D" , " width" _a = 1920 ,
127
135
" height" _a = 1080 , " left" _a = 50 , " top" _a = 50 ,
128
136
" point_show_normal" _a = false , " mesh_show_wireframe" _a = false ,
129
- " mesh_show_back_face" _a = false );
130
- m.def (
131
- " draw_geometries" ,
132
- [](const std::vector<std::shared_ptr<const geometry::Geometry>>
133
- &geometry_ptrs,
134
- const std::string &window_name, int width, int height, int left,
135
- int top, bool point_show_normal, bool mesh_show_wireframe,
136
- bool mesh_show_back_face, Eigen::Vector3d lookat,
137
- Eigen::Vector3d up, Eigen::Vector3d front, double zoom) {
138
- std::string current_dir =
139
- utility::filesystem::GetWorkingDirectory ();
140
- DrawGeometries (geometry_ptrs, window_name, width, height, left,
141
- top, point_show_normal, mesh_show_wireframe,
142
- mesh_show_back_face, &lookat, &up, &front,
143
- &zoom);
144
- utility::filesystem::ChangeWorkingDirectory (current_dir);
145
- },
146
- " Function to draw a list of geometry::Geometry objects" ,
147
- " geometry_list" _a, " window_name" _a = " Open3D" , " width" _a = 1920 ,
148
- " height" _a = 1080 , " left" _a = 50 , " top" _a = 50 ,
149
- " point_show_normal" _a = false , " mesh_show_wireframe" _a = false ,
150
- " mesh_show_back_face" _a = false , " lookat" _a, " up" _a, " front" _a,
151
- " zoom" _a);
137
+ " mesh_show_back_face" _a = false , " lookat" _a = py::none (),
138
+ " up" _a = py::none (), " front" _a = py::none (), " zoom" _a = py::none ());
152
139
docstring::FunctionDocInject (m, " draw_geometries" ,
153
140
map_shared_argument_docstrings);
154
141
0 commit comments