Home Game Development collision detection – Test if a point is inside a 3D cuboid, given the 8 corner positions, through code

collision detection – Test if a point is inside a 3D cuboid, given the 8 corner positions, through code

0
collision detection – Test if a point is inside a 3D cuboid, given the 8 corner positions, through code

[ad_1]

I’m trying to find to obtain if a point, let’s call it “v” is inside a cuboid which every corner position named P1 to P8

I am trying to achieve this and in fact found some answers in some other stacks, i’ll place them here:

https://math.stackexchange.com/questions/923932/test-if-a-point-is-inside-a-3d-cuboid?rq=1

https://math.stackexchange.com/questions/4497343/point-in-irregular-3d-cuboid?noredirect=1&lq=1

https://math.stackexchange.com/questions/1472049/check-if-a-point-is-inside-a-rectangular-shaped-area-3d?rq=1

The thing is, i’m not too keen in mathematics so i’m kinda lost in this one, could some of you answer me which one of those is better and how to write it code-wise?

Any languaje will do, but csharp would be appreciated, i’m trying to learning to read this ecuations but i’m kinda lost and i don’t know where to start, i also apreciate if you take the time to explain in human terms what that maths are doing.

I also found this question:
fast 3d point -> cuboid volume intersection test

But i’m kinda looking for something more practical than doesn’t vanish in the future of the internet to have here, in the StackExchange for future reference.

If this exist somewhere in this stack or somewhere else, i would love to hear where.

Thank you

[ad_2]