package org.pollux3d.menu;
import org.pollux3d.menu.Ring;
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;
public class RingTest extends SimpleApplication {
public static void main(String[] args) {
RingTest app = new RingTest();
app.start();
}
@Override
public void simpleInitApp() {
Ring r = new Ring(3f, 0.5f);
r.setPointSize(10f);
r.setStatic();
Geometry g = new Geometry("geo_ring", r);
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);
}
}