Builder

class Builder

Collects the input mesh. Strides are in bytes; 0 means tightly packed.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

The algorithm to use; the one built with may differ if the input doesn't suit it.

Link copied to clipboard
fun aux(attribute: TangentSpaceMesh.AuxAttribute, data: FloatArray, components: Int, stride: Int = 0): TangentSpaceMesh.Builder

Auxiliary input, mapped along when the mesh is remeshed: float2, float3 or float4 per vertex (components 2–4). Read it back with TangentSpaceMesh.getAux and the same components.

fun aux(attribute: TangentSpaceMesh.AuxAttribute, data: ShortArray, components: Int, stride: Int = 0): TangentSpaceMesh.Builder

Auxiliary input as unsigned shorts (e.g. joint indices): ushort3 or ushort4 per vertex (components 3–4).

Link copied to clipboard

Computes the tangent space. The builder can't be used afterwards.

Link copied to clipboard
fun normals(normals: FloatArray, stride: Int = 0): TangentSpaceMesh.Builder

The input normals, 3 floats each.

Link copied to clipboard
fun positions(positions: FloatArray, stride: Int = 0): TangentSpaceMesh.Builder

The input positions, 3 floats each.

Link copied to clipboard
fun tangents(tangents: FloatArray, stride: Int = 0): TangentSpaceMesh.Builder

The input tangents, 4 floats each; w is the handedness (-1 or +1) for the bitangent.

Link copied to clipboard

The number of input triangles.

Link copied to clipboard

The triangles in 32-bit indices, 3 per triangle.

The triangles in 16-bit indices, 3 per triangle.

Link copied to clipboard
fun uvs(uvs: FloatArray, stride: Int = 0): TangentSpaceMesh.Builder

The input UVs, 2 floats each.

Link copied to clipboard

The number of input vertices.