[Closed] Advanced Intersect()?
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
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
)
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