public class GltfLoader
extends java.lang.Object
implements com.jme3.asset.AssetLoader
| Modifier and Type | Class and Description |
|---|---|
static class |
GltfLoader.SkinBuffers |
static class |
GltfLoader.WeightData |
| Constructor and Description |
|---|
GltfLoader() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToCache(java.lang.String name,
int index,
java.lang.Object object,
int maxLength) |
<T> T |
fetchFromCache(java.lang.String name,
int index,
java.lang.Class<T> type) |
protected byte[] |
getBytes(int bufferIndex,
java.lang.String uri,
java.lang.Integer bufferLength) |
com.google.gson.JsonObject |
getDocRoot() |
com.jme3.asset.AssetInfo |
getInfo() |
com.jme3.scene.Node |
getRootNode() |
java.lang.Object |
load(com.jme3.asset.AssetInfo assetInfo) |
protected java.lang.Object |
loadFromStream(com.jme3.asset.AssetInfo assetInfo,
java.io.InputStream stream) |
<R> R |
readAccessorData(int accessorIndex,
com.jme3.scene.plugins.gltf.GltfLoader.Populator<R> populator) |
void |
readAnimation(int animationIndex) |
java.lang.Object |
readBuffer(java.lang.Integer bufferViewIndex,
int byteOffset,
int count,
java.lang.Object store,
int numComponents,
com.jme3.scene.VertexBuffer.Format format) |
void |
readCameras() |
byte[] |
readData(int bufferIndex) |
com.jme3.texture.Texture2D |
readImage(int sourceIndex,
boolean flip) |
com.jme3.material.Material |
readMaterial(int materialIndex) |
com.jme3.scene.Geometry[] |
readMeshPrimitives(int meshIndex) |
java.lang.Object |
readNode(int nodeIndex) |
com.jme3.animation.Bone |
readNodeAsBone(int nodeIndex,
int boneIndex,
int skinIndex,
com.jme3.math.Matrix4f modelBindMatrix) |
com.jme3.texture.Texture2D |
readSampler(int samplerIndex,
com.jme3.texture.Texture2D texture) |
void |
readScenes(com.google.gson.JsonPrimitive defaultScene,
com.jme3.scene.Node rootNode) |
void |
readSkins() |
com.jme3.texture.Texture2D |
readTexture(com.google.gson.JsonObject texture) |
com.jme3.texture.Texture2D |
readTexture(com.google.gson.JsonObject texture,
boolean flip) |
com.jme3.math.Transform |
readTransforms(com.google.gson.JsonObject nodeData) |
public java.lang.Object load(com.jme3.asset.AssetInfo assetInfo)
throws java.io.IOException
load in interface com.jme3.asset.AssetLoaderjava.io.IOExceptionprotected java.lang.Object loadFromStream(com.jme3.asset.AssetInfo assetInfo,
java.io.InputStream stream)
throws java.io.IOException
java.io.IOExceptionpublic void readScenes(com.google.gson.JsonPrimitive defaultScene,
com.jme3.scene.Node rootNode)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object readNode(int nodeIndex)
throws java.io.IOException
java.io.IOExceptionpublic com.jme3.math.Transform readTransforms(com.google.gson.JsonObject nodeData)
public com.jme3.scene.Geometry[] readMeshPrimitives(int meshIndex)
throws java.io.IOException
java.io.IOExceptionpublic <R> R readAccessorData(int accessorIndex,
com.jme3.scene.plugins.gltf.GltfLoader.Populator<R> populator)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object readBuffer(java.lang.Integer bufferViewIndex,
int byteOffset,
int count,
java.lang.Object store,
int numComponents,
com.jme3.scene.VertexBuffer.Format format)
throws java.io.IOException
java.io.IOExceptionpublic byte[] readData(int bufferIndex)
throws java.io.IOException
java.io.IOExceptionprotected byte[] getBytes(int bufferIndex,
java.lang.String uri,
java.lang.Integer bufferLength)
throws java.io.IOException
java.io.IOExceptionpublic com.jme3.material.Material readMaterial(int materialIndex)
throws java.io.IOException
java.io.IOExceptionpublic void readCameras()
throws java.io.IOException
java.io.IOExceptionpublic com.jme3.texture.Texture2D readTexture(com.google.gson.JsonObject texture)
throws java.io.IOException
java.io.IOExceptionpublic com.jme3.texture.Texture2D readTexture(com.google.gson.JsonObject texture,
boolean flip)
throws java.io.IOException
java.io.IOExceptionpublic com.jme3.texture.Texture2D readImage(int sourceIndex,
boolean flip)
throws java.io.IOException
java.io.IOExceptionpublic void readAnimation(int animationIndex)
throws java.io.IOException
java.io.IOExceptionpublic com.jme3.texture.Texture2D readSampler(int samplerIndex,
com.jme3.texture.Texture2D texture)
throws java.io.IOException
java.io.IOExceptionpublic void readSkins()
throws java.io.IOException
java.io.IOExceptionpublic com.jme3.animation.Bone readNodeAsBone(int nodeIndex,
int boneIndex,
int skinIndex,
com.jme3.math.Matrix4f modelBindMatrix)
throws java.io.IOException
java.io.IOExceptionpublic <T> T fetchFromCache(java.lang.String name,
int index,
java.lang.Class<T> type)
public void addToCache(java.lang.String name,
int index,
java.lang.Object object,
int maxLength)
public com.jme3.asset.AssetInfo getInfo()
public com.google.gson.JsonObject getDocRoot()
public com.jme3.scene.Node getRootNode()