point inside 3d object

Hello.

I am trying to figure out how to check if any given 3d point is inside a 3d object.

I have eight 3d points that describe a simple 3d object (a cuboid) and a 3d point.

I read one could check if the point is on the correct side of each cuboid’s side and so determine if the point is inside the cuboid.

memo talked about something similar here by calculating the dot product:
http://forum.openframeworks.cc/t/k-curvature—template-matching/1581/2

does anyone have advice on how to pull this off?

thanks,
stephan.

I found a good example of back-face-culling on the processing site and adapted it to OF.

The processing sketch says “This only works with faces with 3 corners”. I added a 4th corner but I am not sure if the hittest is performed 100% accurate.

Also. It only work with planes.

here is what i got so far:

stephan.

Hello.

Did you get any further progress on this topic?
I have tried exactly same exercise (point inside 3d object).

https://github.com/Akira-Hayasaka/ofxRayTriangleIntersection

Cast 6 rays - along both positive and negative x, y and z directions from point.
Count all the intersection with the triangle along each ray.
If all of the intersection count with the triangle is an odd number,
the current point is inside the object (3d hull).

cheers

A