Package com.jme3.scene.plugins.gltf
Class GltfModelKey
An optional key to use when loading a glTF file
It allows you to specify custom data loader, replacing the default ones.
MaterialAdapters: Allows you to map glTF standard material model to a non-stock material.
ExtensionLoaders: Allows you to provide or override a loader for a given glTF extension.
ExtrasLoader: Allows you to load any extras, application specific data of the glTF file.
For more information, please see glTF 2.0 specifications
https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md
Created by Nehon on 08/08/2017.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getAdapterForMaterial
(String gltfMaterialName) getExtensionLoader
(String extensionName) int
hashCode()
boolean
void
registerExtensionLoader
(String extensionName, ExtensionLoader loader) Registers an extension loader for the given extension name.void
registerMaterialAdapter
(String gltfMaterialName, MaterialAdapter adapter) Registers a MaterialAdapter for the given materialName.void
setExtrasLoader
(ExtrasLoader extrasLoader) Sets the ExtrasLoader for reading any extra information from the gltf file.void
setKeepSkeletonPose
(boolean keepSkeletonPose) Methods inherited from class com.jme3.asset.ModelKey
getCacheType, getProcessorType
Methods inherited from class com.jme3.asset.AssetKey
clone, getExtension, getExtension, getFolder, getFolder, getName, read, reducePath, toString, write
-
Constructor Details
-
GltfModelKey
-
GltfModelKey
public GltfModelKey()
-
-
Method Details
-
registerMaterialAdapter
Registers a MaterialAdapter for the given materialName. The materialName must be "pbrMetallicRoughness" or any name from KHR_materials glTF Extension (for example "pbrSpecularGlossiness" for "KHR_materials_pbrSpecularGlossiness" extension)- Parameters:
gltfMaterialName
- the name of the gltf materialadapter
- the material adapter
-
registerExtensionLoader
Registers an extension loader for the given extension name. For more information on extension please see glTF 2.0 extensions registry https://github.com/KhronosGroup/glTF/blob/master/extensions/README.md- Parameters:
extensionName
- the name of the extensionloader
- the Extension loader
-
getAdapterForMaterial
-
getExtensionLoader
-
isKeepSkeletonPose
public boolean isKeepSkeletonPose() -
setKeepSkeletonPose
public void setKeepSkeletonPose(boolean keepSkeletonPose) -
getExtrasLoader
-
setExtrasLoader
Sets the ExtrasLoader for reading any extra information from the gltf file.- Parameters:
extrasLoader
- the desired loader
-
equals
-
hashCode
public int hashCode()
-