closed mesh

Started by
1 comment, last by nodoubt 20 years, 6 months ago
hi how would i go about testing if a given point is inside or outside a closed mesh? thanks
I'm a newbie, please don't hurt me!
Advertisement
This is not really opengl-specific question, but ideally, you will want a bounding volume for your mesh. A sphere or aabb (axis-aligned bounding box) for example should do the job. It will be a much faster operation to test if a point is inside a sphere or bounding box than testing against your whole mesh.
First do AABB/sphere test as dopeflow told you. The is it's in bouding volume cast a ray from point to infinity in random direction and count the number of triangles it hits.
count = odd --> insidecount = even --> outside    


ps: Is this openGL question...

You should never let your fears become the boundaries of your dreams.

[edited by - _DarkWIng_ on October 11, 2003 1:00:06 PM]
You should never let your fears become the boundaries of your dreams.

This topic is closed to new replies.

Advertisement