Builder

actual class Builder

The Builder is used to construct an immutable surface orientation helper.

Clients provide pointers into their own data, which is synchronously consumed during build(). At a minimum, clients must supply a vertex count. They can supply data in any of the following combinations:

  1. normals only ........................... not recommended, selects arbitrary orientation

  2. normals + tangents ..................... sign of W determines bitangent orientation

  3. normals + uvs + positions + indices .... selects Lengyel's Method

  4. positions + indices .................... generates normals for flat shading only

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

  • Normals must be 3-element float arrays

  • Tangents must be 4-element float arrays

  • UVs must be 2-element float arrays

  • Positions must be 3-element float arrays

  • Triangles must be 3-element index arrays (ushort or uint)

Currently, mikktspace is not supported because it requires re-indexing the mesh. Instead we use the method described by Eric Lengyel in "Foundations of Game Engine Development" (Volume 2, Chapter 7).

expect class Builder

The Builder is used to construct an immutable surface orientation helper.

Clients provide pointers into their own data, which is synchronously consumed during build(). At a minimum, clients must supply a vertex count. They can supply data in any of the following combinations:

  1. normals only ........................... not recommended, selects arbitrary orientation

  2. normals + tangents ..................... sign of W determines bitangent orientation

  3. normals + uvs + positions + indices .... selects Lengyel's Method

  4. positions + indices .................... generates normals for flat shading only

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

  • Normals must be 3-element float arrays

  • Tangents must be 4-element float arrays

  • UVs must be 2-element float arrays

  • Positions must be 3-element float arrays

  • Triangles must be 3-element index arrays (ushort or uint)

Currently, mikktspace is not supported because it requires re-indexing the mesh. Instead we use the method described by Eric Lengyel in "Foundations of Game Engine Development" (Volume 2, Chapter 7).

actual class Builder

The Builder is used to construct an immutable surface orientation helper.

Clients provide pointers into their own data, which is synchronously consumed during build(). At a minimum, clients must supply a vertex count. They can supply data in any of the following combinations:

  1. normals only ........................... not recommended, selects arbitrary orientation

  2. normals + tangents ..................... sign of W determines bitangent orientation

  3. normals + uvs + positions + indices .... selects Lengyel's Method

  4. positions + indices .................... generates normals for flat shading only

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

  • Normals must be 3-element float arrays

  • Tangents must be 4-element float arrays

  • UVs must be 2-element float arrays

  • Positions must be 3-element float arrays

  • Triangles must be 3-element index arrays (ushort or uint)

Currently, mikktspace is not supported because it requires re-indexing the mesh. Instead we use the method described by Eric Lengyel in "Foundations of Game Engine Development" (Volume 2, Chapter 7).

actual class Builder

The Builder is used to construct an immutable surface orientation helper.

Clients provide pointers into their own data, which is synchronously consumed during build(). At a minimum, clients must supply a vertex count. They can supply data in any of the following combinations:

  1. normals only ........................... not recommended, selects arbitrary orientation

  2. normals + tangents ..................... sign of W determines bitangent orientation

  3. normals + uvs + positions + indices .... selects Lengyel's Method

  4. positions + indices .................... generates normals for flat shading only

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

  • Normals must be 3-element float arrays

  • Tangents must be 4-element float arrays

  • UVs must be 2-element float arrays

  • Positions must be 3-element float arrays

  • Triangles must be 3-element index arrays (ushort or uint)

Currently, mikktspace is not supported because it requires re-indexing the mesh. Instead we use the method described by Eric Lengyel in "Foundations of Game Engine Development" (Volume 2, Chapter 7).

actual class Builder

The Builder is used to construct an immutable surface orientation helper.

Clients provide pointers into their own data, which is synchronously consumed during build(). At a minimum, clients must supply a vertex count. They can supply data in any of the following combinations:

  1. normals only ........................... not recommended, selects arbitrary orientation

  2. normals + tangents ..................... sign of W determines bitangent orientation

  3. normals + uvs + positions + indices .... selects Lengyel's Method

  4. positions + indices .................... generates normals for flat shading only

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

  • Normals must be 3-element float arrays

  • Tangents must be 4-element float arrays

  • UVs must be 2-element float arrays

  • Positions must be 3-element float arrays

  • Triangles must be 3-element index arrays (ushort or uint)

Currently, mikktspace is not supported because it requires re-indexing the mesh. Instead we use the method described by Eric Lengyel in "Foundations of Game Engine Development" (Volume 2, Chapter 7).

Constructors

Link copied to clipboard
actual constructor()
expect constructor()
constructor()
actual constructor()
actual constructor()

Functions

Link copied to clipboard

Generates quaternions or returns null if the submitted data is an incomplete combination.

Generates quaternions or returns null if the submitted data is an incomplete combination.

Generates quaternions or returns null if the submitted data is an incomplete combination.

Generates quaternions or returns null if the submitted data is an incomplete combination.

Generates quaternions or returns null if the submitted data is an incomplete combination.

Link copied to clipboard
actual fun normals(buffer: FloatArray, stride: Int): SurfaceOrientation.Builder

Specifies the vertex normals. Stride is the byte offset between consecutive normals.

