Package com.jme3.scene.plugins.gltf
Class GltfUtils
java.lang.Object
com.jme3.scene.plugins.gltf.GltfUtils
Created by Nehon on 07/08/2017.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertNotNull
(Object o, String errorMessage) static void
dumpArray
(float[] array) static void
static void
static boolean
equalsEpsilon
(Quaternion q1, Quaternion q2) static boolean
equalsEpsilon
(Vector3f v1, Vector3f v2) static Spatial
findCommonAncestor
(List<Spatial> spatials) static MaterialAdapter
getAdapterForMaterial
(AssetInfo info, String defName) static Boolean
getAsBoolean
(com.google.gson.JsonObject parent, String name) static Boolean
getAsBoolean
(com.google.gson.JsonObject parent, String name, boolean defaultValue) static ColorRGBA
getAsColor
(com.google.gson.JsonObject parent, String name) static ColorRGBA
getAsColor
(com.google.gson.JsonObject parent, String name, ColorRGBA defaultValue) static Float
getAsFloat
(com.google.gson.JsonObject parent, String name) static Float
getAsFloat
(com.google.gson.JsonObject parent, String name, float defaultValue) static Integer
getAsInteger
(com.google.gson.JsonObject parent, String name) static Integer
getAsInteger
(com.google.gson.JsonObject parent, String name, int defaultValue) static String
getAsString
(com.google.gson.JsonObject parent, String name) static int
static GltfModelKey
static Texture.MagFilter
getMagFilter
(Integer value) static Mesh.Mode
getMeshMode
(Integer mode) static Texture.MinFilter
getMinFilter
(Integer value) static int
getNumberOfComponents
(String type) static LittleEndien
getStream
(byte[] buffer) static VertexBuffer.Format
getVertexBufferFormat
(int componentType) static VertexBuffer.Type
getVertexBufferType
(String attribute) static Texture.WrapMode
getWrapMode
(Integer value) static void
handleSkinningBuffers
(Mesh mesh, IntMap<GltfLoader.SkinBuffers> skinBuffers) static boolean
isKeepSkeletonPose
(AssetInfo info) static void
static void
populateBuffer
(Object store, byte[] source, int count, int byteOffset, int byteStride, int numComponents, VertexBuffer.Format format) static float
readAsFloat
(LittleEndien stream, VertexBuffer.Format format) static void
setSkinBuffers
(Mesh mesh, short[] jointsArray, float[] weightsArray, int componentSize) static byte[]
toByteArray
(short[] shortArray) static Matrix4f
toRowMajor
(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33)
-
Method Details
-
getMeshMode
-
getVertexBufferFormat
-
getNumberOfComponents
-
getVertexBufferType
-
getIndex
-
getMagFilter
-
getMinFilter
-
getWrapMode
-
padBuffer
-
populateBuffer
public static void populateBuffer(Object store, byte[] source, int count, int byteOffset, int byteStride, int numComponents, VertexBuffer.Format format) throws IOException - Throws:
IOException
-
readAsFloat
- Throws:
IOException
-
toByteArray
public static byte[] toByteArray(short[] shortArray) -
handleSkinningBuffers
-
setSkinBuffers
public static void setSkinBuffers(Mesh mesh, short[] jointsArray, float[] weightsArray, int componentSize) -
toRowMajor
public static Matrix4f toRowMajor(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33) -
getKey
-
getAdapterForMaterial
-
isKeepSkeletonPose
-
getStream
-
getAsString
-
getAsInteger
-
getAsInteger
-
getAsFloat
-
getAsFloat
-
getAsBoolean
-
getAsBoolean
-
getAsColor
-
getAsColor
-
assertNotNull
-
equalsEpsilon
-
equalsEpsilon
-
dumpArray
-
dumpArray
public static void dumpArray(float[] array) -
findCommonAncestor
-
dumpMesh
-