Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Point in Polygon problem #661

Open
ViaCognita opened this issue Jun 28, 2024 · 2 comments
Open

Point in Polygon problem #661

ViaCognita opened this issue Jun 28, 2024 · 2 comments

Comments

@ViaCognita
Copy link

Hi!

First of all, I don't know if this is the right place to ask this question because I have no idea about NVIDIA PhysX.

I'm developing a game with Unreal Engine 5.4.2. with C++ and I need to find if a point is inside a polygon. Searching on Internet I have found someone mentioning that it can be done with PhysX. On Wikipedia, I have found that the Ray Casting algorithm or the Winding number algorithm can do it.

If I have a set of 2D points, how can I know if another point is inside the polygon defined by that set of points using PhysX? If it is possible.

Thanks!

@vreutskyy
Copy link

Hi @ViaCognita
No, this isn't the right place. PhysX is a physics simulation library, and what you need is some geometry query library or just a function. I think the easiest thing you can do is just ask ChatGPT to write the function for you. It should be pretty simple.
Cheers

@PierreTerdiman
Copy link

https://erich.realtimerendering.com/ptinpoly/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants