Examples of Terreno


Examples of whitening.opengl.s.com.deadtroll.model.Terreno

    int i,j,step;
    float m = maxDispH;

    int largura = (int)Math.pow(2,numIteracoes) + 1;

    Terreno terreno = new Terreno(largura, largura);
    terreno.setEscalaX(256.0f/(float)Math.pow(2,numIteracoes));
    terreno.setEscalaZ(256.0f/(float)Math.pow(2,numIteracoes));

    for (step = terreno.getLargura()-1; step > 1; step /= 2) {
      for (i = 0;i<terreno.getProfundidade()-2;i+=step) {
        for(j=0;j<terreno.getLargura()-2;j+=step) {
          diamondStep(terreno, i,j,step,m);
        }
      }
      for (i = 0;i<terreno.getProfundidade()-2;i+=step) {
        for(j=0;j<terreno.getLargura()-2;j+=step) {
          squareStep(terreno,i,j,step,m);
        }
      }
      m *= Math.pow(2,-rougness);
    }
View Full Code Here

Examples of whitening.opengl.s.com.deadtroll.model.Terreno



public class Main
  public static void main(String[] args) {
    Terreno terreno = MidPointDisplacement.criarTerreno(8, 60.0f, 1.0f);
    terreno.computarAlturaMaxMin();
    System.out.println(terreno);
    ControlAction action = new ControlAction(terreno);
  }
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.