Package com.jme3.scene.plugins.gltf
Class MaterialAdapter
java.lang.Object
com.jme3.scene.plugins.gltf.MaterialAdapter
- Direct Known Subclasses:
PBRMaterialAdapter,UnlitMaterialAdapter
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract com.jme3.material.MatParamadaptMatParam(com.jme3.material.MatParam param) protected voidaddParamMapping(String gltfParamName, String jmeParamName) protected StringgetJmeParamName(String gltfParamName) protected com.jme3.material.Materialprotected abstract StringShould return the material definition used by this material adapterprotected voidinit(com.jme3.asset.AssetManager assetManager) protected abstract voidinitDefaultMatParams(com.jme3.material.Material material) Initializes material parameters to their default settings.void
-
Constructor Details
-
MaterialAdapter
public MaterialAdapter()
-
-
Method Details
-
getMaterialDefPath
Should return the material definition used by this material adapter- Returns:
- path to the material definition
-
adaptMatParam
protected abstract com.jme3.material.MatParam adaptMatParam(com.jme3.material.MatParam param) -
initDefaultMatParams
protected abstract void initDefaultMatParams(com.jme3.material.Material material) Initializes material parameters to their default settings.- Parameters:
material-
-
init
protected void init(com.jme3.asset.AssetManager assetManager) -
getMaterial
protected com.jme3.material.Material getMaterial() -
setParam
-
addParamMapping
-
getJmeParamName
-