isl-org / isl-org/Open3D

zooming in & zooming out the point Cloud

Open
#6,484 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### My Question

created a point cloud visualization in python using open3d and OpenGL, I added zoom in and zoom out functionality, but in visualization it's not updating the zoomed point cloud. I have a separate loop method that will call updategl() for rendering the point cloud don't know why the point cloud viz is not updating.

These are the libraries used, PYQT window, for reading the point cloud data open3d, for drawing the point cloud OpenGL.
Taken Open-source project Label Cloud has reference.
Here is the part of code Flow related to zooming method.

def wheelEvent(self, a0: QWheelEvent) -> None:
self.pcd_manager.zoom_into(a0.angleDelta().y())

def zoom_into(self, distance) -> None:
assert self.pointcloud is not None
zoom_distance = distance * PointCloudManger.ZOOM_FACTOR
self.pointcloud.set_trans_z(self.pointcloud.trans_z + zoom_distance)

def set_trans_z(self, val) -> None:
self.trans_z = val

def loop_gui(self):
self.updateGL() -> This will call the paintgl method which has the draw_point cloud method

def paintGL(self):
# Will call other methods for drawing the pointcloud

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.