fix align_camera_center in Viewer::init() for multiple cores (#1349)
* Iterate over viewer.core_list and viewer.data_list and align_camera_center per core with visible data.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// This file is part of libigl, a simple c++ geometry processing library.
|
||||
// This file is part of libigl, a simple c++ geometry processing library.
|
||||
//
|
||||
// Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>
|
||||
//
|
||||
@@ -210,13 +210,18 @@ namespace glfw
|
||||
glfwGetWindowSize(window, &width_window, &height_window);
|
||||
highdpi = windowWidth/width_window;
|
||||
glfw_window_size(window,width_window,height_window);
|
||||
//opengl.init();
|
||||
for(int i=0;i<core_list.size(); i++)
|
||||
{
|
||||
core_list[i].align_camera_center(data().V,data().F);
|
||||
}
|
||||
// Initialize IGL viewer
|
||||
init();
|
||||
for(auto &core : this->core_list)
|
||||
{
|
||||
for(auto &data : this->data_list)
|
||||
{
|
||||
if(data.is_visible & core.id)
|
||||
{
|
||||
this->core(core.id).align_camera_center(data.V, data.F);
|
||||
}
|
||||
}
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user