Java Code Examples for com.jme3.system.JmeSystem#setSystemDelegate()
The following examples show how to use
com.jme3.system.JmeSystem#setSystemDelegate() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CollideIgnoreTransformTest.java From jmonkeyengine with BSD 3-Clause "New" or "Revised" License | 6 votes |
@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); }
Example 2
Source File: LoadShaderSourceTest.java From jmonkeyengine with BSD 3-Clause "New" or "Revised" License | 5 votes |
@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"); assetManager.registerLoader(GLSLLoader.class, "glsl"); String showNormals = (String) assetManager.loadAsset("Common/MatDefs/Misc/ShowNormals.frag"); System.out.println(showNormals); }
Example 3
Source File: IosHarness.java From jmonkeyengine with BSD 3-Clause "New" or "Revised" License | 4 votes |
public IosHarness(long appDelegate) { super(appDelegate); JmeSystem.setSystemDelegate(new JmeIosSystem()); }