global scale and shift
Posted: Thu Nov 10, 2016 9:30 am
hi Daniel,
I have written a pluign to import data from a csv file. I referred the AsciiFilter class to accomplish this. I would like to suppress the shift/scale dialog while importing this file. So i used the ccGlobalShiftManager::NO_DIALOG_AUTO_SHIFT in the plugin. Now, after I import this csv through my plugin, I tried to open another ascii file using the cloudcompare open dialog(File -> Open). But it did not use the previous shift/scale settings from the plugin. The last import option was not seen and the points shifted using a different value. Is there anything I have missed? Code below.
I have written a pluign to import data from a csv file. I referred the AsciiFilter class to accomplish this. I would like to suppress the shift/scale dialog while importing this file. So i used the ccGlobalShiftManager::NO_DIALOG_AUTO_SHIFT in the plugin. Now, after I import this csv through my plugin, I tried to open another ascii file using the cloudcompare open dialog(File -> Open). But it did not use the previous shift/scale settings from the plugin. The last import option was not seen and the points shifted using a different value. Is there anything I have missed? Code below.
Code: Select all
double scale = 1.0;
CCVector3d P(0,0,0);
CCVector3d Pshift(0,0,0);
if (ccGlobalShiftManager::Handle(P, 0, ccGlobalShiftManager::NO_DIALOG_AUTO_SHIFT, true, Pshift, &scale))
{
cloudDesc.cloud->setGlobalShift(Pshift);
cloudDesc.cloud->setGlobalScale(scale);
}