roboticslibrary / rl

The Robotics Library (RL) is a self-contained C++ library for rigid body kinematics and dynamics, motion planning, and control.
https://www.roboticslibrary.org/
BSD 2-Clause "Simplified" License
928 stars 215 forks source link

How to select an edge? #89

Open PengSi opened 4 months ago

PengSi commented 4 months ago

If a model is loaded in the scene, how to select an edge of the model with the mouse?

rickertm commented 4 months ago

If you are looking to integrate this into a user interface based on the Coin3D scene graph, you can use the SoRayPickAction class for this. The documentation of the class includes a small example on how to implement this.

For the collision detection engines in rl::sg, the class rl::sg::RaycastScene provides an abstraction to retrieve the shape in the scene hit by a 3D ray.