SHARE
TWEET

Untitled

a guest Sep 6th, 2014 194 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for(int i = 0; i < indices.length; i = i + 3) {
  2.  
  3.         Vector3 vertex = new Vector3(0f,0f,0f);
  4.  
  5.         vertex.x = vertices[indices[i] * floatsPerVertex + 0];
  6.         vertex.y = vertices[indices[i] * floatsPerVertex + 1];
  7.         vertex.z = vertices[indices[i] * floatsPerVertex + 2];
  8.         //I have 3 variables for vector3 coordinates that i use(p1,p2,p3) to make triangles
  9.         p1 = new Vector3(vertex.x,vertex.y,vertex.z);
  10.  
  11.         vertex.x = vertices[indices[i + 1] * floatsPerVertex + 0];
  12.         vertex.y = vertices[indices[i + 1] * floatsPerVertex + 1];
  13.         vertex.z = vertices[indices[i + 1] * floatsPerVertex + 2];
  14.         p2 = new Vector3(vertex.x,vertex.y,vertex.z);
  15.  
  16.         vertex.x = vertices[indices[i + 2] * floatsPerVertex + 0];
  17.         vertex.y = vertices[indices[i + 2] * floatsPerVertex + 1];
  18.         vertex.z = vertices[indices[i + 2] * floatsPerVertex + 2];
  19.         p3 = new Vector3(vertex.x,vertex.y,vertex.z);
  20.  
  21.         createTriangle(p1, p2, p3);
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top