Package com.google.android.filament
Class Material.Builder
- java.lang.Object
-
- com.google.android.filament.Material.Builder
-
- Enclosing class:
- Material
public static class Material.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Materialbuild(Engine engine)Creates and returns the Material object.Material.Builderpayload(java.nio.Buffer buffer, int size)Specifies the material data.
-
-
-
Method Detail
-
payload
@NonNull public Material.Builder payload(@NonNull java.nio.Buffer buffer, @IntRange(from=0L) int size)
Specifies the material data. The material data is a binary blob produced by libfilamat or by matc.- Parameters:
buffer- buffer containing material datasize- size of the material data in bytes
-
build
@NonNull public Material build(@NonNull Engine engine)
Creates and returns the Material object.- Parameters:
engine- reference to the Engine instance to associate this Material with- Returns:
- the newly created object
- Throws:
java.lang.IllegalStateException- if the material could not be created
-
-