Пример #1
0
 static Normal[] BuildNormals(byte[] bytes, int startIndex, int numNormals)
 {
     Normal[] normals = new Normal[numNormals];
     for (int i = 0; i < numNormals; ++i)
     {
         normals[i].f0 = BitConverter.ToSingle(bytes, startIndex + i * 12);
         normals[i].f1 = BitConverter.ToSingle(bytes, startIndex + i * 12 + 4);
         normals[i].f2 = BitConverter.ToSingle(bytes, startIndex + i * 12 + 8);
     }
     return normals;
 }
Пример #2
0
 public MultiPatchZM(Envelope box, int numParts, int numPoints,
     int[] parts, int[] partTypes, Point[] points,
     double zMin, double zMax, double[] zArray,
     double mMin, double mMax, double[] mArray,
     int numIDs, int[] ids,
     int numNormals, Normal[] normals,
     int numTex, int texDim, int[] texParts, float[,] texCoords,
     int numMaterial, int texCompType, int[] materialParts, Material[] materials)
 {
     BoundingBox = box;
     NumParts = numParts;
     NumPoints = numPoints;
     Parts = parts;
     PartTypes = partTypes;
     Points = points;
     ZMin = zMin;
     ZMax = zMax;
     Zs = zArray;
     MMin = mMin;
     MMax = mMax;
     Ms = mArray;
     NumIDs = numIDs;
     IDs = ids;
     NumNormals = numNormals;
     Normals = normals;
     NumTex = numTex;
     TexDim = texDim;
     TexParts = texParts;
     TexCoords = texCoords;
     NumMaterials = numMaterial;
     TexCompType = texCompType;
     MaterialParts = materialParts;
     Materials = materials;
 }