public final AssetManager newAssetManager(URL configFile) { return new DesktopAssetManager(configFile); }
public final AssetManager newAssetManager() { return new DesktopAssetManager(null); }
public static AssetManager createAssetManager() { Logger.getLogger(AssetConfig.class.getName()).setLevel(Level.OFF); return new DesktopAssetManager(true); }
@Test public void testLoadShaderSource() { JmeSystem.setSystemDelegate(new MockJmeSystemDelegate()); AssetManager assetManager = new DesktopAssetManager(); assetManager.registerLocator(null, ClasspathLocator.class); assetManager.registerLoader(GLSLLoader.class, "frag"); assetManager.registerLoader(GLSLLoader.class, "glsllib"); String showNormals = (String) assetManager.loadAsset("Common/MatDefs/Misc/ShowNormals.frag"); System.out.println(showNormals); }
DesktopAssetManager assets = new DesktopAssetManager(true); BitmapFont font = assets.loadFont("Interface/Fonts/Console.fnt"); BitmapText text1 = new BitmapText(font);
@Test public void testPhantomTriangles() { assetManager = new DesktopAssetManager(); assetManager.registerLocator(null, ClasspathLocator.class); assetManager.registerLoader(J3MLoader.class, "j3m", "j3md"); rootNode = new Node(); createRedSquare(); createWhiteLines(); rootNode.updateLogicalState(0.01f); rootNode.updateGeometricState(); castRay(); } }
@Test public void testPhantomTriangles() { JmeSystem.setSystemDelegate(new MockJmeSystemDelegate()); assetManager = new DesktopAssetManager(); assetManager.registerLocator(null, ClasspathLocator.class); assetManager.registerLoader(J3MLoader.class, "j3m", "j3md"); rootNode = new Node(); createRedSquare(); rootNode.updateLogicalState(0.01f); rootNode.updateGeometricState(); /** * ray in the -Z direction, starting from (0.5, 0.6, 10) */ Ray ray1 = new Ray(/* origin */new Vector3f(0.5f, 0.6f, 10f), /* direction */ new Vector3f(0f, 0f, -1f)); castRay(ray1, 1); /** * ray in the -Z direction, starting from (0.5, 3, 10) */ Ray ray0 = new Ray(/* origin */new Vector3f(0.5f, 3f, 10f), /* direction */ new Vector3f(0f, 0f, -1f)); castRay(ray0, 0); } }
public final AssetManager newAssetManager(URL configFile) { return new DesktopAssetManager(configFile); }
public final AssetManager newAssetManager() { return new DesktopAssetManager(null); }
public static void main(String[] args) { DesktopAssetManager dam = new DesktopAssetManager(); String base = "file:///home/pgi/3d models/"; dam.registerLoader(ColladaLoader.class, "dae"); dam.registerLocator(base, UrlLocator.class.getName()); Spatial loadModel = dam.loadModel(base + "triangle_anim.dae"); } }