Package com.google.android.filament
Class SurfaceOrientation.Builder
- java.lang.Object
-
- com.google.android.filament.SurfaceOrientation.Builder
-
- Enclosing class:
- SurfaceOrientation
public static class SurfaceOrientation.Builder extends java.lang.ObjectConstructs an immutable surface orientation helper. At a minimum, clients must supply a vertex count. They can supply data in any of the following combinations:- normals only (not recommended)
- normals + tangents (sign of W determines bitangent orientation)
- normals + uvs + positions + indices
- positions + indices
- Normals must be float3
- Tangents must be float4
- UVs must be float2
- Positions must be float3
- Triangles must be uint3 or ushort3
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SurfaceOrientationbuild()Consumes the input data, produces quaternions, and destroys the native builder.SurfaceOrientation.Buildernormals(java.nio.Buffer buffer)SurfaceOrientation.Builderpositions(java.nio.Buffer buffer)SurfaceOrientation.Buildertangents(java.nio.Buffer buffer)SurfaceOrientation.BuildertriangleCount(int triangleCount)SurfaceOrientation.Buildertriangles_uint16(java.nio.Buffer buffer)SurfaceOrientation.Buildertriangles_uint32(java.nio.Buffer buffer)SurfaceOrientation.Builderuvs(java.nio.Buffer buffer)SurfaceOrientation.BuildervertexCount(int vertexCount)
-
-
-
Method Detail
-
vertexCount
@NonNull public SurfaceOrientation.Builder vertexCount(@IntRange(from=1L) int vertexCount)
-
normals
@NonNull public SurfaceOrientation.Builder normals(@NonNull java.nio.Buffer buffer)
-
tangents
@NonNull public SurfaceOrientation.Builder tangents(@NonNull java.nio.Buffer buffer)
-
uvs
@NonNull public SurfaceOrientation.Builder uvs(@NonNull java.nio.Buffer buffer)
-
positions
@NonNull public SurfaceOrientation.Builder positions(@NonNull java.nio.Buffer buffer)
-
triangleCount
@NonNull public SurfaceOrientation.Builder triangleCount(int triangleCount)
-
triangles_uint16
@NonNull public SurfaceOrientation.Builder triangles_uint16(@NonNull java.nio.Buffer buffer)
-
triangles_uint32
@NonNull public SurfaceOrientation.Builder triangles_uint32(@NonNull java.nio.Buffer buffer)
-
build
@NonNull public SurfaceOrientation build()
Consumes the input data, produces quaternions, and destroys the native builder.
-
-