Open rfsch opened 5 years ago
+1
+1
+1
I got it to work by commenting the following lines in viewer.h
(in void reply()
):
qDebug() << "Viewer: received positions";
_points->loadPoints(positions);
// Comment the 3 following lines
//_camera = QtCamera(_points->getBox());
//_camera.setAspectRatio((float)width() / height());
//_floor_grid->setFloorLevel(_points->getFloor());
renderPoints();
renderPointsFine();
break;
I am not sure whether there are situations where it is necessary to reset the camera position after loading a new pointcloud. But this solution suits my use case.
After re-compiling, the following snippet will render a sequence of random pointclouds while maintaining the camera position:
import pptk
import numpy as np
import time
pointclouds = np.random.random([200, 1000, 3])
v = pptk.viewer(pointclouds[0])
for pc in pointclouds[1:]:
time.sleep(0.1)
v.load(pc)
(I share this as a workaround, not as a solution to the current issue)
Hi
is it possible to make the viewer play successive point cloud frames ?
Thanks