Class UnshadedMaterialFactory

java.lang.Object
com.jme3.scene.plugins.gltf.UnshadedMaterialFactory
All Implemented Interfaces:
GltfMaterialFactory

public class UnshadedMaterialFactory extends Object implements GltfMaterialFactory
This material factory creates jME3's standard "Unshaded" materials.
  • Constructor Details

    • UnshadedMaterialFactory

      public UnshadedMaterialFactory()
  • Method Details

    • accepts

      public boolean accepts(com.jme3.asset.AssetKey<?> assetKey, GltfMaterialData gltfMaterialData)
      Description copied from interface: GltfMaterialFactory
      Checks, if the factory is able to create a new material from the given material data. If it accepts the material data, the GltfMaterialFactory.createMaterial(AssetManager, AssetKey, GltfMaterialData) method can be used to create a new material.
      Specified by:
      accepts in interface GltfMaterialFactory
      Parameters:
      assetKey - The AssetKey used for loading the GLTF model.
      gltfMaterialData - The GltfMaterialData containing all available GLTF material data.
      Returns:
      true if the factory is able to create a material from the given material data, otherwise false.
    • createMaterial

      public com.jme3.material.Material createMaterial(com.jme3.asset.AssetManager assetManager, com.jme3.asset.AssetKey<?> assetKey, GltfMaterialData gltfMaterialData)
      Description copied from interface: GltfMaterialFactory
      Creates a new material from the given material data.
      Specified by:
      createMaterial in interface GltfMaterialFactory
      Parameters:
      assetManager - The AssetManager instance.
      assetKey - The AssetKey used for loading the GLTF model.
      gltfMaterialData - The GltfMaterialData containing all available GLTF material data.
      Returns:
      The new created Material.
    • getMaterialDefPath

      protected String getMaterialDefPath()
    • setParam

      protected void setParam(com.jme3.material.Material material, String paramName, Object value)
    • setParam

      protected void setParam(com.jme3.material.Material material, String paramName, Object value, Object defaultValue)