Shape entirely inside a sensor

Hi.

It´s possible to detect when a shape is entirely inside a sensor? If not, how to detect when a polygon is entirely inside another one?

The shape is a simple convex one, but the sensor may be convex, made of several shapes.

Thank you.

Jose
Yes, this should work.
Hi, Erin.

I didn't follow you.

What should work?

I asked a question, don't know the answer, yet...
Ah, I misread the question. No, Box2D does not have a function to test for containment. However it should be too hard to write on yourself. Just get the overlapping shapes using the contacts or b2World::Query, and write containment tests for the shapes that overlap.

This is such a niche feature that it will probably never be in Box2D. On the other hand, I would be happy to put a contribution into the contributions folder.

Original thread: https://box2d.org/forum/viewtopic.php?t=3323