Material

public class Material

Represents a reference to a material.

Public Methods

ExternalTexture
Material
makeCopy()
Creates a new instance of this Material.
void
setBoolean(String name, boolean x)
void
setBoolean2(String name, boolean x, boolean y)
void
setBoolean3(String name, boolean x, boolean y, boolean z)
void
setBoolean4(String name, boolean x, boolean y, boolean z, boolean w)
void
setExternalTexture(String name, ExternalTexture externalTexture)
Sets an ExternalTexture to a parameter of type 'samplerExternal' on this material.
void
setFloat(String name, float x)
void
setFloat2(String name, float x, float y)
void
setFloat3(String name, float x, float y, float z)
void
setFloat3(String name, Color color)
void
setFloat3(String name, Vector3 value)
void
setFloat4(String name, Color color)
void
setFloat4(String name, float x, float y, float z, float w)
void
setInt(String name, int x)
void
setInt2(String name, int x, int y)
void
setInt3(String name, int x, int y, int z)
void
setInt4(String name, int x, int y, int z, int w)
void
setTexture(String name, Texture texture)

Inherited Methods

Public Methods

public ExternalTexture getExternalTexture (String name)

Parameters
name

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.

public void setBoolean (String name, boolean x)

Parameters
name
x

public void setBoolean2 (String name, boolean x, boolean y)

Parameters
name
x
y

public void setBoolean3 (String name, boolean x, boolean y, boolean z)

Parameters
name
x
y
z

public void setBoolean4 (String name, boolean x, boolean y, boolean z, boolean w)

Parameters
name
x
y
z
w

public void setExternalTexture (String name, ExternalTexture externalTexture)

Sets an ExternalTexture to a parameter of type 'samplerExternal' on this material.

Parameters
name the name of the parameter in the material
externalTexture the texture to set

public void setFloat (String name, float x)

Parameters
name
x

public void setFloat2 (String name, float x, float y)

Parameters
name
x
y

public void setFloat3 (String name, float x, float y, float z)

Parameters
name
x
y
z

public void setFloat3 (String name, Color color)

Parameters
name
color

public void setFloat3 (String name, Vector3 value)

Parameters
name
value

public void setFloat4 (String name, Color color)

Parameters
name
color

public void setFloat4 (String name, float x, float y, float z, float w)

Parameters
name
x
y
z
w

public void setInt (String name, int x)

Parameters
name
x

public void setInt2 (String name, int x, int y)

Parameters
name
x
y

public void setInt3 (String name, int x, int y, int z)

Parameters
name
x
y
z

public void setInt4 (String name, int x, int y, int z, int w)

Parameters
name
x
y
z
w

public void setTexture (String name, Texture texture)

Parameters
name
texture