Skip to content

Commit

Permalink
Merge pull request #40 from ch-sa/ch-sa/initial-zoom
Browse files Browse the repository at this point in the history
Limit initial zoom to far_plane
  • Loading branch information
ch-sa authored Nov 22, 2021
2 parents de69f40 + 2ad2d51 commit cea9cd5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion labelCloud/control/pcd_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@ def load_pointcloud(self, path_to_pointcloud: str) -> PointCloud:
tmp_pcd.colorless = False

max_dims = np.subtract(tmp_pcd.pcd_maxs, tmp_pcd.pcd_mins)
diagonal = np.linalg.norm(max_dims)
diagonal = min(
np.linalg.norm(max_dims),
config.getfloat("USER_INTERFACE", "far_plane") * 0.9,
)

tmp_pcd.init_translation = -self.current_o3d_pcd.get_center() - [0, 0, diagonal]

Expand Down

0 comments on commit cea9cd5

Please sign in to comment.