Items with no label
3335 Discussions

SDK2.0 rs-pointcloud example is not consistent!

EFoo
Novice
1,340 Views

Hi all again,

1. Navigating to; Program Files(x86) > Intel Realsense SDK 2.0 > tools > rs-pointcloud.exe, the application allows for the manipulation of rotating, zooming, and panning of the 3D PointCloud.

2. However, when the sample CPP file (rs-pointcloud.cpp) is manually compiled, it is lacking the function to zoom.

3. On the GitHub page (https://github.com/IntelRealSense/librealsense/tree/master/examples/pointcloud librealsense/examples/pointcloud at master · IntelRealSense/librealsense · GitHub ), the README have codes like:

- struct state { double yaw, pitch, last_x, last_y; bool ml; float offset_x, offset_y; texture tex; }; // Struct for managing rotation of pointcloud view

- state app_state = { 0, 0, 0, 0, false, 0, 0, 0 }; // Construct an object to manage view state

- register_glfw_callbacks(app, app_state); // register callbacks to allow manipulation of the pointcloud

but does not exist on the rs-pointcloud.cpp file on the same GitHub page!!

Trying to understand what each line of code does as a newbie is even more challenging when these examples (which could be lifesavers) are not consistent with the documentation. Thank you in advance for any feedback or insight to what can be done.

0 Kudos
1 Reply
MartyG
Honored Contributor III
172 Views

Under the Code Overview heading of the readme, there is mention of a 'helper library' called example.hpp, and a link to that script. The mouse-action control code is in this script, which checks for mouse scroll or left-button press and carries out the appropriate function when the input is detected and found to be 'true'.

https://github.com/IntelRealSense/librealsense/blob/master/examples/example.hpp# L380 librealsense/example.hpp at master · IntelRealSense/librealsense · GitHub

0 Kudos
Reply