Class Material


  • @RequiresApi(api=24)
    public class Material
    extends java.lang.Object
    Represents a reference to a material.
    • 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 a DepthTexture to a parameter of the type 'sampler2d' on this material.
         
        Parameters:
        name - the name of the parameter in the material
        depthTexture - the texture to set
      • setExternalTexture

        public void setExternalTexture​(java.lang.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
      • getExternalTexture

        @Nullable
        public ExternalTexture getExternalTexture​(java.lang.String name)