expect fun normals(buffer: FloatArray, stride: Int = 0): SurfaceOrientation.Builder

Specifies the vertex normals. Stride is the byte offset between consecutive normals.

actual fun normals(buffer: FloatArray, stride: Int): SurfaceOrientation.Builder

Specifies the vertex normals. Stride is the byte offset between consecutive normals.

actual fun normals(buffer: FloatArray, stride: Int): SurfaceOrientation.Builder

Specifies the vertex normals. Stride is the byte offset between consecutive normals.

actual fun normals(buffer: FloatArray, stride: Int): SurfaceOrientation.Builder

Specifies the vertex normals. Stride is the byte offset between consecutive normals.

Link copied to clipboard
actual fun positions(buffer: FloatArray, stride: Int): SurfaceOrientation.Builder

Specifies the vertex positions. Stride is the byte offset between consecutive positions.

expect fun positions(buffer: FloatArray, stride: Int = 0): SurfaceOrientation.Builder

Specifies the vertex positions. Stride is the byte offset between consecutive positions.

actual fun positions(buffer: FloatArray, stride: Int): SurfaceOrientation.Builder

Specifies the vertex positions. Stride is the byte offset between consecutive positions.

actual fun positions(buffer: FloatArray, stride: Int): SurfaceOrientation.Builder

Specifies the vertex positions. Stride is the byte offset between consecutive positions.

actual fun positions(buffer: FloatArray, stride: Int): SurfaceOrientation.Builder

Specifies the vertex positions. Stride is the byte offset between consecutive positions.

Link copied to clipboard
actual fun tangents(buffer: FloatArray, stride: Int): SurfaceOrientation.Builder

Specifies the vertex tangents. Stride is the byte offset between consecutive tangents.

expect fun tangents(buffer: FloatArray, stride: Int = 0): SurfaceOrientation.Builder

Specifies the vertex tangents. Stride is the byte offset between consecutive tangents.

actual fun tangents(buffer: FloatArray, stride: Int): SurfaceOrientation.Builder

Specifies the vertex tangents. Stride is the byte offset between consecutive tangents.

actual fun tangents(buffer: FloatArray, stride: Int): SurfaceOrientation.Builder

Specifies the vertex tangents. Stride is the byte offset between consecutive tangents.

actual fun tangents(buffer: FloatArray, stride: Int): SurfaceOrientation.Builder

Specifies the vertex tangents. Stride is the byte offset between consecutive tangents.

Link copied to clipboard
actual fun triangleCount(triangleCount: Int): SurfaceOrientation.Builder

Specifies the number of triangles in the mesh.

expect fun triangleCount(triangleCount: Int): SurfaceOrientation.Builder

Specifies the number of triangles in the mesh.

actual fun triangleCount(triangleCount: Int): SurfaceOrientation.Builder

Specifies the number of triangles in the mesh.

actual fun triangleCount(triangleCount: Int): SurfaceOrientation.Builder

Specifies the number of triangles in the mesh.

actual fun triangleCount(triangleCount: Int): SurfaceOrientation.Builder

Specifies the number of triangles in the mesh.

Link copied to clipboard

Specifies 16-bit triangle indices.

Specifies 16-bit triangle indices.

Specifies 16-bit triangle indices.

Specifies 16-bit triangle indices.

Specifies 16-bit triangle indices.

Link copied to clipboard

Specifies 32-bit triangle indices.

Specifies 32-bit triangle indices.

Specifies 32-bit triangle indices.

Specifies 32-bit triangle indices.

Specifies 32-bit triangle indices.

Link copied to clipboard
actual fun uvs(buffer: FloatArray, stride: Int): SurfaceOrientation.Builder

Specifies the vertex texture coordinates. Stride is the byte offset between consecutive UVs.

expect fun uvs(buffer: FloatArray, stride: Int = 0): SurfaceOrientation.Builder

Specifies the vertex texture coordinates. Stride is the byte offset between consecutive UVs.

actual fun uvs(buffer: FloatArray, stride: Int): SurfaceOrientation.Builder

Specifies the vertex texture coordinates. Stride is the byte offset between consecutive UVs.

actual fun uvs(buffer: FloatArray, stride: Int): SurfaceOrientation.Builder

Specifies the vertex texture coordinates. Stride is the byte offset between consecutive UVs.

actual fun uvs(buffer: FloatArray, stride: Int): SurfaceOrientation.Builder

Specifies the vertex texture coordinates. Stride is the byte offset between consecutive UVs.

Link copied to clipboard
actual fun vertexCount(vertexCount: Int): SurfaceOrientation.Builder

Specifies the vertex count. This attribute is required.

expect fun vertexCount(vertexCount: Int): SurfaceOrientation.Builder

Specifies the vertex count. This attribute is required.

actual fun vertexCount(vertexCount: Int): SurfaceOrientation.Builder

Specifies the vertex count. This attribute is required.

actual fun vertexCount(vertexCount: Int): SurfaceOrientation.Builder

Specifies the vertex count. This attribute is required.

actual fun vertexCount(vertexCount: Int): SurfaceOrientation.Builder

Specifies the vertex count. This attribute is required.