PDA

View Full Version : MEL: Point within Geometry?


MasterZ
05-01-2006, 01:03 PM
Is there a simple way to ask if a point is within a complex geometry?

I have something partial but there is really too much processing involved.
This method involves lines from the pivot extruded then intersected with the mesh and finally purging all the little bits to find a failure of intersection as proof of the point being inside the geometry.
Any simple commands or alternate thoughts (anything) on this one thanks.

rokandic
05-01-2006, 05:21 PM
This might help:
http://forums.cgsociety.org/showthread.php?t=340390

-rok

MasterZ
05-01-2006, 07:20 PM
That does look interesting, building a wrapper on API might be needed for speed anyway.
The only other thing I can think of is there a way to use a camera with hitTest to determine if and object is inside or outside another one. Similar to my other approch it likely needs to be a shape that is not too complex (for calculated relative the center) but really distances will become an issue for me, hit test doesn't give the location.

MasterZ
05-01-2006, 08:22 PM
I am looking at closestPointOnSurface node


createNode closestPointOnSurface;
connectAttr nurbsSphere1.ws[0] closestPointOnSurface1.is;


This seems to provide some point information

the distanceBetween node will be used next then I think. Is there something better?

Well it looks like this is going to better/faster for my needs then intersecting extruded lines etc.

Thanks for the guiding wisdom.

CGTalk Moderation
05-01-2006, 08:22 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.