MeshProjIntersect : ReferenceTarget

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

 

MeshProjIntersect interfaces:

Interface: rayMeshProjIntersectOps

Methods:

<void>SetNode <node>node

Sets the node to perform the intersections on.

<void>Build()

Builds the internal data structures for fast intersections.

<void>Free()

Removes the internal data structures, frees memory.

<boolean>IntersectRay <point3 by value>point <point3 by value>dir doubleSided:<boolean>

doubleSided default value: false

Performs a ray intersection with the node set using SetNode from the world space position defined by the point parameter in the direction of the vector specified by the dir parameter.

If the optional doubleSided: keyword parameter is supplied and is true, intersections will be performed with both the front and the backside of the faces.

Returns true if the ray has hit any faces, false if there was no intersection.

<boolean>ProjectionFace <integer>triIndex <point3 by value>triBary

 

<boolean>ClosestFace <point3 by value>point dir:<point3 by value> caged:<boolean> doubleSided:<boolean>

dir default value: [0,0,0]

caged default value: false

doubleSided default value: false

Returns the closest face to the given point is space.

If the optional dir: keyword parameter is supplied and is not [0,0,0], the closest face in the given direction is detected.

If the optional doubleSided: keyword parameter is supplied and is true, both facing and backfacing faces will be considered.

Returns true if a closest face has been found, false otherwise.

<fpvalue by value>GetHitDist hitIndex:<integer>

hitIndex default value: -1

Returns the distance to the hit.

If the optional hitIndex: keyword argument is not supplied or is supplied as -1, the closest hit is returned. If it is supplied and is a positive integer, the distance to the corresponding indexed hit is returned.

<fpvalue by value>GetHitNode hitIndex:<integer>

hitIndex default value: -1

Returns the node that has been hit.

If the optional hitIndex: keyword argument is not supplied or is supplied as -1, the node of the closest hit is returned. If it is supplied and is a positive integer, the node of the corresponding indexed hit is returned.

<fpvalue by value>GetHitFace hitIndex:<integer>

hitIndex default value: -1

Returns the index of the face that has been hit.

If the optional hitIndex: keyword argument is not supplied or is supplied as -1, the closest face hit is returned. If it is supplied and is a positive integer, the face of the corresponding indexed hit is returned.

<fpvalue by value>GetHitBary hitIndex:<integer>

hitIndex default value: -1

Returns the barycentric coordinates of the hit.

If the optional hitIndex: keyword argument is not supplied or is supplied as -1, the barycentric coordinates of the closest hit are returned. If it is supplied and is a positive integer, the barycentric coordinates of the corresponding indexed hit are returned.

<fpvalue by value>GetHitBackfacing hitIndex:<integer>

hitIndex default value: -1

Returns the backfacing hit.

If the optional hitIndex: keyword argument is not supplied or is supplied as -1, the closest backfacing hit is returned. If it is supplied and is a positive integer, the corresponding indexed backfacing hit is returned.

<fpvalue by value>GetHitPos hitIndex:<integer>

hitIndex default value: -1

Returns the world position of the hit.

If the optional hitIndex: keyword argument is not supplied or is supplied as -1, the position of the closest hit is returned. If it is supplied and is a positive integer, the position of the corresponding indexed hit is returned.

See also

RayMeshGridIntersect : ReferenceTarget

IntersectRay

IntersectRayExt