weld

fun IMeshData.weld(positionFractBits: Int, textureCoordFractBits: Int = -1, colorFractBits: Int = -1, normalFractBits: Int = -1, tangentFractBits: Int = -1, bitangentFractBits: Int = -1): MeshData(source)

Welds the mesh data by consolidating vertices based on specified fractional bit precision for attributes such as positions, texture coordinates, colors, normals, tangents, and bitangents. This reduces redundant vertices and optimizes the mesh structure.

Return

A new instance of MeshData containing the welded and optimized vertex data and polygons.

Parameters

positionFractBits

The number of fractional bits to use for quantizing vertex positions. If negative, positions are not modified.

textureCoordFractBits

The number of fractional bits to use for quantizing texture coordinates. If negative, texture coordinates are not modified.

colorFractBits

The number of fractional bits to use for quantizing vertex colors. If negative, colors are not modified.

normalFractBits

The number of fractional bits to use for quantizing vertex normals. If negative, normals are not modified.

tangentFractBits

The number of fractional bits to use for quantizing vertex tangents. If negative, tangents are not modified.

bitangentFractBits

The number of fractional bits to use for quantizing vertex bitangents. If negative, bitangents are not modified.