示例#1
0
 public static MeshSurface newMesh(
     boolean isAlt,
     T3[] vertices,
     int vertexCount,
     int[][] polygonIndexes,
     T3[] normals,
     int nNormals) {
   MeshSurface ms = new MeshSurface();
   ms.polygonIndexes = polygonIndexes;
   if (isAlt) ms.altVertices = vertices;
   else ms.vertices = (P3[]) vertices;
   ms.vertexCount = (vertexCount == 0 ? vertices.length : vertexCount);
   ms.normals = normals;
   ms.normalCount = (nNormals == 0 && normals != null ? normals.length : nNormals);
   return ms;
 }
示例#2
0
 public static MeshSurface newSlab(
     P3[] vertices,
     int vertexCount,
     float[] vertexValues,
     int[][] polygonIndexes,
     int polygonCount,
     int checkCount) {
   // from DRAW only
   MeshSurface ms = new MeshSurface();
   ms.vertices = vertices;
   ms.vertexValues = vertexValues;
   ms.vertexCount = vertexCount;
   ms.polygonIndexes = polygonIndexes;
   ms.polygonCount = polygonCount;
   ms.checkCount = checkCount; // will be 1
   return ms;
 }