triStripIntersection

fun triStripIntersection(points: FloatArray, stride: Int, elements: ShortArray, count: Int, result: Vec3): Boolean

Computes the first intersection of a triangle strip with this line. This line is interpreted as a ray; intersection points behind the line's origin are ignored.
The triangle strip is specified by a list of vertex points and a list of elements indicating the triangle strip tessellation of those vertices. The triangle strip elements are interpreted in the same manner as OpenGL, where each index indicates a vertex position rather than an actual index into the points array (e.g. a triangle strip index of 1 indicates the XYZ tuple starting at array index 3).

Return

true if this line intersects the triangle strip, otherwise false

Parameters

points

an array of points containing XYZ tuples

stride

the number of coordinates between the first coordinate of adjacent points - must be at least 3

elements

an array of indices into the points defining the triangle strip organization

count

the number of indices to consider

result

a pre-allocated Vec3 in which to return the nearest intersection point, if any

Throws

If array is empty, if the stride is less than 3, if the count is less than 0