validateOrThrow

@JvmStatic
fun validateOrThrow(meshModel: MeshModel)

Validates that a MeshModel instance is structurally consistent before it is consumed.

This method checks that:

Performance note: this method iterates over MeshModel.triangleIndices (and optional attribute lists such as MeshModel.colors) to validate every element. For large meshes, this can be CPU-expensive. Prefer using it for Debug/development-time validation and diagnostics, and avoid calling it in Release builds.

Parameters

meshModel

the mesh data to validate.

Throws

IllegalArgumentException

if any of the above constraints is violated.