It would be nice to have to allow the user to define camera paths or to define automatically camera paths.
For example between the nearest poses instead of sequential poses, or rotating around the "center"(s) of the cloud (where the density is higher)
The potree viewer we use is using three.js and three.js controls, and if we where moving the scene camera, it would jump back where it was set by the three.js controls when using the associated input device.
Thats why new camera position/rotation must be reflected in three.js controls internal variables (we had to study the three.js controls code for this - we do not support every three.js controls yet)
You can look at how it's done today for doxel-viewer, where we interpolate the camera position/rotation between poses while scrolling the images list or when selecting a given thumbnail, or when using the play button.
From here and below
|
* @method viewer.showPose |
In the viewer there is always a pose selected (thumbnail). It is the current integer pose. We interpolate the camera pose between the integer poses, call it the interpolated pose.
The user is always able to move or rotate the camera using the three.js controls while we move the camera.
To allow this we compute the relative translation/rotation between the current pose position/rotation and the current camera position/rotation, then we apply this relative translation/rotation when moving the camera on the path (which in our case is the path between poses - for the play and scroll modes)
However it would also be possible (but less nice) to simply disable the three.js controls while moving the camera