Search in sources :

Example 6 with ScreenshotAppState

use of com.jme3.app.state.ScreenshotAppState in project Lina by MisterCavespider.

the class Test method simpleInitApp.

@Override
public void simpleInitApp() {
    flyCam.setMoveSpeed(45f);
    stateManager.attach(new ScreenshotAppState("image/"));
    //		
    //		arr = new LineArray(8);
    //		Geometry geom = new Geometry("LineArray", arr);
    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    mat.setTransparent(true);
    mat.setBoolean("VertexColor", true);
    //		geom.setMaterial(mat);
    //		rootNode.attachChild(geom);
    //		
    //		arr.setVertex(0, new Vector3f(0, 0, 0));
    //		arr.setVertex(1, new Vector3f(1, 1, 1));
    //		arr.setVertex(2, new Vector3f(2, 6, 4));
    //		arr.setVertex(3, new Vector3f(3, 12, 9));
    //		
    //		arr.setVertex(4, new Vector3f(4, 20, 16));
    //		arr.setVertex(5, new Vector3f(5, 30, 25));
    //		arr.setVertex(6, new Vector3f(6, 42, 36));
    //		arr.setVertex(7, new Vector3f(7, 56, 49));
    //		
    //		System.out.println();
    //		
    //		str = new LineString(64);
    //		lineString = new Geometry("LineString", str);
    //		lineString.setMaterial(mat.clone());
    //		rootNode.attachChild(lineString);
    //		
    //		str.addPoint(Vector3f.ZERO, ColorRGBA.Red);
    //		str.addPoint(Vector3f.UNIT_X, ColorRGBA.Red);
    //		str.addPoint(Vector3f.UNIT_XYZ, ColorRGBA.Red);
    g = new Geometry("g", new Sphere(8, 8, .5f));
    g.setMaterial(mat.clone());
    rootNode.attachChild(g);
    g.addControl(new TimeTracer(mat.clone(), 64, 64));
}
Also used : Geometry(com.jme3.scene.Geometry) Sphere(com.jme3.scene.shape.Sphere) TimeTracer(io.github.mistercavespider.lina.ctrl.TimeTracer) Material(com.jme3.material.Material) ScreenshotAppState(com.jme3.app.state.ScreenshotAppState)

Aggregations

ScreenshotAppState (com.jme3.app.state.ScreenshotAppState)6 Material (com.jme3.material.Material)5 ColorRGBA (com.jme3.math.ColorRGBA)5 Vector3f (com.jme3.math.Vector3f)5 TerrainGridLodControl (com.jme3.terrain.geomipmap.TerrainGridLodControl)5 TerrainLodControl (com.jme3.terrain.geomipmap.TerrainLodControl)5 DistanceLodCalculator (com.jme3.terrain.geomipmap.lodcalc.DistanceLodCalculator)5 BulletAppState (com.jme3.bullet.BulletAppState)4 CapsuleCollisionShape (com.jme3.bullet.collision.shapes.CapsuleCollisionShape)4 HeightfieldCollisionShape (com.jme3.bullet.collision.shapes.HeightfieldCollisionShape)4 CharacterControl (com.jme3.bullet.control.CharacterControl)4 RigidBodyControl (com.jme3.bullet.control.RigidBodyControl)4 TerrainGrid (com.jme3.terrain.geomipmap.TerrainGrid)4 TerrainGridListener (com.jme3.terrain.geomipmap.TerrainGridListener)4 TerrainQuad (com.jme3.terrain.geomipmap.TerrainQuad)4 Texture (com.jme3.texture.Texture)4 File (java.io.File)4 DirectionalLight (com.jme3.light.DirectionalLight)2 FractalTileLoader (com.jme3.terrain.geomipmap.grid.FractalTileLoader)2 FilteredBasis (com.jme3.terrain.noise.basis.FilteredBasis)2