Guest User

Look up tables

a guest
Apr 16th, 2018
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 20.74 KB | None | 0 0
  1. package models;
  2.  
  3. import org.lwjgl.util.vector.Vector3f;
  4.  
  5. public class MarchingCubesCases {
  6.  
  7.     //Winding order of triangles use 2,1,0 or 0,1,2
  8.     public static int[] windingOrder = new int[] { 0, 1, 2 };
  9.    
  10.     // edgeConnection lists the index of the endpoint vertices for each of the 12 edges of the cube
  11.     // edgeConnection[12][2]
  12.    
  13.     public static int[][] edgeConnection = new int[][]
  14.     {
  15.         {0,1}, {1,2}, {2,3}, {3,0},
  16.         {4,5}, {5,6}, {6,7}, {7,4},
  17.         {0,4}, {1,5}, {2,6}, {3,7}
  18.     };
  19.  
  20.     // edgeDirection lists the direction vector (vertex1-vertex0) for each edge in the cube
  21.     // edgeDirection[12][3]
  22.  
Advertisement
Add Comment
Please, Sign In to add comment