Search in sources :

Example 51 with Format

use of com.jme3.scene.VertexBuffer.Format in project TeachingInSimulation by ScOrPiOzzy.

the class ConnectionUtil method getJackTerm.

/**
 * 添加插头模型
 * @return
 */
public static Spatial getJackTerm(Format format) {
    AssetManager assetManager = Dispatcher.getIns().getMainApp().getAssetManager();
    Spatial spatial = assetManager.loadModel("Models/Chatou.j3o");
    if (format == null) {
        return spatial;
    }
    String mdlRef = format.getPO().getMdlRef();
    if (Util.notEmpty(mdlRef)) {
        spatial = assetManager.loadModel(mdlRef);
    }
    return spatial;
}
Also used : AssetManager(com.jme3.asset.AssetManager) Spatial(com.jme3.scene.Spatial)

Aggregations

Image (com.jme3.texture.Image)20 ByteBuffer (java.nio.ByteBuffer)19 Format (com.jme3.texture.Image.Format)13 IOException (java.io.IOException)9 ArrayList (java.util.ArrayList)8 ColorRGBA (com.jme3.math.ColorRGBA)7 BufferedImage (java.awt.image.BufferedImage)7 TextureCubeMap (com.jme3.texture.TextureCubeMap)6 Vector3f (com.jme3.math.Vector3f)4 TexturePixel (com.jme3.scene.plugins.blender.textures.TexturePixel)4 PixelInputOutput (com.jme3.scene.plugins.blender.textures.io.PixelInputOutput)4 Texture2D (com.jme3.texture.Texture2D)4 DataInputStream (java.io.DataInputStream)4 AssetNotFoundException (com.jme3.asset.AssetNotFoundException)3 LittleEndien (com.jme3.util.LittleEndien)3 InputStream (java.io.InputStream)3 TextureKey (com.jme3.asset.TextureKey)2 VRAPI (com.jme3.input.vr.VRAPI)2 MatParam (com.jme3.material.MatParam)2 Material (com.jme3.material.Material)2