Selecting faces

How can mesh faces within a specified bounding box (frustrum) be found?

Similarly to finding objects with raycasting, I need to find faces within a specified 2D box, which defines a frustrum, as seen from the camera.

The frustrum is specified by drawing a box with the mouse, just like the “BoxSelection” example. The only difference is that I need to get a list of faces within this box, instead of objects. Perhaps the BoxSelection example could be adapted to select faces instead?

Any help greatly appreciated.

Maybe this plug-in will be helpful: Three-mesh-bvh: A plugin for fast geometry raycasting and spatial queries!


Thank you! That looks very promosing!