Package com.ardor3d.extension.terrain.client

Examples of com.ardor3d.extension.terrain.client.TerrainBuilder


            final int SIZE = ardorImage.getWidth();

            final TerrainDataProvider terrainDataProvider = new ArrayTerrainDataProvider(heightMap, SIZE, new Vector3(
                    3, 50, 3));

            terrain = new TerrainBuilder(terrainDataProvider, terrainCamera).setShowDebugPanels(true).build();

            _root.attachChild(terrain);
        } catch (final Exception ex1) {
            System.out.println("Problem setting up terrain...");
            ex1.printStackTrace();
View Full Code Here


            inMemoryTerrainData = new InMemoryTerrainData(2048, 9, 128, new Vector3(1, 200, 1));

            final TerrainDataProvider terrainDataProvider = new InMemoryTerrainDataProvider(inMemoryTerrainData, true);

            terrain = new TerrainBuilder(terrainDataProvider, terrainCamera).setShowDebugPanels(true).build();

            _root.attachChild(terrain);
        } catch (final Exception ex1) {
            System.out.println("Problem setting up terrain...");
            ex1.printStackTrace();
View Full Code Here

            final Function3D function = Functions.scaleInput(functionTmp, scale, scale, 1);

            final TerrainDataProvider terrainDataProvider = new ProceduralTerrainDataProvider(function, new Vector3(1,
                    200, 1), -1.2f, 1.2f);

            terrain = new TerrainBuilder(terrainDataProvider, terrainCamera).setShowDebugPanels(true).build();
        } catch (final Exception ex1) {
            ex1.printStackTrace();
        }

        final Node reflectedNode = new Node("reflectNode");
View Full Code Here

            final float[] heightMap = raw.getHeightData();

            final TerrainDataProvider terrainDataProvider = new ArrayTerrainDataProvider(heightMap, SIZE, new Vector3(
                    1, 500, 1));

            terrain = new TerrainBuilder(terrainDataProvider, _canvas.getCanvasRenderer().getCamera())
                    .setShowDebugPanels(false).build();

            _root.attachChild(terrain);
        } catch (final Exception ex1) {
            System.out.println("Problem setting up terrain...");
View Full Code Here

            final float[] heightMap = raw.getHeightData();

            final TerrainDataProvider terrainDataProvider = new ArrayTerrainDataProvider(heightMap, SIZE, new Vector3(
                    1, 300, 1));

            terrain = new TerrainBuilder(terrainDataProvider, terrainCamera).setShowDebugPanels(true).build();

            terrain.setRotation(new Quaternion().fromAngleAxis(MathUtils.HALF_PI, Vector3.UNIT_X));

            _root.attachChild(terrain);
        } catch (final Exception ex1) {
View Full Code Here

            final Function3D function = Functions.scaleInput(functionTmp, scale, scale, 1);

            final TerrainDataProvider terrainDataProvider = new ProceduralTerrainDataProvider(function, new Vector3(1,
                    200, 1), -1.2f, 1.2f);

            terrain = new TerrainBuilder(terrainDataProvider, terrainCamera).setShowDebugPanels(true).build();

            _root.attachChild(terrain);
        } catch (final Exception ex1) {
            System.out.println("Problem setting up terrain...");
            ex1.printStackTrace();
View Full Code Here

            final float[] heightMap = raw.getHeightData();

            final TerrainDataProvider terrainDataProvider = new ArrayTerrainDataProvider(heightMap, SIZE, new Vector3(
                    1, 300, 1));

            terrain = new TerrainBuilder(terrainDataProvider, terrainCamera).setShowDebugPanels(true).build();

            _root.attachChild(terrain);
        } catch (final Exception ex1) {
            System.out.println("Problem setting up terrain...");
            ex1.printStackTrace();
View Full Code Here

            final ArrayTerrainDataProvider terrainDataProvider = new ArrayTerrainDataProvider(heightMap, SIZE,
                    new Vector3(5, 2048, 5), true);
            terrainDataProvider.setHeightMax(0.34f);

            final TerrainBuilder builder = new TerrainBuilder(terrainDataProvider, terrainCamera)
                    .setShowDebugPanels(true);

            terrain = builder.build();
            terrain.setPixelShader(new UrlInputSupplier(ResourceLocatorTool.getClassPathResource(
                    ShadowedTerrainExample.class,
                    "com/ardor3d/extension/terrain/shadowedGeometryClipmapShader_normalMap.frag")));
            terrain.reloadShader();
            terrain.getGeometryClipmapShader().setUniform("normalMap", 5);
View Full Code Here

            final Function3D function = Functions.scaleInput(functionTmp, scale, scale, 1);

            final TerrainDataProvider baseTerrainDataProvider = new ProceduralTerrainDataProvider(function,
                    new Vector3(1, heightScale, 1), -1.2f, 1.2f);

            final TerrainBuilder terrainBuilder = new TerrainBuilder(baseTerrainDataProvider, terrainCamera);
            terrainBuilder.addTextureConnection(awtTextureSource);
            terrain = terrainBuilder.setShowDebugPanels(true).build();

            _root.attachChild(terrain);
        } catch (final Exception ex1) {
            System.out.println("Problem setting up terrain...");
            ex1.printStackTrace();
View Full Code Here

            final float[] heightMap = raw.getHeightData();

            final TerrainDataProvider terrainDataProvider = new ArrayTerrainDataProvider(heightMap, SIZE, new Vector3(
                    1, 300, 1));

            terrain = new TerrainBuilder(terrainDataProvider, terrainCamera).setShowDebugPanels(true).build();

            terrain.setPixelShader(new UrlInputSupplier(ResourceLocatorTool
                    .getClassPathResource(ShadowedTerrainExample.class,
                            "com/ardor3d/extension/terrain/shadowedGeometryClipmapShaderPCF.frag")));
            terrain.reloadShader();
View Full Code Here

TOP

Related Classes of com.ardor3d.extension.terrain.client.TerrainBuilder

Copyright © 2018 www.massapicom. 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.