Examples of TerrainBlock


Examples of com.jmex.terrain.TerrainBlock

    @SuppressWarnings("unused")
    private void buildTerrain(@SuppressWarnings("hiding") String name, int size,
           Vector3f stepScale, Vector3f origin, boolean clod) {
        for(int i = 0; i < TERRAIN_PAGES; i++)
        {
            terrainPages[i] = new TerrainBlock(name + "Node" +  i, size, stepScale, heightMaps[i].getHeightMap(), origin);
           
            assignTexture(terrainPages[i],heightMaps[i]);

            float zQuarter = FastMath.TWO_PI/chunks;
            float radialQuarter = FastMath.PI/chunks;
View Full Code Here

Examples of com.jmex.terrain.TerrainBlock

       
        MidPointHeightMap heightMap = new MidPointHeightMap(64, 1f);
        // Scale the data
        Vector3f terrainScale = new Vector3f(4, 0.1575f, 4);
        // create a terraiwblock
         tb = new TerrainBlock("Terrain", heightMap.getSize(), terrainScale,
                heightMap.getHeightMap(), new Vector3f(0, 0, 0), false);
        //tb.setLocalTranslation(new Vector3f(-20, -60, -20));
        tb.setModelBound(new BoundingBox());
        tb.updateModelBound();
View Full Code Here

Examples of com.jmex.terrain.TerrainBlock

       
        MidPointHeightMap heightMap = new MidPointHeightMap(64, 1f);
        // Scale the data
        Vector3f terrainScale = new Vector3f(4, 0.1575f, 4);
        // create a terraiwblock
         tb = new TerrainBlock("Terrain", heightMap.getSize(), terrainScale,
                heightMap.getHeightMap(), new Vector3f(0, 0, 0), false);
        //tb.setLocalTranslation(new Vector3f(-20, -60, -20));
        tb.setModelBound(new BoundingBox());
        tb.updateModelBound();
View Full Code Here

Examples of org.geotools.renderer3d.terrainblock.TerrainBlock

    }


    private void checkNode( QuadTreeNode<TerrainBlock> node, final Vector3f currentCameraPosition )
    {
        final TerrainBlock terrainBlock = node.getNodeData();

        if ( terrainBlock != null )
        {
            // Calculate size/distance
            final double size = node.getBounds().getSizeAveraged();
            final double squaredSize = size * size;
            final double squaredDistance = terrainBlock.getCenter().distanceSquared( currentCameraPosition );
            final double comparsionFactor = squaredSize / squaredDistance;

            // Expand if needed, and if the node is larger than the minimum node size
            if ( comparsionFactor > EXPANSION_THRESHOLD && size > MINIMUM_NODE_SIZE_M )
            {
View Full Code Here
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.