MeshBody.calculateCollisionsWithRay Method

Parent Object: MeshBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Finds all points that are intersected by the specified ray.

Syntax

"meshBody_var" is a variable referencing a MeshBody object.
returnValue = meshBody_var.calculateCollisionsWithRay(originPoint, rayDirection)
"meshBody_var" is a variable referencing a MeshBody object.

#include <Fusion/MeshBody/MeshBody.h>

returnValue = meshBody_var->calculateCollisionsWithRay(originPoint, rayDirection);

Return Value

Type Description
Point3D[] The results are returned as a list of Point3D objects. If no collisions are found the list is empty. The points are sorted by distance, i.e. the closest points to the origin are first.

Parameters

Name Type Description
originPoint Point3D Input point that defines the origin of the ray. The search for entities begins at this point.
rayDirection Vector3D Input vector that defines the direction of the ray. The ray is infinite so the length of the vector is ignored.

Version

Introduced in version May 2026