Package org.pollux3d.menu

Source Code of org.pollux3d.menu.BubbleLineTest

package org.pollux3d.menu;

import com.jme3.app.SimpleApplication;
import com.jme3.light.DirectionalLight;
import com.jme3.material.Material;
import com.jme3.material.RenderState.FaceCullMode;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.scene.Geometry;
import com.jme3.scene.Mesh;


public class BubbleLineTest extends SimpleApplication {

  public static void main(String[] args) {
    BubbleLineTest app = new BubbleLineTest();
    app.start();
  }

  @Override
  public void simpleInitApp() {
        cam.setLocation(new Vector3f(3, 3, 3));
        cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);
       
    BubbleLine b = new BubbleLine(0.2f, 1);
    /*
    b.setMode(Mesh.Mode.Points);
    b.setPointSize(10f);
    b.setStatic();
    */
    Geometry g = new Geometry("Bubble", b);
    Material mat = new Material(assetManager, "Common/MatDefs/Misc/SolidColor.j3md");
    mat.setColor("Color", ColorRGBA.Blue);
    mat.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off);
    g.setMaterial(mat);
    rootNode.attachChild(g);
   
    /*
    DirectionalLight sun = new DirectionalLight();
    sun.setDirection(new Vector3f(1,0,-2).normalizeLocal());
    sun.setColor(ColorRGBA.White);
    rootNode.addLight(sun);
    */

  }
}
TOP

Related Classes of org.pollux3d.menu.BubbleLineTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.