intersect

abstract fun intersect(line: Line, result: Vec3): Boolean

Computes the first intersection of this terrain with a specified line in Cartesian coordinates. The line is interpreted as a ray; intersection points behind the line's origin are ignored. If the line does not intersect the geometric surface modeled by this terrain, this returns false and does not modify the result argument.

Return

true if the ray intersects this terrain, otherwise false

Parameters

line

the line to intersect with this terrain

result

a pre-allocated Vec3 in which to return the intersection point