Class MaterialAdapter

java.lang.Object
com.jme3.scene.plugins.gltf.MaterialAdapter
Direct Known Subclasses:
PBRMaterialAdapter, UnlitMaterialAdapter

public abstract class MaterialAdapter extends Object
A MaterialAdapter allows to map a GLTF material to a JME material. It maps each gltf parameter to its matching parameter in the JME material, and allows for some conversion if the JME material model doesn't exactly match the gltf material model Created by Nehon on 08/08/2017.
  • Constructor Details

    • MaterialAdapter

      public MaterialAdapter()
  • Method Details

    • getMaterialDefPath

      protected abstract String getMaterialDefPath()
      Should return the material definition used by this material adapter
      Returns:
      path to the material definition
    • adaptMatParam

      protected abstract MatParam adaptMatParam(MatParam param)
    • initDefaultMatParams

      protected abstract void initDefaultMatParams(Material material)
      Initializes material parameters to their default settings.
      Parameters:
      material -
    • init

      protected void init(AssetManager assetManager)
    • getMaterial

      protected Material getMaterial()
    • setParam

      public void setParam(String gltfParamName, Object value)
    • addParamMapping

      protected void addParamMapping(String gltfParamName, String jmeParamName)
    • getJmeParamName

      protected String getJmeParamName(String gltfParamName)