private static Array<Triangle> createTriangles(Vector3[] vertexVectors,short[] indices,int[] meshPartIndexOffsets,int[] meshPartTriCounts){
  Array<Triangle> triangles=new Array<Triangle>();
  triangles.ordered=true;
  short i=0;
  short j=0;
  int triIndex=0;
  int meshPartIndex=-1;
  while (i < indices.length) {
    if (j < meshPartIndexOffsets.length && i >= meshPartIndexOffsets[j]) {
      meshPartIndex++;
      j++;
    }
    triangles.add(new Triangle(vertexVectors[indices[i++]],vertexVectors[indices[i++]],vertexVectors[indices[i++]],triIndex,meshPartIndex));
    meshPartTriCounts[meshPartIndex]++;
    triIndex++;
  }
  return triangles;
}

private static Array < Triangle > createTriangles ( Vector3 [ ] vertexVectors , short [ ] indices , int [ ] meshPartIndexOffsets , int [ ] meshPartTriCounts ) { Array < Triangle > triangles = new Array < Triangle > ( ) ; triangles . ordered = true ; short i = 0 ; short j = 0 ; int triIndex = 0 ; int meshPartIndex = - 1 ; while ( i < indices . length ) { if ( j < meshPartIndexOffsets . length && i >= meshPartIndexOffsets [ j ] ) { meshPartIndex ++ ; j ++ ; } triangles . add ( new Triangle ( vertexVectors [ indices [ i ++ ] ] , vertexVectors [ indices [ i ++ ] ] , vertexVectors [ indices [ i ++ ] ] , triIndex , meshPartIndex ) ) ; meshPartTriCounts [ meshPartIndex ] ++ ; triIndex ++ ; } return triangles ; }
creates triangle objects according to the index array , using vector3 objects from the provided vector array .
