Class Material
- java.lang.Object
 - 
- com.google.ar.sceneform.rendering.Material
 
 
- 
@RequiresApi(api=24) public class Material extends java.lang.ObjectRepresents a reference to a material. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMaterial.BuilderBuilder for constructing aMaterial 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Material.Builderbuilder()Constructs aMaterialExternalTexturegetExternalTexture(java.lang.String name)MaterialmakeCopy()Creates a new instance of this Material.voidsetBaseColorTexture(Texture texture)voidsetBoolean(java.lang.String name, boolean x)voidsetBoolean2(java.lang.String name, boolean x, boolean y)voidsetBoolean3(java.lang.String name, boolean x, boolean y, boolean z)voidsetBoolean4(java.lang.String name, boolean x, boolean y, boolean z, boolean w)voidsetDepthTexture(java.lang.String name, DepthTexture depthTexture)Sets aDepthTextureto a parameter of the type 'sampler2d' on this material.voidsetExternalTexture(java.lang.String name, ExternalTexture externalTexture)Sets anExternalTextureto a parameter of type 'samplerExternal' on this material.voidsetFloat(java.lang.String name, float x)voidsetFloat2(java.lang.String name, float x, float y)voidsetFloat3(java.lang.String name, float x, float y, float z)voidsetFloat3(java.lang.String name, Vector3 value)voidsetFloat3(java.lang.String name, Color color)voidsetFloat4(java.lang.String name, float x, float y, float z, float w)voidsetFloat4(java.lang.String name, Color color)voidsetInt(java.lang.String name, int x)voidsetInt2(java.lang.String name, int x, int y)voidsetInt3(java.lang.String name, int x, int y, int z)voidsetInt4(java.lang.String name, int x, int y, int z, int w)voidsetTexture(java.lang.String name, Texture texture) 
 - 
 
- 
- 
Method Detail
- 
makeCopy
public Material makeCopy()
Creates a new instance of this Material.The new material will have a unique copy of the material parameters that can be changed independently. The getFilamentEngine material resource is immutable and will be shared between instances.
 
- 
setBoolean
public void setBoolean(java.lang.String name, boolean x) 
- 
setBoolean2
public void setBoolean2(java.lang.String name, boolean x, boolean y) 
- 
setBoolean3
public void setBoolean3(java.lang.String name, boolean x, boolean y, boolean z) 
- 
setBoolean4
public void setBoolean4(java.lang.String name, boolean x, boolean y, boolean z, boolean w) 
- 
setFloat
public void setFloat(java.lang.String name, float x) 
- 
setFloat2
public void setFloat2(java.lang.String name, float x, float y) 
- 
setFloat3
public void setFloat3(java.lang.String name, float x, float y, float z) 
- 
setFloat3
public void setFloat3(java.lang.String name, Vector3 value) 
- 
setFloat3
public void setFloat3(java.lang.String name, Color color) 
- 
setFloat4
public void setFloat4(java.lang.String name, float x, float y, float z, float w) 
- 
setFloat4
public void setFloat4(java.lang.String name, Color color) 
- 
setInt
public void setInt(java.lang.String name, int x) 
- 
setInt2
public void setInt2(java.lang.String name, int x, int y) 
- 
setInt3
public void setInt3(java.lang.String name, int x, int y, int z) 
- 
setInt4
public void setInt4(java.lang.String name, int x, int y, int z, int w) 
- 
setTexture
public void setTexture(java.lang.String name, Texture texture) 
- 
setBaseColorTexture
public void setBaseColorTexture(Texture texture)
 
- 
setDepthTexture
public void setDepthTexture(java.lang.String name, DepthTexture depthTexture)Sets aDepthTextureto a parameter of the type 'sampler2d' on this material.- Parameters:
 name- the name of the parameter in the materialdepthTexture- the texture to set
 
- 
setExternalTexture
public void setExternalTexture(java.lang.String name, ExternalTexture externalTexture)Sets anExternalTextureto a parameter of type 'samplerExternal' on this material.- Parameters:
 name- the name of the parameter in the materialexternalTexture- the texture to set
 
- 
getExternalTexture
@Nullable public ExternalTexture getExternalTexture(java.lang.String name)
 
- 
builder
public static Material.Builder builder()
Constructs aMaterial 
 - 
 
 -