computeAABB

fun computeAABB(vertices: FloatArray, indices: IntArray, count: Int = indices.size, stride: Int = 12): Box

Computes the bounding box of the vertices indices points at, for Builder.boundingBox.

Parameters

vertices

Positions, x/y/z first in each vertex; extra components are skipped by stride

indices

32-bit indices of the vertices to bound

count

Number of indices to read

stride

Bytes between vertices; 12 for packed float3, 16 for float4


fun computeAABB(vertices: FloatArray, indices: ShortArray, count: Int = indices.size, stride: Int = 12): Box

computeAABB with 16-bit indices.


fun computeAABB(vertices: ShortArray, indices: IntArray, count: Int = indices.size, stride: Int = 6): Box

computeAABB over half-float positions; stride is 6 for packed half3, 8 for half4.


fun computeAABB(vertices: ShortArray, indices: ShortArray, count: Int = indices.size, stride: Int = 6): Box

computeAABB over half-float positions with 16-bit indices.