PDA

View Full Version : Advanced Intersect()?


thatoneguy
10-23-2007, 02:20 AM
Is there a more advanced intersect() which is maybe slower but does a true 3D deformable mesh check for intersect (to see if one arbitrary mesh is within another)?

or at the very least is there a way to flag intersect to operate so that only objects *completely* within the intersection box are returned? I could write a pretty easy maxscript I think to replicate intersect() with that feature but I imagine it would be pretty slow comparatively.

thatoneguy
10-23-2007, 02:33 AM
fn intersectsAdv bignode littlenode =
(
maxdif = bignode.max - littlenode.max
if maxdif[1] >= 0 and maxdif[2] >= 0 and maxdif[3] >= 0 then
(
maxdif = true
mindif = bignode.min - littlenode.min
if mindif[1] <= 0 and mindif[2] <= 0 and mindif[3] <= 0 do mindif = true
if maxdif == true and mindif == true then return true else return false
)
else return false
)

eek
10-23-2007, 02:59 PM
Is there a more advanced intersect() which is maybe slower but does a true 3D deformable mesh check for intersect (to see if one arbitrary mesh is within another)?

or at the very least is there a way to flag intersect to operate so that only objects *completely* within the intersection box are returned? I could write a pretty easy maxscript I think to replicate intersect() with that feature but I imagine it would be pretty slow comparatively.

RayMeshGridIntersect : ReferenceTarget
RayMeshGridIntersect - superclass: ReferenceTarget; super-superclass:MAXWrapper - 1:0 - classID: #(930131240, 656216840)

Provides advanced ray-to-mesh intersection methods.

Note:

This interface is not available in Autodesk VIZ.

Properties

<RayMeshGridIntersect>.nodeList ArrayParameter default: #() -- node array; Node_List

RayMeshGridIntersect interfaces:
Interface: rayMeshGridIntersectOps



and


MeshProjIntersect : ReferenceTarget
MeshProjIntersect - superclass: ReferenceTarget; super-superclass:MAXWrapper - 0:0 - classID: #(1266304708, 865233301)



MeshProjIntersect interfaces:

Interface: rayMeshProjIntersectOps

martinB
10-30-2007, 05:18 PM
AFAIK, both RayMeshGridIntersect and MeshProjIntersect won't handle deforming objects well. Any static acceleration structure will have trouble with deforming objects, as they need to be rebuild very often. Of course, that depends on the total numbers of rays cast for each time step.

-- MartinB

CGTalk Moderation
10-30-2007, 05:18 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.