-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make coordinates in point cloud chunks independent from scene origin
Until now, coordinates of chunks of point clouds were using "world" coordinates, i.e. they were relative to the 3D scene origin point. As a part of preparation for large scene support (QEP #301), we need coordinates inside chunks to be independent from the scene origin point. For each point cloud chunk, we pick origin point as a corner of the chunk's 3D box, which should guarantee that coordinates within chunk (floats) will have reasonable numerical precision. I have also used the opportunity to simplify the code that handles point cloud chunk coordinates: rather than having flipped coordinates (x,-z,y) inside chunks, we are using map coordinates without flipping (x,y,z), only relative to the origin point of the chunk. The flipping of axes is handled by QTransform attached to each chunk. (Hopefully when all chunked entity implementations get updated, we will be able to remove all the axis flipping everywhere by just removing the rotation in associated QTransforms.) There's also a fix for a crash, when point cloud uses coloring based on classification and triangulation is enabled (the pointSize array was not getting populated for parent nodes).
- Loading branch information
Showing
2 changed files
with
125 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.