Back to Filament

Builder

docs/android/dokka/filament-android/com.google.android.filament/-surface-orientation/-builder/index.md

1.75.02.7 KB
Original Source

//filament-android/com.google.android.filament/SurfaceOrientation/Builder

Builder

[main]
open class Builder

Constructs an immutable surface orientation helper. At a minimum, clients must supply a vertex count. They can supply data in any of the following combinations:

  1. normals only (not recommended)
  2. normals + tangents (sign of W determines bitangent orientation)
  3. normals + uvs + positions + indices
  4. positions + indices

Additionally, the client-side data has the following type constraints:

  1. Normals must be float3
  2. Tangents must be float4
  3. UVs must be float2
  4. Positions must be float3
  5. Triangles must be uint3 or ushort3

Constructors

Builder[main]
constructor()

Functions

NameSummary
build[main]
open fun build(): SurfaceOrientation
Consumes the input data, produces quaternions, and destroys the native builder.
normals[main]
open fun normals(buffer: Buffer): SurfaceOrientation.Builder
positions[main]
open fun positions(buffer: Buffer): SurfaceOrientation.Builder
tangents[main]
open fun tangents(buffer: Buffer): SurfaceOrientation.Builder
triangleCount[main]
open fun triangleCount(triangleCount: Int): SurfaceOrientation.Builder
triangles_uint16[main]
open fun triangles_uint16(buffer: Buffer): SurfaceOrientation.Builder
triangles_uint32[main]
open fun triangles_uint32(buffer: Buffer): SurfaceOrientation.Builder
uvs[main]
open fun uvs(buffer: Buffer): SurfaceOrientation.Builder
vertexCount[main]
open fun vertexCount(vertexCount: Int): SurfaceOrientation.Builder