Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: h31ix on Mar 1st, 2013  |  syntax: Java  |  size: 10.93 KB  |  views: 1,512  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.    switch (face) {
  2.     case DOWN:
  3.       base.addVertex(0, 1.0F, 1.0F, 1.0F);
  4.       base.addVertex(1, 1.0F, 0.0F, 1.0F);
  5.       base.addVertex(2, 1.0F, 0.0F, 0.0F);
  6.       base.addVertex(3, 1.0F, 1.0F, 0.0F);
  7.       _base.addVertex(0, 1.0F, 1.0F, 0.0F);
  8.       _base.addVertex(1, 1.0F, 0.0F, 0.0F);
  9.       _base.addVertex(2, 1.0F, 0.0F, 1.0F);
  10.       _base.addVertex(3, 1.0F, 1.0F, 1.0F);
  11.  
  12.       tri1.addVertex(0, 0.0F, 0.5F, 0.5F);
  13.       tri1.addVertex(1, 1.0F, 1.0F, 0.0F);
  14.       tri1.addVertex(2, 1.0F, 0.0F, 0.0F);
  15.       tri1.addVertex(3, 0.0F, 0.5F, 0.5F);
  16.       _tri1.addVertex(0, 0.0F, 0.5F, 0.5F);
  17.       _tri1.addVertex(1, 1.0F, 0.0F, 0.0F);
  18.       _tri1.addVertex(2, 1.0F, 1.0F, 0.0F);
  19.       _tri1.addVertex(3, 0.0F, 0.5F, 0.5F);
  20.  
  21.       tri2.addVertex(0, 0.0F, 0.5F, 0.5F);
  22.       tri2.addVertex(1, 1.0F, 1.0F, 1.0F);
  23.       tri2.addVertex(2, 1.0F, 1.0F, 0.0F);
  24.       tri2.addVertex(3, 0.0F, 0.5F, 0.5F);
  25.       _tri2.addVertex(0, 0.0F, 0.5F, 0.5F);
  26.       _tri2.addVertex(1, 1.0F, 1.0F, 0.0F);
  27.       _tri2.addVertex(2, 1.0F, 1.0F, 1.0F);
  28.       _tri2.addVertex(3, 0.0F, 0.5F, 0.5F);
  29.  
  30.       tri3.addVertex(0, 0.0F, 0.5F, 0.5F);
  31.       tri3.addVertex(1, 1.0F, 0.0F, 1.0F);
  32.       tri3.addVertex(2, 1.0F, 1.0F, 1.0F);
  33.       tri3.addVertex(3, 0.0F, 0.5F, 0.5F);
  34.       _tri3.addVertex(0, 0.0F, 0.5F, 0.5F);
  35.       _tri3.addVertex(1, 1.0F, 1.0F, 1.0F);
  36.       _tri3.addVertex(2, 1.0F, 0.0F, 1.0F);
  37.       _tri3.addVertex(3, 0.0F, 0.5F, 0.5F);
  38.  
  39.       tri4.addVertex(0, 0.0F, 0.5F, 0.5F);
  40.       tri4.addVertex(1, 1.0F, 0.0F, 0.0F);
  41.       tri4.addVertex(2, 1.0F, 0.0F, 1.0F);
  42.       tri4.addVertex(3, 0.0F, 0.5F, 0.5F);
  43.       _tri4.addVertex(0, 0.0F, 0.5F, 0.5F);
  44.       _tri4.addVertex(1, 1.0F, 0.0F, 1.0F);
  45.       _tri4.addVertex(2, 1.0F, 0.0F, 0.0F);
  46.       _tri4.addVertex(3, 0.0F, 0.5F, 0.5F);
  47.       break;
  48.     case EAST:
  49.       base.addVertex(0, 0.0F, 1.0F, 1.0F);
  50.       base.addVertex(1, 0.0F, 0.0F, 1.0F);
  51.       base.addVertex(2, 1.0F, 0.0F, 1.0F);
  52.       base.addVertex(3, 1.0F, 1.0F, 1.0F);
  53.       _base.addVertex(0, 1.0F, 1.0F, 1.0F);
  54.       _base.addVertex(1, 1.0F, 0.0F, 1.0F);
  55.       _base.addVertex(2, 0.0F, 0.0F, 1.0F);
  56.       _base.addVertex(3, 0.0F, 1.0F, 1.0F);
  57.  
  58.       tri1.addVertex(0, 0.5F, 0.5F, 0.0F);
  59.       tri1.addVertex(1, 1.0F, 1.0F, 1.0F);
  60.       tri1.addVertex(2, 1.0F, 0.0F, 1.0F);
  61.       tri1.addVertex(3, 0.5F, 0.5F, 0.0F);
  62.       _tri1.addVertex(0, 0.5F, 0.5F, 0.0F);
  63.       _tri1.addVertex(1, 1.0F, 0.0F, 1.0F);
  64.       _tri1.addVertex(2, 1.0F, 1.0F, 1.0F);
  65.       _tri1.addVertex(3, 0.5F, 0.5F, 0.0F);
  66.  
  67.       tri2.addVertex(0, 0.5F, 0.5F, 0.0F);
  68.       tri2.addVertex(1, 0.0F, 1.0F, 1.0F);
  69.       tri2.addVertex(2, 1.0F, 1.0F, 1.0F);
  70.       tri2.addVertex(3, 0.5F, 0.5F, 0.0F);
  71.       _tri2.addVertex(0, 0.5F, 0.5F, 0.0F);
  72.       _tri2.addVertex(1, 1.0F, 1.0F, 1.0F);
  73.       _tri2.addVertex(2, 0.0F, 1.0F, 1.0F);
  74.       _tri2.addVertex(3, 0.5F, 0.5F, 0.0F);
  75.  
  76.       tri3.addVertex(0, 0.5F, 0.5F, 0.0F);
  77.       tri3.addVertex(1, 0.0F, 0.0F, 1.0F);
  78.       tri3.addVertex(2, 0.0F, 1.0F, 1.0F);
  79.       tri3.addVertex(3, 0.5F, 0.5F, 0.0F);
  80.       _tri3.addVertex(0, 0.5F, 0.5F, 0.0F);
  81.       _tri3.addVertex(1, 0.0F, 1.0F, 1.0F);
  82.       _tri3.addVertex(2, 0.0F, 0.0F, 1.0F);
  83.       _tri3.addVertex(3, 0.5F, 0.5F, 0.0F);
  84.  
  85.       tri4.addVertex(0, 0.5F, 0.5F, 0.0F);
  86.       tri4.addVertex(1, 1.0F, 0.0F, 1.0F);
  87.       tri4.addVertex(2, 0.0F, 0.0F, 1.0F);
  88.       tri4.addVertex(3, 0.5F, 0.5F, 0.0F);
  89.       _tri4.addVertex(0, 0.5F, 0.5F, 0.0F);
  90.       _tri4.addVertex(1, 0.0F, 0.0F, 1.0F);
  91.       _tri4.addVertex(2, 1.0F, 0.0F, 1.0F);
  92.       _tri4.addVertex(3, 0.5F, 0.5F, 0.0F);
  93.       break;
  94.     case EAST_NORTH_EAST:
  95.       base.addVertex(0, 0.0F, 1.0F, 0.0F);
  96.       base.addVertex(1, 0.0F, 0.0F, 0.0F);
  97.       base.addVertex(2, 0.0F, 0.0F, 1.0F);
  98.       base.addVertex(3, 0.0F, 1.0F, 1.0F);
  99.       _base.addVertex(0, 0.0F, 1.0F, 1.0F);
  100.       _base.addVertex(1, 0.0F, 0.0F, 1.0F);
  101.       _base.addVertex(2, 0.0F, 0.0F, 0.0F);
  102.       _base.addVertex(3, 0.0F, 1.0F, 0.0F);
  103.  
  104.       tri1.addVertex(0, 1.0F, 0.5F, 0.5F);
  105.       tri1.addVertex(1, 0.0F, 1.0F, 1.0F);
  106.       tri1.addVertex(2, 0.0F, 0.0F, 1.0F);
  107.       tri1.addVertex(3, 1.0F, 0.5F, 0.5F);
  108.       _tri1.addVertex(0, 1.0F, 0.5F, 0.5F);
  109.       _tri1.addVertex(1, 0.0F, 0.0F, 1.0F);
  110.       _tri1.addVertex(2, 0.0F, 1.0F, 1.0F);
  111.       _tri1.addVertex(3, 1.0F, 0.5F, 0.5F);
  112.  
  113.       tri2.addVertex(0, 1.0F, 0.5F, 0.5F);
  114.       tri2.addVertex(1, 0.0F, 1.0F, 0.0F);
  115.       tri2.addVertex(2, 0.0F, 1.0F, 1.0F);
  116.       tri2.addVertex(3, 1.0F, 0.5F, 0.5F);
  117.       _tri2.addVertex(0, 1.0F, 0.5F, 0.5F);
  118.       _tri2.addVertex(1, 0.0F, 1.0F, 1.0F);
  119.       _tri2.addVertex(2, 0.0F, 1.0F, 0.0F);
  120.       _tri2.addVertex(3, 1.0F, 0.5F, 0.5F);
  121.  
  122.       tri3.addVertex(0, 1.0F, 0.5F, 0.5F);
  123.       tri3.addVertex(1, 0.0F, 0.0F, 0.0F);
  124.       tri3.addVertex(2, 0.0F, 1.0F, 0.0F);
  125.       tri3.addVertex(3, 1.0F, 0.5F, 0.5F);
  126.       _tri3.addVertex(0, 1.0F, 0.5F, 0.5F);
  127.       _tri3.addVertex(1, 0.0F, 1.0F, 0.0F);
  128.       _tri3.addVertex(2, 0.0F, 0.0F, 0.0F);
  129.       _tri3.addVertex(3, 1.0F, 0.5F, 0.5F);
  130.  
  131.       tri4.addVertex(0, 1.0F, 0.5F, 0.5F);
  132.       tri4.addVertex(1, 0.0F, 0.0F, 1.0F);
  133.       tri4.addVertex(2, 0.0F, 0.0F, 0.0F);
  134.       tri4.addVertex(3, 1.0F, 0.5F, 0.5F);
  135.       _tri4.addVertex(0, 1.0F, 0.5F, 0.5F);
  136.       _tri4.addVertex(1, 0.0F, 0.0F, 0.0F);
  137.       _tri4.addVertex(2, 0.0F, 0.0F, 1.0F);
  138.       _tri4.addVertex(3, 1.0F, 0.5F, 0.5F);
  139.       break;
  140.     case EAST_SOUTH_EAST:
  141.       base.addVertex(0, 0.0F, 1.0F, 0.0F);
  142.       base.addVertex(1, 0.0F, 0.0F, 0.0F);
  143.       base.addVertex(2, 1.0F, 0.0F, 0.0F);
  144.       base.addVertex(3, 1.0F, 1.0F, 0.0F);
  145.       _base.addVertex(0, 1.0F, 1.0F, 0.0F);
  146.       _base.addVertex(1, 1.0F, 0.0F, 0.0F);
  147.       _base.addVertex(2, 0.0F, 0.0F, 0.0F);
  148.       _base.addVertex(3, 0.0F, 1.0F, 0.0F);
  149.  
  150.       tri1.addVertex(0, 0.5F, 0.5F, 1.0F);
  151.       tri1.addVertex(1, 0.0F, 1.0F, 0.0F);
  152.       tri1.addVertex(2, 0.0F, 0.0F, 0.0F);
  153.       tri1.addVertex(3, 0.5F, 0.5F, 1.0F);
  154.       _tri1.addVertex(0, 0.5F, 0.5F, 1.0F);
  155.       _tri1.addVertex(1, 0.0F, 0.0F, 0.0F);
  156.       _tri1.addVertex(2, 0.0F, 1.0F, 0.0F);
  157.       _tri1.addVertex(3, 0.5F, 0.5F, 1.0F);
  158.  
  159.       tri2.addVertex(0, 0.5F, 0.5F, 1.0F);
  160.       tri2.addVertex(1, 1.0F, 1.0F, 0.0F);
  161.       tri2.addVertex(2, 0.0F, 1.0F, 0.0F);
  162.       tri2.addVertex(3, 0.5F, 0.5F, 1.0F);
  163.       _tri2.addVertex(0, 0.5F, 0.5F, 1.0F);
  164.       _tri2.addVertex(1, 0.0F, 1.0F, 0.0F);
  165.       _tri2.addVertex(2, 1.0F, 1.0F, 0.0F);
  166.       _tri2.addVertex(3, 0.5F, 0.5F, 1.0F);
  167.  
  168.       tri3.addVertex(0, 0.5F, 0.5F, 1.0F);
  169.       tri3.addVertex(1, 1.0F, 0.0F, 0.0F);
  170.       tri3.addVertex(2, 1.0F, 1.0F, 0.0F);
  171.       tri3.addVertex(3, 0.5F, 0.5F, 1.0F);
  172.       _tri3.addVertex(0, 0.5F, 0.5F, 1.0F);
  173.       _tri3.addVertex(1, 1.0F, 1.0F, 0.0F);
  174.       _tri3.addVertex(2, 1.0F, 0.0F, 0.0F);
  175.       _tri3.addVertex(3, 0.5F, 0.5F, 1.0F);
  176.  
  177.       tri4.addVertex(0, 0.5F, 0.5F, 1.0F);
  178.       tri4.addVertex(1, 0.0F, 0.0F, 0.0F);
  179.       tri4.addVertex(2, 1.0F, 0.0F, 0.0F);
  180.       tri4.addVertex(3, 0.5F, 0.5F, 1.0F);
  181.       _tri4.addVertex(0, 0.5F, 0.5F, 1.0F);
  182.       _tri4.addVertex(1, 1.0F, 0.0F, 0.0F);
  183.       _tri4.addVertex(2, 0.0F, 0.0F, 0.0F);
  184.       _tri4.addVertex(3, 0.5F, 0.5F, 1.0F);
  185.       break;
  186.     case NORTH_EAST:
  187.       base.addVertex(0, 1.0F, 1.0F, 0.0F);
  188.       base.addVertex(1, 0.0F, 1.0F, 0.0F);
  189.       base.addVertex(2, 0.0F, 1.0F, 1.0F);
  190.       base.addVertex(3, 1.0F, 1.0F, 1.0F);
  191.       _base.addVertex(0, 1.0F, 1.0F, 1.0F);
  192.       _base.addVertex(1, 0.0F, 1.0F, 1.0F);
  193.       _base.addVertex(2, 0.0F, 1.0F, 0.0F);
  194.       _base.addVertex(3, 1.0F, 1.0F, 0.0F);
  195.  
  196.       tri1.addVertex(0, 0.5F, 0.0F, 0.5F);
  197.       tri1.addVertex(1, 0.0F, 1.0F, 0.0F);
  198.       tri1.addVertex(2, 1.0F, 1.0F, 0.0F);
  199.       tri1.addVertex(3, 0.5F, 0.0F, 0.5F);
  200.       _tri1.addVertex(0, 0.5F, 0.0F, 0.5F);
  201.       _tri1.addVertex(1, 1.0F, 1.0F, 0.0F);
  202.       _tri1.addVertex(2, 0.0F, 1.0F, 0.0F);
  203.       _tri1.addVertex(3, 0.5F, 0.0F, 0.5F);
  204.  
  205.       tri2.addVertex(0, 0.5F, 0.0F, 0.5F);
  206.       tri2.addVertex(1, 0.0F, 1.0F, 1.0F);
  207.       tri2.addVertex(2, 0.0F, 1.0F, 0.0F);
  208.       tri2.addVertex(3, 0.5F, 0.0F, 0.5F);
  209.       _tri2.addVertex(0, 0.5F, 0.0F, 0.5F);
  210.       _tri2.addVertex(1, 0.0F, 1.0F, 0.0F);
  211.       _tri2.addVertex(2, 0.0F, 1.0F, 1.0F);
  212.       _tri2.addVertex(3, 0.5F, 0.0F, 0.5F);
  213.  
  214.       tri3.addVertex(0, 0.5F, 0.0F, 0.5F);
  215.       tri3.addVertex(1, 1.0F, 1.0F, 1.0F);
  216.       tri3.addVertex(2, 0.0F, 1.0F, 1.0F);
  217.       tri3.addVertex(3, 0.5F, 0.0F, 0.5F);
  218.       _tri3.addVertex(0, 0.5F, 0.0F, 0.5F);
  219.       _tri3.addVertex(1, 0.0F, 1.0F, 1.0F);
  220.       _tri3.addVertex(2, 1.0F, 1.0F, 1.0F);
  221.       _tri3.addVertex(3, 0.5F, 0.0F, 0.5F);
  222.  
  223.       tri4.addVertex(0, 0.5F, 0.0F, 0.5F);
  224.       tri4.addVertex(1, 1.0F, 1.0F, 0.0F);
  225.       tri4.addVertex(2, 1.0F, 1.0F, 1.0F);
  226.       tri4.addVertex(3, 0.5F, 0.0F, 0.5F);
  227.       _tri4.addVertex(0, 0.5F, 0.0F, 0.5F);
  228.       _tri4.addVertex(1, 1.0F, 1.0F, 1.0F);
  229.       _tri4.addVertex(2, 1.0F, 1.0F, 0.0F);
  230.       _tri4.addVertex(3, 0.5F, 0.0F, 0.5F);
  231.       break;
  232.     case NORTH:
  233.     default:
  234.       base.addVertex(0, 1.0F, 0.0F, 0.0F);
  235.       base.addVertex(1, 1.0F, 0.0F, 1.0F);
  236.       base.addVertex(2, 0.0F, 0.0F, 1.0F);
  237.       base.addVertex(3, 0.0F, 0.0F, 0.0F);
  238.       _base.addVertex(0, 0.0F, 0.0F, 0.0F);
  239.       _base.addVertex(1, 0.0F, 0.0F, 1.0F);
  240.       _base.addVertex(2, 1.0F, 0.0F, 1.0F);
  241.       _base.addVertex(3, 1.0F, 0.0F, 0.0F);
  242.  
  243.       tri1.addVertex(0, 0.5F, 1.0F, 0.5F);
  244.       tri1.addVertex(1, 1.0F, 0.0F, 0.0F);
  245.       tri1.addVertex(2, 0.0F, 0.0F, 0.0F);
  246.       tri1.addVertex(3, 0.5F, 1.0F, 0.5F);
  247.       _tri1.addVertex(0, 0.5F, 1.0F, 0.5F);
  248.       _tri1.addVertex(1, 0.0F, 0.0F, 0.0F);
  249.       _tri1.addVertex(2, 1.0F, 0.0F, 0.0F);
  250.       _tri1.addVertex(3, 0.5F, 1.0F, 0.5F);
  251.  
  252.       tri2.addVertex(0, 0.5F, 1.0F, 0.5F);
  253.       tri2.addVertex(1, 1.0F, 0.0F, 1.0F);
  254.       tri2.addVertex(2, 1.0F, 0.0F, 0.0F);
  255.       tri2.addVertex(3, 0.5F, 1.0F, 0.5F);
  256.       _tri2.addVertex(0, 0.5F, 1.0F, 0.5F);
  257.       _tri2.addVertex(1, 1.0F, 0.0F, 0.0F);
  258.       _tri2.addVertex(2, 1.0F, 0.0F, 1.0F);
  259.       _tri2.addVertex(3, 0.5F, 1.0F, 0.5F);
  260.  
  261.       tri3.addVertex(0, 0.5F, 1.0F, 0.5F);
  262.       tri3.addVertex(1, 0.0F, 0.0F, 1.0F);
  263.       tri3.addVertex(2, 1.0F, 0.0F, 1.0F);
  264.       tri3.addVertex(3, 0.5F, 1.0F, 0.5F);
  265.       _tri3.addVertex(0, 0.5F, 1.0F, 0.5F);
  266.       _tri3.addVertex(1, 1.0F, 0.0F, 1.0F);
  267.       _tri3.addVertex(2, 0.0F, 0.0F, 1.0F);
  268.       _tri3.addVertex(3, 0.5F, 1.0F, 0.5F);
  269.  
  270.       tri4.addVertex(0, 0.5F, 1.0F, 0.5F);
  271.       tri4.addVertex(1, 0.0F, 0.0F, 0.0F);
  272.       tri4.addVertex(2, 0.0F, 0.0F, 1.0F);
  273.       tri4.addVertex(3, 0.5F, 1.0F, 0.5F);
  274.       _tri4.addVertex(0, 0.5F, 1.0F, 0.5F);
  275.       _tri4.addVertex(1, 0.0F, 0.0F, 1.0F);
  276.       _tri4.addVertex(2, 0.0F, 0.0F, 0.0F);
  277.       _tri4.addVertex(3, 0.5F, 1.0F, 0.5F);
  278.     }
  279.  
  280.     setQuad(base)
  281.       .setQuad(tri1)
  282.       .setQuad(tri2)
  283.       .setQuad(tri3)
  284.       .setQuad(tri4)
  285.       .setQuad(_base)
  286.       .setQuad(_tri1)
  287.       .setQuad(_tri2)
  288.       .setQuad(_tri3)
  289.       .setQuad(_tri4);
  290.   }
clone this paste RAW Paste Data