Package net.anzix.fsz.voxelworld.features.components

Examples of net.anzix.fsz.voxelworld.features.components.Branch


        FloatBuffer textureCoordBuffer = BufferUtils.createVector2Buffer(numOfNonVoxelBranches * numOfSegments * 2);
        IntBuffer indexBuffer = BufferUtils.createIntBuffer(numOfNonVoxelBranches * (numOfSegments + 1) * 2);
        FloatBuffer normalBuffer = BufferUtils.createVector3Buffer(numOfNonVoxelBranches * numOfSegments * 2);
             
        for (int i = 0; i<branches.size(); i++) {
            Branch branch = branches.get(i);
            FszMatrix4 transform = branch.getTransform();
            double startRadius = branch.getStartRadius();
            double endRadius = branch.getEndRadius();
            double length = branch.getLength();
           
            int ii = i* numOfSegments * 2;
            Vector3 startPoint = branch.getStartPoint();

            for (int s = 0; s<numOfSegments; s++) {
                double angle = s * Math.PI * 2 /numOfSegments ;
                float texCoordX = s/(float)numOfSegments;
               
View Full Code Here


        position.multiplyLocal(rotation);
      
        if (startRadius > 0.75) { //voxel branmch
           
            double endRadius = startRadius * factor;
            Branch branch = new Branch(position, length, startRadius, endRadius);
            branches.add(branch);
       
            numOfNonVoxelBranches++;
       
            branch.shiftPositionToEndpoint(position);
           
            FszMatrix4 position2 = new FszMatrix4 (position);
            double divisionFactor = Math.random();
            AddBranch(position2, divisionFactor, length, endRadius)
View Full Code Here

TOP

Related Classes of net.anzix.fsz.voxelworld.features.components.Branch

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.