Package com.jme.scene

Examples of com.jme.scene.SharedNode


        if( VEGETATION_RENDER )
            processMap();
        this.lockTransforms();
    }
    private void processMap(){
        SharedNode s = null;
        Random rand = new Random();
        int id = 0;
       
        for(float x = 0; x < Math.sqrt(this.vegetationMap.length); x++)
        {
            for(float z = 0; z < Math.sqrt(this.vegetationMap.length); z++)
            {
               
                if( id >= this.vegetationMap.length )
                    break;
               
                s = VegetationBank.getNewSharedVegetation(this.vegetationMap[id]);
                s.setLocalTranslation((x*VEGETATION_STEP)*VEGETATION_PACK_SIZE, 55, (z*VEGETATION_STEP)*VEGETATION_PACK_SIZE);
                s.getLocalTranslation().y = getYat(s.getLocalTranslation().x, s.getLocalTranslation().z);
                VEGETATION_AVERAGE_COUNTER++;
                this.attachChild(s);
                s.lockMeshes();
                id++;
            }
        }
       
        this.lockMeshes();
View Full Code Here


    private static BatchingVegetation batchTool = new BatchingVegetation();
    public static SharedNode getNewSharedVegetation(short index){
        if( !vegetationNodeBank.containsKey(index) ){
            vegetationNodeBank.put(index, createVegetationNode(index));
        }
        return new SharedNode(vegetationNodeBank.get(index));
    }
View Full Code Here

TOP

Related Classes of com.jme.scene.SharedNode

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.