ThreeCSG icon indicating copy to clipboard operation
ThreeCSG copied to clipboard

Intersection 'detection'. :)

Open electricessence opened this issue 10 years ago • 5 comments

Since geometries can get complicated, I wonder if there is a way (maybe using these techniques) that could 'detect' if two geometries intersect. I've noted that you can call intersection on an object, and if there are 0 (zero) nodes in the tree then it indicates that they are NOT intersected. This is useful, but where I struggle is I wish there was a way to detect if complex geometries intersect in the world regardless of what child/parent structure they have.

Any ides?

electricessence avatar Sep 19 '14 22:09 electricessence

What kind of convex geometries do you have? Are the geometries themselves concave or is it an object made from parent/children that are all convex?

chandlerprall avatar Sep 20 '14 00:09 chandlerprall

So I was able to do this. But the sucky part is that I'm isolated to the local coordinate space of the two geometries. I couldn't simply create an object and then another an see if they intersect/collide regardless of their scale or alignment. :|

electricessence avatar Oct 28 '14 00:10 electricessence

Are you using the BSP tree for anything other than trying to get collision detection?

chandlerprall avatar Oct 28 '14 03:10 chandlerprall

Well in this case yes. I simply want to know if two complex objects intersect. But like I said, it get's sticky when you have an object that has scale factor, rotation, position, (in the world space) that is different than the other. :(

electricessence avatar Nov 04 '14 16:11 electricessence

I would be happy if I ask if a single point lived inside of a complex object (geometry), that would do it for me.

electricessence avatar Nov 04 '14 16:11 electricessence