public Void call() throws Exception { Spatial spatial = serverApp.getAssetManager().loadModel(finalModel); serverApp.getRootNode().attachChild(spatial); return null; } });
public JMEStereoSpriteGenerator(SimpleApplication jmeRenderer, ColorRGBA colorRGBA) { super("JMELidarFINALVisualizer"); this.jmeRenderer = jmeRenderer; pointCloudGenerator = new JMEPointCloudGenerator(jmeRenderer.getAssetManager()); defaultColor = colorRGBA; }
public JMELidarSpriteGenerator(SimpleApplication jmeRenderer, ColorRGBA colorRGBA) { super("JMELidarFINALVisualizer"); this.jmeRenderer = jmeRenderer; pointCloudGenerator = new JMEPointCloudGenerator(jmeRenderer.getAssetManager()); defaultColor = colorRGBA; }
/** Reads the colors of first column of an image and creates a gradient texture.*/ public static void test(SimpleApplication scene) { BufferedImage image = new BufferedImage(512, 512, BufferedImage.TYPE_INT_ARGB); Graphics2D g2d = image.createGraphics(); ImageUtilities.verticalGradient(image, g2d, Color.RED, Color.YELLOW, Color.GREEN, Color.BLUE); g2d.setFont(new Font("SansSerif", Font.PLAIN, 70)); g2d.setColor(Color.BLACK); g2d.drawString("Hello World", 70, 70); image = ImageUtilities.rotateImage(image, FastMath.HALF_PI); scene.getRootNode().attachChild(Utilities.createBillboard(Utilities.getUnshadedMaterial(ImageUtilities.createTexture(image,g2d), null, BlendMode.Off, scene.getAssetManager()), 5f)); }
/** Reads the colors of first column of an image and creates a gradient texture.*/ public static void test(SimpleApplication scene) { BufferedImage image = new BufferedImage(512, 512, BufferedImage.TYPE_INT_ARGB); Graphics2D g2d = image.createGraphics(); ImageUtilities.verticalGradient(image, g2d, Color.RED, Color.YELLOW, Color.GREEN, Color.BLUE); g2d.setFont(new Font("SansSerif", Font.PLAIN, 70)); g2d.setColor(Color.BLACK); g2d.drawString("Hello World", 70, 70); image = ImageUtilities.rotateImage(image, FastMath.HALF_PI); scene.getRootNode().attachChild(Utilities.createBillboard(Utilities.getUnshadedMaterial(ImageUtilities.createTexture(image,g2d), null, BlendMode.Off, scene.getAssetManager()), 5f)); }
/** Reads the colors of first column of an image and creates a gradient texture.*/ public static void testMain(SimpleApplication scene) { String shape = "shapes/public domain/tribal_star.png"; float height = 0.05f; //Apply image effects. BufferedImage shapeImage = ImageUtilities.loadImage(shape, scene.getAssetManager()); shapeImage = ImageUtilities.symmetrifyX(shapeImage, true, false); //Get shape. com.jme3.scene.Geometry g = createShape(shapeImage, height); g.setMaterial(Utilities.getUnshadedMaterial(scene.getAssetManager().loadTexture("Textures/CobbleStone.png"), null, BlendMode.Off, scene.getAssetManager())); g.scale(10f); g.rotate(FastMath.HALF_PI*3, 0, 0); scene.getRootNode().attachChild(g); scene.getViewPort().setBackgroundColor(new ColorRGBA(0.7f, 0.8f, 1f, 1f)); }
/** Reads the colors of first column of an image and creates a gradient texture.*/ public static void testMain(SimpleApplication scene) { String shape = "shapes/public domain/tribal_star.png"; float height = 0.05f; //Apply image effects. BufferedImage shapeImage = ImageUtilities.loadImage(shape, scene.getAssetManager()); shapeImage = ImageUtilities.symmetrifyX(shapeImage, true, false); //Get shape. com.jme3.scene.Geometry g = createShape(shapeImage, height); g.setMaterial(Utilities.getUnshadedMaterial(scene.getAssetManager().loadTexture("Textures/CobbleStone.png"), null, BlendMode.Off, scene.getAssetManager())); g.scale(10f); g.rotate(FastMath.HALF_PI*3, 0, 0); scene.getRootNode().attachChild(g); scene.getViewPort().setBackgroundColor(new ColorRGBA(0.7f, 0.8f, 1f, 1f)); }
public static JMEGraphics3DNode addNodesRecursively(Graphics3DNode graphics3dNode, Node parentNode, SimpleApplication simpleApplication) { JMEGraphics3DNode jmeNode = new JMEGraphics3DNode(graphics3dNode, simpleApplication.getAssetManager(), simpleApplication, null); jmeNode.update(); Graphics3DNodeType nodeType = graphics3dNode.getNodeType(); jmeNode.setType(nodeType); parentNode.attachChild(jmeNode); for (Graphics3DNode child : graphics3dNode.getChildrenNodes()) { addNodesRecursively(child, jmeNode, simpleApplication); } return jmeNode; }
public void initScoreBoard() { SimpleApplication app = getApp(); // Should be from registry, not this way AppSettings settings = app.getContext().getSettings(); // Should be from registry, not this way int numScoreRows = 4; int rowHeight = 50; int boardWidth = settings.getWidth(); int baseX = 20; int baseY = settings.getHeight() - numScoreRows * rowHeight; float textSizeMult = 0.5f; ScoreBoard sb = new ScoreBoard(app.getAssetManager(), app.getGuiNode(), baseX, baseY, boardWidth, rowHeight, numScoreRows, textSizeMult); setScoreBoard(sb); // Goofy way to do it }
Material mat = new Material(app.getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md"); mat.setTexture("ColorMap", texture);
@Override public void init(SimpleApplication app) { SpatialFactory.init(app.getAssetManager(), app.getRootNode()); this.app = app;
@Override public void init(SimpleApplication app) { SpatialFactory.init(app.getAssetManager(), app.getRootNode());
@Override public void init(SimpleApplication app) { SpatialFactory.init(app.getAssetManager(), app.getRootNode()); worldAppState.setCalendar(2013, 1, 1, 12, 0, 0); Debug.enableDebugGrid(10, app.getAssetManager(), app.getRootNode()); bodiesAppState = new BodiesAppState(); stateManager.attach(bodiesAppState);
@Override public void init(SimpleApplication app) { SpatialFactory.init(app.getAssetManager(), app.getRootNode());
@Override public void init(SimpleApplication app) { SpatialFactory.init(app.getAssetManager(), app.getRootNode());
SmartPhoneFactory.init(bulletAppState, app.getAssetManager(), app.getRenderManager(), app.getCamera(), app.getAudioRenderer());
@Override public void init(SimpleApplication app) { SpatialFactory.init(app.getAssetManager(), app.getRootNode());
@Override public void init(SimpleApplication app) { SpatialFactory.init(app.getAssetManager(), app.getRootNode());
@Override public void init(SimpleApplication app) { SpatialFactory.init(app.getAssetManager(), app.getRootNode());
@Override public void init(SimpleApplication app) { SpatialFactory.init(app.getAssetManager(), app.getRootNode());