AI-generated Key Takeaways
-
Materialrepresents a reference to a material in Sceneform and provides methods for manipulating its properties. -
You can create a new instance of a
Materialusing themakeCopy()method, which allows for independent modification of material parameters. -
Materialoffers varioussetmethods to modify material parameters like textures, colors, and numerical values using their respective data types. -
External textures can be integrated into a
Materialvia thesetExternalTexturemethod, facilitating the use of external image sources. -
Materialinherits standard methods from theObjectclass, such asclone,equals, andtoString, for basic object manipulation.
Represents a reference to a material.
Public Methods
| ExternalTexture |
getExternalTexture(String name)
|
| 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 | |
| void | |
| void | |
| void | |
| void | |
| void | |
| void | |
| void | |
| void | |
| void | |
| void | |
| void |
Inherited Methods
Public Methods
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 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 |