mesh_raycast
ABSTRACT
Casts a ray from a source point along a specified direction to check for intersections with the selected meshes within the provided mesh-tree.
PARAMETERS
mesh | Considers all meshes in the mesh-tree for raycasting. |
root | Specifies the container mesh-tree where meshes are selected for raycasting. |
tag_predicate(tag) | Determines if a mesh with the provided tag participates in the raycasting process. |
src | The source point from which the ray originates, a 3-vector. |
direction | The direction of the ray, a 3-vector. |
RETURN
Returns -1 if the ray does not interst the selected meshes, and otherwise gives the amount of distance a ray would have to travel from the source point to hit the selected meshes
DECLARATION
func mesh_raycast([mesh_tree] {[full] {mesh}, [tag_pred] {root, tag_predicate(tag)}}, src, direction)